What's new

dn-vnstat "no data to display" in "Data usage" and "compare usage"

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

pirx73

Senior Member
As topic says - i have no data in these 2 sections. Data is kept on USB, everything else is collected.
Changing periods, data intervals etc does not help.
 
No. As you can see, noone even cared to answer, including plugin author.
 
No. As you can see, noone even cared to answer, including plugin author.
i do apologise, i must have overlooked your post by mistake. obviously not good enough service for a free script(!)

the first thing to check is if you get any errors when running option 1 at the CLI
the second, is Javascript browser console errors (f12)
finally, check the contents of /opt/share/dn-vnstat.d/csv , e.g.
Code:
ls -la /opt/share/dn-vnstat.d/csv
to check if the CSVs are all 0 in size
 
Yes, almost all are zeroes.
Code:
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_day_daily.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_day_monthly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_day_weekly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_hour_daily.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 WeekPrev.htm
-rw-rw-rw-    1 root   root           182 Nov 15 23:05 WeekSummary.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 WeekThis.htm
-rw-rw-rw-    1 root   root         98173 Nov 15 23:05 dn-vnstatdata.zip
No errors when generated stats in CLI
No errors in Java console, except one comment about Quirks mode.
Noticed that there is no log file at default defined log location:
/opt/var/log/vnstat.log
 
Last edited:
Yes, almost all are zeroes.
Code:
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_day_daily.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_day_monthly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_day_weekly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_hour_daily.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 WeekPrev.htm
-rw-rw-rw-    1 root   root           182 Nov 15 23:05 WeekSummary.htm
-rw-rw-rw-    1 root   root             0 Nov 15 23:05 WeekThis.htm
-rw-rw-rw-    1 root   root         98173 Nov 15 23:05 dn-vnstatdata.zip
No errors when generated stats in CLI
No errors in Java console, except one comment about Quirks mode.
Noticed that there is no log file at default defined log location:
/opt/var/log/vnstat.log
something might be wrong with the database, or no data is being logged. can you check vnstat is running?
Code:
/opt/etc/init.d/S33vnstat check
 
/opt/etc/init.d/S33vnstat check
Checking vnstatd... alive.

Code:
Choose an option:  1

vnstati updating stats for UI

vnstats as of: Mon Nov 15 23:45:33 UTC 2021


eth0  /  hourly

     hour        rx      |     tx      |    total
-------------------------+-------------+------------
2021-11-14
     23:00       2.78 GB |    16.05 MB |     2.80 GB
2021-11-15
     00:00     485.62 MB |    11.71 MB |   497.34 MB
     01:00      67.96 MB |     3.57 MB |    71.53 MB
     02:00       5.43 MB |     2.31 MB |     7.74 MB
     03:00      12.03 MB |    42.08 MB |    54.11 MB
     04:00       7.11 MB |    98.04 MB |   105.15 MB
     05:00      72.26 MB |     7.84 MB |    80.10 MB
     06:00       1.96 GB |    11.22 MB |     1.97 GB
     07:00       2.98 GB |    21.67 MB |     3.00 GB
     08:00       4.00 MB |     1.32 MB |     5.31 MB
     09:00      60.32 MB |     7.25 MB |    67.58 MB
     10:00     455.70 MB |    17.87 MB |   473.57 MB
     11:00     513.83 MB |    12.10 MB |   525.92 MB
     12:00      19.07 MB |    10.21 MB |    29.28 MB
     13:00      26.15 MB |    10.92 MB |    37.07 MB
     14:00      45.71 MB |     2.49 MB |    48.20 MB
     15:00       1.74 GB |    20.65 MB |     1.76 GB
     16:00       2.05 GB |    21.75 MB |     2.07 GB
     17:00       1.92 GB |    22.09 MB |     1.95 GB
     18:00       1.49 GB |    16.32 MB |     1.51 GB
     19:00       1.63 GB |    16.37 MB |     1.64 GB
     20:00     577.21 MB |    26.95 MB |   604.16 MB
     21:00       1.53 GB |    47.47 MB |     1.58 GB
     22:00       3.17 GB |   742.07 MB |     3.91 GB
     23:00     427.47 MB |    27.18 MB |   454.65 MB
-------------------------+-------------+------------

eth0  /  daily

      day        rx      |     tx      |    total
-------------------------+-------------+------------
2021-11-08     54.15 GB |     9.22 GB |    63.37 GB
2021-11-09     44.63 GB |     8.19 GB |    52.82 GB
2021-11-10     48.29 GB |    14.05 GB |    62.34 GB
2021-11-11     65.46 GB |    13.02 GB |    78.47 GB
2021-11-12     65.66 GB |    12.95 GB |    78.61 GB
2021-11-13     33.72 GB |     2.47 GB |    36.19 GB
2021-11-14     43.50 GB |     1.25 GB |    44.75 GB
2021-11-15     21.25 GB |     1.20 GB |    22.46 GB
-------------------------+-------------+------------
estimated      21.48 GB |     1.21 GB |    22.69 GB

eth0  /  monthly

    month        rx      |     tx      |    total
-------------------------+-------------+------------
   2021-06     803.67 GB |    66.63 GB |   870.30 GB
   2021-07     698.02 GB |    94.59 GB |   792.61 GB
   2021-08       1.12 TB |    79.56 GB |     1.20 TB
   2021-09       1.23 TB |   106.17 GB |     1.34 TB
   2021-10       1.60 TB |   113.01 GB |     1.71 TB
   2021-11     689.27 GB |   102.47 GB |   791.74 GB
-------------------------+-------------+------------
estimated       1.38 TB |   205.08 GB |     1.58 TB

eth0  /  yearly

     year        rx      |     tx      |    total
-------------------------+-------------+------------
      2021       6.59 TB |   643.60 GB |     7.23 TB
-------------------------+-------------+------------
estimated       7.54 TB |   736.43 GB |     8.28 TB

vnstat_totals summary generated


1.    Update stats now

2.    Toggle emails for daily summary stats
      Currently: DISABLED

3.    Toggle emails for data usage warnings
      Currently: DISABLED

4.    Set bandwidth allowance for data usage warnings
      Currently: UNLIMITED

5.    Set unit for bandwidth allowance
      Currently: GB

6.    Set start day of cycle for bandwidth allowance
      Currently: Day 1 of month

b.    Check bandwidth usage now
      You have used 791.74GB of data this cycle; the next cycle starts on day 1 of the month.

v.    Edit vnstat config

t.    Toggle time output mode
      Currently non-unix time values will be used for CSV exports

s.    Toggle storage location for stats and config
      Current location is usb
 
/opt/etc/init.d/S33vnstat check
Checking vnstatd... alive.

Code:
Choose an option:  1

vnstati updating stats for UI

vnstats as of: Mon Nov 15 23:45:33 UTC 2021


eth0  /  hourly

     hour        rx      |     tx      |    total
-------------------------+-------------+------------
2021-11-14
     23:00       2.78 GB |    16.05 MB |     2.80 GB
2021-11-15
     00:00     485.62 MB |    11.71 MB |   497.34 MB
     01:00      67.96 MB |     3.57 MB |    71.53 MB
     02:00       5.43 MB |     2.31 MB |     7.74 MB
     03:00      12.03 MB |    42.08 MB |    54.11 MB
     04:00       7.11 MB |    98.04 MB |   105.15 MB
     05:00      72.26 MB |     7.84 MB |    80.10 MB
     06:00       1.96 GB |    11.22 MB |     1.97 GB
     07:00       2.98 GB |    21.67 MB |     3.00 GB
     08:00       4.00 MB |     1.32 MB |     5.31 MB
     09:00      60.32 MB |     7.25 MB |    67.58 MB
     10:00     455.70 MB |    17.87 MB |   473.57 MB
     11:00     513.83 MB |    12.10 MB |   525.92 MB
     12:00      19.07 MB |    10.21 MB |    29.28 MB
     13:00      26.15 MB |    10.92 MB |    37.07 MB
     14:00      45.71 MB |     2.49 MB |    48.20 MB
     15:00       1.74 GB |    20.65 MB |     1.76 GB
     16:00       2.05 GB |    21.75 MB |     2.07 GB
     17:00       1.92 GB |    22.09 MB |     1.95 GB
     18:00       1.49 GB |    16.32 MB |     1.51 GB
     19:00       1.63 GB |    16.37 MB |     1.64 GB
     20:00     577.21 MB |    26.95 MB |   604.16 MB
     21:00       1.53 GB |    47.47 MB |     1.58 GB
     22:00       3.17 GB |   742.07 MB |     3.91 GB
     23:00     427.47 MB |    27.18 MB |   454.65 MB
-------------------------+-------------+------------

eth0  /  daily

      day        rx      |     tx      |    total
-------------------------+-------------+------------
2021-11-08     54.15 GB |     9.22 GB |    63.37 GB
2021-11-09     44.63 GB |     8.19 GB |    52.82 GB
2021-11-10     48.29 GB |    14.05 GB |    62.34 GB
2021-11-11     65.46 GB |    13.02 GB |    78.47 GB
2021-11-12     65.66 GB |    12.95 GB |    78.61 GB
2021-11-13     33.72 GB |     2.47 GB |    36.19 GB
2021-11-14     43.50 GB |     1.25 GB |    44.75 GB
2021-11-15     21.25 GB |     1.20 GB |    22.46 GB
-------------------------+-------------+------------
estimated      21.48 GB |     1.21 GB |    22.69 GB

eth0  /  monthly

    month        rx      |     tx      |    total
-------------------------+-------------+------------
   2021-06     803.67 GB |    66.63 GB |   870.30 GB
   2021-07     698.02 GB |    94.59 GB |   792.61 GB
   2021-08       1.12 TB |    79.56 GB |     1.20 TB
   2021-09       1.23 TB |   106.17 GB |     1.34 TB
   2021-10       1.60 TB |   113.01 GB |     1.71 TB
   2021-11     689.27 GB |   102.47 GB |   791.74 GB
-------------------------+-------------+------------
estimated       1.38 TB |   205.08 GB |     1.58 TB

eth0  /  yearly

     year        rx      |     tx      |    total
-------------------------+-------------+------------
      2021       6.59 TB |   643.60 GB |     7.23 TB
-------------------------+-------------+------------
estimated       7.54 TB |   736.43 GB |     8.28 TB

vnstat_totals summary generated


1.    Update stats now

2.    Toggle emails for daily summary stats
      Currently: DISABLED

3.    Toggle emails for data usage warnings
      Currently: DISABLED

4.    Set bandwidth allowance for data usage warnings
      Currently: UNLIMITED

5.    Set unit for bandwidth allowance
      Currently: GB

6.    Set start day of cycle for bandwidth allowance
      Currently: Day 1 of month

b.    Check bandwidth usage now
      You have used 791.74GB of data this cycle; the next cycle starts on day 1 of the month.

v.    Edit vnstat config

t.    Toggle time output mode
      Currently non-unix time values will be used for CSV exports

s.    Toggle storage location for stats and config
      Current location is usb
ok, please can you send me the contents of /opt/var/lib/vnstat so I can manually query your database files?
 
/tmp/mnt/data/entware/var/lib/vnstat
 
Yes, there is:
Code:
/jffs/addons/dn-vnstat.d:
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 .
drwxr-xr-x    7 marcis   root             0 Nov 15 23:41 ..
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 csv
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 images
drwxrwxrwx    2 marcis   root             0 Jul 19 11:50 v1
-rw-rw-rw-    1 marcis   root         72415 Aug 21 00:37 vnstat-ui.asp

/jffs/addons/dn-vnstat.d/csv:
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 .
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 ..
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_day_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_day_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_day_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_hour_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 WeekPrev.htm
-rw-rw-rw-    1 marcis   root           182 Nov 15 23:51 WeekSummary.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 WeekThis.htm
-rw-rw-rw-    1 marcis   root         97489 Nov 15 23:51 dn-vnstatdata.zip

/jffs/addons/dn-vnstat.d/images:
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 .
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 ..
-rw-rw-rw-    1 marcis   root          7569 Nov 15 23:51 .vnstat_d.htm
-rw-rw-rw-    1 marcis   root          1541 Jul 19 11:50 .vnstat_h.htm
-rw-rw-rw-    1 marcis   root          1631 Nov 15 23:51 .vnstat_hg.htm
-rw-rw-rw-    1 marcis   root          2902 Nov 15 23:51 .vnstat_m.htm
-rw-rw-rw-    1 marcis   root          3310 Nov 15 23:51 .vnstat_s.htm
-rw-rw-rw-    1 marcis   root          3521 Nov 15 23:51 .vnstat_t.htm
-rw-rw-rw-    1 marcis   root          7569 Nov 15 23:51 vnstat_d.png
-rw-rw-rw-    1 marcis   root          1541 Jul 19 11:50 vnstat_h.png
-rw-rw-rw-    1 marcis   root          1631 Nov 15 23:51 vnstat_hg.png
-rw-rw-rw-    1 marcis   root          2902 Nov 15 23:51 vnstat_m.png
-rw-rw-rw-    1 marcis   root          3310 Nov 15 23:51 vnstat_s.png
-rw-rw-rw-    1 marcis   root          3521 Nov 15 23:51 vnstat_t.png

/jffs/addons/dn-vnstat.d/v1:
drwxrwxrwx    2 marcis   root             0 Jul 19 11:50 .
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 ..
-rw-rw-rw-    1 marcis   root          2198 Jul 19 11:50 vnstat-data.bak
-rw-rw-rw-    1 marcis   root          3991 Jul 19 11:50 vnstat.conf
-rw-rw-rw-    1 marcis   root          3991 May  7  2021 vnstat.conf.bak
-rw-rw-rw-    1 marcis   root          3991 May  7  2021 vnstat.conf.default
In the Web GUI all sections, except for "Data usage" and "Compare usage" are filled. Only those 2 show "no data" regardless of their configs.
 

Attachments

  • Screenshot-3.png
    Screenshot-3.png
    204.6 KB · Views: 103
  • Screenshot-2.png
    Screenshot-2.png
    125.3 KB · Views: 104
  • Screenshot-1.png
    Screenshot-1.png
    322.1 KB · Views: 115
Yes, there is:
Code:
/jffs/addons/dn-vnstat.d:
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 .
drwxr-xr-x    7 marcis   root             0 Nov 15 23:41 ..
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 csv
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 images
drwxrwxrwx    2 marcis   root             0 Jul 19 11:50 v1
-rw-rw-rw-    1 marcis   root         72415 Aug 21 00:37 vnstat-ui.asp

/jffs/addons/dn-vnstat.d/csv:
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 .
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 ..
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_day_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_day_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_day_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_hour_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 WeekPrev.htm
-rw-rw-rw-    1 marcis   root           182 Nov 15 23:51 WeekSummary.htm
-rw-rw-rw-    1 marcis   root             0 Nov 15 23:51 WeekThis.htm
-rw-rw-rw-    1 marcis   root         97489 Nov 15 23:51 dn-vnstatdata.zip

/jffs/addons/dn-vnstat.d/images:
drwxrwxrwx    2 marcis   root             0 Nov 15 23:51 .
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 ..
-rw-rw-rw-    1 marcis   root          7569 Nov 15 23:51 .vnstat_d.htm
-rw-rw-rw-    1 marcis   root          1541 Jul 19 11:50 .vnstat_h.htm
-rw-rw-rw-    1 marcis   root          1631 Nov 15 23:51 .vnstat_hg.htm
-rw-rw-rw-    1 marcis   root          2902 Nov 15 23:51 .vnstat_m.htm
-rw-rw-rw-    1 marcis   root          3310 Nov 15 23:51 .vnstat_s.htm
-rw-rw-rw-    1 marcis   root          3521 Nov 15 23:51 .vnstat_t.htm
-rw-rw-rw-    1 marcis   root          7569 Nov 15 23:51 vnstat_d.png
-rw-rw-rw-    1 marcis   root          1541 Jul 19 11:50 vnstat_h.png
-rw-rw-rw-    1 marcis   root          1631 Nov 15 23:51 vnstat_hg.png
-rw-rw-rw-    1 marcis   root          2902 Nov 15 23:51 vnstat_m.png
-rw-rw-rw-    1 marcis   root          3310 Nov 15 23:51 vnstat_s.png
-rw-rw-rw-    1 marcis   root          3521 Nov 15 23:51 vnstat_t.png

/jffs/addons/dn-vnstat.d/v1:
drwxrwxrwx    2 marcis   root             0 Jul 19 11:50 .
drwxrwxrwx    5 marcis   root             0 Nov 15 23:52 ..
-rw-rw-rw-    1 marcis   root          2198 Jul 19 11:50 vnstat-data.bak
-rw-rw-rw-    1 marcis   root          3991 Jul 19 11:50 vnstat.conf
-rw-rw-rw-    1 marcis   root          3991 May  7  2021 vnstat.conf.bak
-rw-rw-rw-    1 marcis   root          3991 May  7  2021 vnstat.conf.default
In the Web GUI all sections, except for "Data usage" and "Compare usage" are filled. Only those 2 show "no data" regardless of their configs.
please try the following
Code:
rm -rf /jffs/addons/dn-vnstat.d/csv
rm -rf /opt/share/dn-vnstat.d/csv
then use option 1 of dn-vnstat CLI menu. csv directory should be re-created in /opt/share/dn-vnstat.d and hopefully non-0
if still 0, please run this command and share the contents of the file it creates
Code:
sh -x /jffs/scripts/dn-vnstat generate > output.txt 2>&1
 
Output text:
Code:
marcis@RT-AX68U:/tmp/home/root# ll /opt/share/dn-vnstat.d
-rw-r--r--    1 marcis   root           112 Nov 16 12:50 config
-rw-r--r--    1 marcis   root           112 Nov 15 23:40 config.bak
drwxrwxrwx    2 marcis   root          4096 Nov 16 12:50 csv/
drwxrwxrwx    2 marcis   root          4096 Nov 16 12:50 images/
drwxrwxrwx    2 marcis   root          4096 Jul 19 16:35 v1/
-rw-rw-rw-    1 marcis   root          4622 Sep 25 21:08 vnstat.conf
-rw-rw-rw-    1 marcis   root          4626 Aug 21 00:37 vnstat.conf.bak
-rw-rw-rw-    1 marcis   root          4631 Jul 19 16:35 vnstat.conf.default
-rw-rw-rw-    1 marcis   root          3048 Nov 16 12:50 vnstat.txt

marcis@RT-AX68U:/tmp/home/root# ll /opt/share/dn-vnstat.d/csv
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_day_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_day_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_day_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_hour_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 WeekPrev.htm
-rw-rw-rw-    1 marcis   root           182 Nov 16 12:55 WeekSummary.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 WeekThis.htm
-rw-rw-rw-    1 marcis   root         97962 Nov 16 12:55 dn-vnstatdata.zip
That's after i did commands you asked me to and regenerated stats.
Web GUI - no changes. Still shows "no data to display" in "Data usage" and "Compare usage" sections.
 
Output text:
Code:
marcis@RT-AX68U:/tmp/home/root# ll /opt/share/dn-vnstat.d
-rw-r--r--    1 marcis   root           112 Nov 16 12:50 config
-rw-r--r--    1 marcis   root           112 Nov 15 23:40 config.bak
drwxrwxrwx    2 marcis   root          4096 Nov 16 12:50 csv/
drwxrwxrwx    2 marcis   root          4096 Nov 16 12:50 images/
drwxrwxrwx    2 marcis   root          4096 Jul 19 16:35 v1/
-rw-rw-rw-    1 marcis   root          4622 Sep 25 21:08 vnstat.conf
-rw-rw-rw-    1 marcis   root          4626 Aug 21 00:37 vnstat.conf.bak
-rw-rw-rw-    1 marcis   root          4631 Jul 19 16:35 vnstat.conf.default
-rw-rw-rw-    1 marcis   root          3048 Nov 16 12:50 vnstat.txt

marcis@RT-AX68U:/tmp/home/root# ll /opt/share/dn-vnstat.d/csv
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_day_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_day_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_day_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_hour_daily.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 WeekPrev.htm
-rw-rw-rw-    1 marcis   root           182 Nov 16 12:55 WeekSummary.htm
-rw-rw-rw-    1 marcis   root             0 Nov 16 12:55 WeekThis.htm
-rw-rw-rw-    1 marcis   root         97962 Nov 16 12:55 dn-vnstatdata.zip
That's after i did commands you asked me to and regenerated stats.
Web GUI - no changes. Still shows "no data to display" in "Data usage" and "Compare usage" sections.
I think I see the issue. Can you share /opt/share/dn-vnstat.d/vnstat.conf
I think there's an issue in there affecting the csv generation
 
Code:
# vnStat 2.6 config file
##

# default interface (leave empty for automatic selection)
Interface ""

# location of the database directory
DatabaseDir "/opt/var/lib/vnstat"

# locale (LC_ALL) ("-" = use system locale)
Locale "-"

# date output formats for -d, -m, -t and -w
# see 'man date' for control codes
DayFormat "%Y-%m-%d"
MonthFormat "%Y-%m"
TopFormat "%Y-%m-%d"

# characters used for visuals
RXCharacter       "%"
TXCharacter       ":"
RXHourCharacter   "r"
TXHourCharacter   "t"

# how units are prefixed when traffic is shown
# 0 = IEC standard prefixes (KiB/MiB/GiB...)
# 1 = old style binary prefixes (KB/MB/GB...)
# 2 = SI decimal prefixes (kB/MB/GB...)
UnitMode 2

# used rate unit (0 = bytes, 1 = bits)
RateUnit 1

# how units are prefixed when traffic rate is shown in bits
# 0 = IEC binary prefixes (Kibit/s...)
# 1 = SI decimal prefixes (kbit/s...)
RateUnitMode 1

# output style
# 0 = minimal & narrow, 1 = bar column visible
# 2 = same as 1 except rate in summary
# 3 = rate column visible
OutputStyle 0

# number of decimals to use in outputs
DefaultDecimals 2
HourlyDecimals 2

# spacer for separating hourly sections (0 = none, 1 = '|', 2 = '][', 3 = '[ ]')
HourlySectionStyle 2

# how many seconds should sampling for -tr take by default
Sampletime 5

# default query mode
# 0 = normal, 1 = days, 2 = months, 3 = top, 5 = short
# 7 = hours, 8 = xml, 9 = one line, 10 = json
QueryMode 0

# default list output entry limits (0 = all)
List5Mins      24
ListHours      25
ListDays       31
ListMonths     12
ListYears       5
ListTop        10


# vnstatd
##

# switch to given user when started as root (leave empty to disable)
DaemonUser ""

# switch to given group when started as root (leave empty to disable)
DaemonGroup ""

# try to detect interface maximum bandwidth, 0 = disable feature
# MaxBandwidth will be used as fallback value when enabled
BandwidthDetection 1

# maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
# (unless interface specific limit is given)
MaxBandwidth 1000

# interface specific limits
#  example 8Mbit limit for 'ethnone':
MaxBWethnone 8

# data retention durations (-1 = unlimited, 0 = feature disabled)
5MinuteHours   720
HourlyDays     31
DailyDays      31
MonthlyMonths  13
YearlyYears    -1
TopDayEntries  15

# how often (in seconds) interface data is updated
UpdateInterval 30

# how often (in seconds) interface status changes are checked
PollInterval 30

# how often (in minutes) data is saved to database
SaveInterval 1

# how often (in minutes) data is saved when all interface are offline
OfflineSaveInterval 5

# on which day should months change
MonthRotate 1
MonthRotateAffectsYears 0

# filesystem disk space check (1 = enabled, 0 = disabled)
CheckDiskSpace 1

# how much the boot time can variate between updates (seconds)
BootVariation 15

# create database entries even when there is no traffic (1 = enabled, 0 = disabled)
TrafficlessEntries 1

# how many minutes to wait during daemon startup for system clock to
# sync time if most recent database update appears to be in the future
TimeSyncWait 10

# how often (in minutes) bandwidth detection is done when
# BandwidthDetection is enabled (0 = disabled)
BandwidthDetectionInterval 0

# force data save when interface status changes (1 = enabled, 0 = disabled)
SaveOnStatusChange 1

# enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog)
UseLogging 1

# create dirs if needed (1 = enabled, 0 = disabled)
CreateDirs 1

# update ownership of files if needed (1 = enabled, 0 = disabled)
UpdateFileOwner 1

# file used for logging if UseLogging is set to 1
LogFile "/opt/var/log/vnstat.log"

# file used as daemon pid / lock file
PidFile "/opt/var/run/vnstat.pid"

# 1 = 64-bit, 0 = 32-bit, -1 = old style logic, -2 = automatic detection
64bitInterfaceCounters -2

# use SQLite Write-Ahead Logging mode (1 = enabled, 0 = disabled)
DatabaseWriteAheadLogging 1

# change the setting of the SQLite "synchronous" flag
# (-1 = auto, 0 = off, 1, = normal, 2 = full, 3 = extra)
DatabaseSynchronous -1


# vnstati
##

# title timestamp format
HeaderFormat "%d-%b-%Y %H:%M"

# show hours with rate (1 = enabled, 0 = disabled)
HourlyRate 0

# show rate in summary (1 = enabled, 0 = disabled)
SummaryRate 0

# transparent background (1 = enabled, 0 = disabled)
TransparentBg 0

# image colors
CBackground     "475A5F"
CEdge           "475A5F"
CHeader         "475A5F"
CHeaderTitle    "FFFFFF"
CHeaderDate     "EAE303"
CText           "FFFFFF"
CLine           "B0B0B0"
CLineL          "EAE303"
CRx             "C5C5CE"
CTx             "0EC009"
CRxD            "-"
CTxD            "-"
 
Code:
# vnStat 2.6 config file
##

# default interface (leave empty for automatic selection)
Interface ""

# location of the database directory
DatabaseDir "/opt/var/lib/vnstat"

# locale (LC_ALL) ("-" = use system locale)
Locale "-"

# date output formats for -d, -m, -t and -w
# see 'man date' for control codes
DayFormat "%Y-%m-%d"
MonthFormat "%Y-%m"
TopFormat "%Y-%m-%d"

# characters used for visuals
RXCharacter       "%"
TXCharacter       ":"
RXHourCharacter   "r"
TXHourCharacter   "t"

# how units are prefixed when traffic is shown
# 0 = IEC standard prefixes (KiB/MiB/GiB...)
# 1 = old style binary prefixes (KB/MB/GB...)
# 2 = SI decimal prefixes (kB/MB/GB...)
UnitMode 2

# used rate unit (0 = bytes, 1 = bits)
RateUnit 1

# how units are prefixed when traffic rate is shown in bits
# 0 = IEC binary prefixes (Kibit/s...)
# 1 = SI decimal prefixes (kbit/s...)
RateUnitMode 1

# output style
# 0 = minimal & narrow, 1 = bar column visible
# 2 = same as 1 except rate in summary
# 3 = rate column visible
OutputStyle 0

# number of decimals to use in outputs
DefaultDecimals 2
HourlyDecimals 2

# spacer for separating hourly sections (0 = none, 1 = '|', 2 = '][', 3 = '[ ]')
HourlySectionStyle 2

# how many seconds should sampling for -tr take by default
Sampletime 5

# default query mode
# 0 = normal, 1 = days, 2 = months, 3 = top, 5 = short
# 7 = hours, 8 = xml, 9 = one line, 10 = json
QueryMode 0

# default list output entry limits (0 = all)
List5Mins      24
ListHours      25
ListDays       31
ListMonths     12
ListYears       5
ListTop        10


# vnstatd
##

# switch to given user when started as root (leave empty to disable)
DaemonUser ""

# switch to given group when started as root (leave empty to disable)
DaemonGroup ""

# try to detect interface maximum bandwidth, 0 = disable feature
# MaxBandwidth will be used as fallback value when enabled
BandwidthDetection 1

# maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
# (unless interface specific limit is given)
MaxBandwidth 1000

# interface specific limits
#  example 8Mbit limit for 'ethnone':
MaxBWethnone 8

# data retention durations (-1 = unlimited, 0 = feature disabled)
5MinuteHours   720
HourlyDays     31
DailyDays      31
MonthlyMonths  13
YearlyYears    -1
TopDayEntries  15

# how often (in seconds) interface data is updated
UpdateInterval 30

# how often (in seconds) interface status changes are checked
PollInterval 30

# how often (in minutes) data is saved to database
SaveInterval 1

# how often (in minutes) data is saved when all interface are offline
OfflineSaveInterval 5

# on which day should months change
MonthRotate 1
MonthRotateAffectsYears 0

# filesystem disk space check (1 = enabled, 0 = disabled)
CheckDiskSpace 1

# how much the boot time can variate between updates (seconds)
BootVariation 15

# create database entries even when there is no traffic (1 = enabled, 0 = disabled)
TrafficlessEntries 1

# how many minutes to wait during daemon startup for system clock to
# sync time if most recent database update appears to be in the future
TimeSyncWait 10

# how often (in minutes) bandwidth detection is done when
# BandwidthDetection is enabled (0 = disabled)
BandwidthDetectionInterval 0

# force data save when interface status changes (1 = enabled, 0 = disabled)
SaveOnStatusChange 1

# enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog)
UseLogging 1

# create dirs if needed (1 = enabled, 0 = disabled)
CreateDirs 1

# update ownership of files if needed (1 = enabled, 0 = disabled)
UpdateFileOwner 1

# file used for logging if UseLogging is set to 1
LogFile "/opt/var/log/vnstat.log"

# file used as daemon pid / lock file
PidFile "/opt/var/run/vnstat.pid"

# 1 = 64-bit, 0 = 32-bit, -1 = old style logic, -2 = automatic detection
64bitInterfaceCounters -2

# use SQLite Write-Ahead Logging mode (1 = enabled, 0 = disabled)
DatabaseWriteAheadLogging 1

# change the setting of the SQLite "synchronous" flag
# (-1 = auto, 0 = off, 1, = normal, 2 = full, 3 = extra)
DatabaseSynchronous -1


# vnstati
##

# title timestamp format
HeaderFormat "%d-%b-%Y %H:%M"

# show hours with rate (1 = enabled, 0 = disabled)
HourlyRate 0

# show rate in summary (1 = enabled, 0 = disabled)
SummaryRate 0

# transparent background (1 = enabled, 0 = disabled)
TransparentBg 0

# image colors
CBackground     "475A5F"
CEdge           "475A5F"
CHeader         "475A5F"
CHeaderTitle    "FFFFFF"
CHeaderDate     "EAE303"
CText           "FFFFFF"
CLine           "B0B0B0"
CLineL          "EAE303"
CRx             "C5C5CE"
CTx             "0EC009"
CRxD            "-"
CTxD            "-"
That's the problem - Interface is empty. While vnstat allows empty, the script expects an interface. Please set the interface you use (i guess eth0) and try again.

Strange that it's empty, as the installer prompts for an interface. Did you manually edit the file to remove it?
 
I did edit it for something which i can't remember what it was. Maybe it was me...
Do i need to restart vnstat or do something else to make it re-read config file?

It is a bit confusing, because it states:
# default interface (leave empty for automatic selection)

Which seems like that's okay to leave it empty.
 
Thanks a lot @Yack Yaz! :)
Works now!
I regenerated stats and files are having non-0 sizes now:
Code:
ll /opt/share/dn-vnstat.d/csv
-rw-rw-rw-    1 marcis   root            77 Nov 16 15:00 DataUsage_day_daily.htm
-rw-rw-rw-    1 marcis   root          1791 Nov 16 15:00 DataUsage_day_monthly.htm
-rw-rw-rw-    1 marcis   root           434 Nov 16 15:00 DataUsage_day_weekly.htm
-rw-rw-rw-    1 marcis   root         15138 Nov 16 15:00 DataUsage_fiveminute_daily.htm
-rw-rw-rw-    1 marcis   root        456324 Nov 16 15:00 DataUsage_fiveminute_monthly.htm
-rw-rw-rw-    1 marcis   root        106911 Nov 16 15:00 DataUsage_fiveminute_weekly.htm
-rw-rw-rw-    1 marcis   root          1292 Nov 16 15:00 DataUsage_hour_daily.htm
-rw-rw-rw-    1 marcis   root         39892 Nov 16 15:00 DataUsage_hour_monthly.htm
-rw-rw-rw-    1 marcis   root          9321 Nov 16 15:00 DataUsage_hour_weekly.htm
-rw-rw-rw-    1 marcis   root           432 Nov 16 15:00 WeekPrev.htm
-rw-rw-rw-    1 marcis   root           233 Nov 16 15:00 WeekSummary.htm
-rw-rw-rw-    1 marcis   root           434 Nov 16 15:00 WeekThis.htm
-rw-rw-rw-    1 marcis   root         98003 Nov 16 14:59 dn-vnstatdata.zip
 

Attachments

  • Screenshot 2021-11-16 150152.png
    Screenshot 2021-11-16 150152.png
    245.2 KB · Views: 108
I did edit it for something which i can't remember what it was. Maybe it was me...
Do i need to restart vnstat or do something else to make it re-read config file?

It is a bit confusing, because it states:
# default interface (leave empty for automatic selection)

Which seems like that's okay to leave it empty.
it's OK for the vnstat application but not my code, which assumes an interface has been specified in config (as the db may contain multiple interfaces, so config was most sensible to assume is correct)
 
Thanks again @Jack Yaz ! Enjoy your coffee! ;)
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top