What's new

vnStat [Release] vnStat-on-Merlin - UI, CLI and email - data use and data limit monitoring - R1 and R2

  • 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!

Actually, one minor glitch. I changed my limit from 1000 GB to 1.0 TB, and now see this:
Code:
You have used 2535.00% (25.35TB) of your 1.00TB cycle allowance; the next cycle starts on day 1 of the month.

I have actually only used 24.35 GB.
Sorry to repost, but I am still seeing this (now up to 11515% over!). Will this reset at the end of this month?
 
Last edited:
can you provide full reproduction steps? i can't see anything obvious in the code why this is the case.
I simply changed to USB once it became available, and shortly thereafter, graphs were missing for both Data Usage and Compare Usage. Going back to JFFS (and updating stats) resolved the issue.

I also noticed that the time format cannot be toggled from non-UNIX to UNIX via the web UI -- it doesn't stick when saved.
 
I simply changed to USB once it became available, and shortly thereafter, graphs were missing for both Data Usage and Compare Usage. Going back to JFFS (and updating stats) resolved the issue.

I also noticed that the time format cannot be toggled from non-UNIX to UNIX via the web UI -- it doesn't stick when saved.
I've just bounced between JFFS and USB a few times and data and all files move across fine with WebUI charts working after each move.
it sounds like your config might be corrupted. let's check
Code:
ls -la /jffs/addons/dn-vnstat.d
ls -la /opt/share/dn-vnstat.d

I can see the issue with the unix/non-unix setting which I'll fix
 
I simply changed to USB once it became available, and shortly thereafter, graphs were missing for both Data Usage and Compare Usage. Going back to JFFS (and updating stats) resolved the issue.

I also noticed that the time format cannot be toggled from non-UNIX to UNIX via the web UI -- it doesn't stick when saved.
Code:
# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root             0 Jul 28 15:20 .
drwxr-xr-x   14 TheS1R   root             0 Jul 28 05:20 ..
-rw-rw-rw-    1 TheS1R   root             0 Jul 18 22:57 .v2upgraded
-rw-rw-rw-    1 TheS1R   root           206 Jul 28 15:20 .vnstatusage
-rw-r--r--    1 TheS1R   root            89 Jul 28 15:20 config
-rw-r--r--    1 TheS1R   root            88 Jul 28 01:55 config.bak
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:20 csv
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:20 images
drwxrwxrwx    2 TheS1R   root             0 Jul 18 22:57 v1
-rw-rw-rw-    1 TheS1R   root             0 Jun 30 20:37 vnstat-data.bak
-rw-rw-rw-    1 TheS1R   root         53566 Jul 18 22:57 vnstat-ui.asp
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:55 vnstat.conf
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:54 vnstat.conf.bak
-rw-rw-rw-    1 TheS1R   root          4631 Jul 18 22:57 vnstat.conf.default
-rw-rw-rw-    1 TheS1R   root          3107 Jul 28 15:20 vnstat.txt

# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root          4096 Jul 28 01:55 .
drwxr-xr-x   12 TheS1R   root          4096 Jul 18 22:58 ..
-rw-rw-rw-    1 TheS1R   root             0 Jul 28 01:55 .v2upgraded
-rw-rw-rw-    1 TheS1R   root           199 Jul 28 01:55 .vnstatusage
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 csv
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 images
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 v1
-rw-rw-rw-    1 TheS1R   root          4627 Jul 28 01:55 vnstat.conf
-rw-rw-rw-    1 TheS1R   root          4631 Jul 28 01:55 vnstat.conf.default
-rw-rw-rw-    1 TheS1R   root          3054 Jul 28 01:55 vnstat.txt
 
Last edited:
Toggling back to USB changes the output:

Code:
# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root             0 Jul 28 15:26 .
drwxr-xr-x   14 TheS1R   root             0 Jul 28 05:20 ..
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:25 csv
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:25 images
drwxrwxrwx    2 TheS1R   root             0 Jul 18 22:57 v1
-rw-rw-rw-    1 TheS1R   root             0 Jun 30 20:37 vnstat-data.bak
-rw-rw-rw-    1 TheS1R   root         53566 Jul 18 22:57 vnstat-ui.asp
# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root          4096 Jul 28 15:26 .
drwxr-xr-x   12 TheS1R   root          4096 Jul 18 22:58 ..
-rw-rw-rw-    1 TheS1R   root             0 Jul 18 22:57 .v2upgraded
-rw-rw-rw-    1 TheS1R   root           206 Jul 28 15:25 .vnstatusage
-rw-r--r--    1 TheS1R   root            88 Jul 28 15:26 config
-rw-r--r--    1 TheS1R   root            88 Jul 28 01:55 config.bak
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 csv
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 images
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 v1
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:55 vnstat.conf
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:54 vnstat.conf.bak
-rw-rw-rw-    1 TheS1R   root          4631 Jul 18 22:57 vnstat.conf.default
-rw-rw-rw-    1 TheS1R   root          3107 Jul 28 15:25 vnstat.txt
 
Toggling back to USB changes the output:

Code:
# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root             0 Jul 28 15:26 .
drwxr-xr-x   14 TheS1R   root             0 Jul 28 05:20 ..
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:25 csv
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:25 images
drwxrwxrwx    2 TheS1R   root             0 Jul 18 22:57 v1
-rw-rw-rw-    1 TheS1R   root             0 Jun 30 20:37 vnstat-data.bak
-rw-rw-rw-    1 TheS1R   root         53566 Jul 18 22:57 vnstat-ui.asp
# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root          4096 Jul 28 15:26 .
drwxr-xr-x   12 TheS1R   root          4096 Jul 18 22:58 ..
-rw-rw-rw-    1 TheS1R   root             0 Jul 18 22:57 .v2upgraded
-rw-rw-rw-    1 TheS1R   root           206 Jul 28 15:25 .vnstatusage
-rw-r--r--    1 TheS1R   root            88 Jul 28 15:26 config
-rw-r--r--    1 TheS1R   root            88 Jul 28 01:55 config.bak
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 csv
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 images
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 v1
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:55 vnstat.conf
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:54 vnstat.conf.bak
-rw-rw-rw-    1 TheS1R   root          4631 Jul 18 22:57 vnstat.conf.default
-rw-rw-rw-    1 TheS1R   root          3107 Jul 28 15:25 vnstat.txt
are you sure you're on the latest version? i ask as
Code:
mv "/jffs/addons/$SCRIPT_NAME.d/csv" "/opt/share/$SCRIPT_NAME.d/" 2>/dev/null
mv "/jffs/addons/$SCRIPT_NAME.d/images" "/opt/share/$SCRIPT_NAME.d/" 2>/dev/null
mv "/jffs/addons/$SCRIPT_NAME.d/v1" "/opt/share/$SCRIPT_NAME.d/" 2>/dev/null
moves those directories - there's no reason why they should be left behind
 
Toggling back to USB changes the output:

Code:
# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root             0 Jul 28 15:26 .
drwxr-xr-x   14 TheS1R   root             0 Jul 28 05:20 ..
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:25 csv
drwxrwxrwx    2 TheS1R   root             0 Jul 28 15:25 images
drwxrwxrwx    2 TheS1R   root             0 Jul 18 22:57 v1
-rw-rw-rw-    1 TheS1R   root             0 Jun 30 20:37 vnstat-data.bak
-rw-rw-rw-    1 TheS1R   root         53566 Jul 18 22:57 vnstat-ui.asp
# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 TheS1R   root          4096 Jul 28 15:26 .
drwxr-xr-x   12 TheS1R   root          4096 Jul 18 22:58 ..
-rw-rw-rw-    1 TheS1R   root             0 Jul 18 22:57 .v2upgraded
-rw-rw-rw-    1 TheS1R   root           206 Jul 28 15:25 .vnstatusage
-rw-r--r--    1 TheS1R   root            88 Jul 28 15:26 config
-rw-r--r--    1 TheS1R   root            88 Jul 28 01:55 config.bak
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 csv
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 images
drwxrwxrwx    2 TheS1R   root          4096 Jul 28 01:55 v1
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:55 vnstat.conf
-rw-rw-rw-    1 TheS1R   root          4667 Jul 28 01:54 vnstat.conf.bak
-rw-rw-rw-    1 TheS1R   root          4631 Jul 18 22:57 vnstat.conf.default
-rw-rw-rw-    1 TheS1R   root          3107 Jul 28 15:25 vnstat.txt
in any case, deleting
Code:
csv
images
v1
vnstat-data.bak
from /jffs/addons/dn-vnstat.d now that you've moved to usb should clear everything up
 
are you sure you're on the latest version? i ask as
Code:
mv "/jffs/addons/$SCRIPT_NAME.d/csv" "/opt/share/$SCRIPT_NAME.d/" 2>/dev/null
mv "/jffs/addons/$SCRIPT_NAME.d/images" "/opt/share/$SCRIPT_NAME.d/" 2>/dev/null
mv "/jffs/addons/$SCRIPT_NAME.d/v1" "/opt/share/$SCRIPT_NAME.d/" 2>/dev/null
moves those directories - there's no reason why they should be left behind
v2.0.0 with latest hotfix on multiple routers/networks...
 
in any case, deleting
Code:
csv
images
v1
vnstat-data.bak
from /jffs/addons/dn-vnstat.d now that you've moved to usb should clear everything up
That appears to work! Thanks again for all that you do.
 
@Jack Yaz Mine still doesn't show data. Even after deleting the files manually, files get written back in jffs and I see a copy in opt too-
Code:
quebec@RT-AC68U-20E0:/tmp/home/root# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    4 quebec   root             0 Jul 29 08:44 .
drwxr-xr-x   13 quebec   root             0 Jul 28 17:59 ..
-rw-rw-rw-    1 quebec   root             0 Jul 23 08:14 .v2upgraded
-rw-rw-rw-    1 quebec   root           228 Jul 28 17:04 .vnstatusage
-rw-r--r--    1 quebec   root            90 Jul 29 08:44 config
-rw-r--r--    1 quebec   root            91 Jul 28 17:00 config.bak
drwxrwxrwx    2 quebec   root             0 Jul 29 08:40 csv
drwxrwxrwx    2 quebec   root             0 Jul 29 08:40 images
-rw-rw-rw-    1 quebec   root         53566 Jul 23 08:14 vnstat-ui.asp
-rw-rw-rw-    1 quebec   root          4633 Jul 28 17:04 vnstat.conf
-rw-rw-rw-    1 quebec   root          4633 Jul 23 08:14 vnstat.conf.bak
-rw-rw-rw-    1 quebec   root          4631 Jul 23 08:14 vnstat.conf.default
-rw-rw-rw-    1 quebec   root          3009 Jul 28 17:00 vnstat.txt
quebec@RT-AC68U-20E0:/tmp/home/root# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 quebec   root          4096 Jul 28 17:05 .
drwxr-xr-x   11 quebec   root          4096 Jul 28 17:05 ..
-rw-rw-rw-    1 quebec   root             0 Jul 28 17:05 .v2upgraded
-rw-rw-rw-    1 quebec   root           228 Jul 29 08:44 .vnstatusage
drwxrwxrwx    2 quebec   root          4096 Jul 29 08:44 csv
drwxrwxrwx    2 quebec   root          4096 Jul 29 08:44 images
drwxrwxrwx    2 quebec   root          4096 Jul 28 17:05 v1
-rw-rw-rw-    1 quebec   root          4627 Jul 28 18:06 vnstat.conf
-rw-rw-rw-    1 quebec   root          4631 Jul 28 17:05 vnstat.conf.default
-rw-rw-rw-    1 quebec   root          3009 Jul 29 08:44 vnstat.txt
 
@Jack Yaz Mine still doesn't show data. Even after deleting the files manually, files get written back in jffs and I see a copy in opt too-
Code:
quebec@RT-AC68U-20E0:/tmp/home/root# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    4 quebec   root             0 Jul 29 08:44 .
drwxr-xr-x   13 quebec   root             0 Jul 28 17:59 ..
-rw-rw-rw-    1 quebec   root             0 Jul 23 08:14 .v2upgraded
-rw-rw-rw-    1 quebec   root           228 Jul 28 17:04 .vnstatusage
-rw-r--r--    1 quebec   root            90 Jul 29 08:44 config
-rw-r--r--    1 quebec   root            91 Jul 28 17:00 config.bak
drwxrwxrwx    2 quebec   root             0 Jul 29 08:40 csv
drwxrwxrwx    2 quebec   root             0 Jul 29 08:40 images
-rw-rw-rw-    1 quebec   root         53566 Jul 23 08:14 vnstat-ui.asp
-rw-rw-rw-    1 quebec   root          4633 Jul 28 17:04 vnstat.conf
-rw-rw-rw-    1 quebec   root          4633 Jul 23 08:14 vnstat.conf.bak
-rw-rw-rw-    1 quebec   root          4631 Jul 23 08:14 vnstat.conf.default
-rw-rw-rw-    1 quebec   root          3009 Jul 28 17:00 vnstat.txt
quebec@RT-AC68U-20E0:/tmp/home/root# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 quebec   root          4096 Jul 28 17:05 .
drwxr-xr-x   11 quebec   root          4096 Jul 28 17:05 ..
-rw-rw-rw-    1 quebec   root             0 Jul 28 17:05 .v2upgraded
-rw-rw-rw-    1 quebec   root           228 Jul 29 08:44 .vnstatusage
drwxrwxrwx    2 quebec   root          4096 Jul 29 08:44 csv
drwxrwxrwx    2 quebec   root          4096 Jul 29 08:44 images
drwxrwxrwx    2 quebec   root          4096 Jul 28 17:05 v1
-rw-rw-rw-    1 quebec   root          4627 Jul 28 18:06 vnstat.conf
-rw-rw-rw-    1 quebec   root          4631 Jul 28 17:05 vnstat.conf.default
-rw-rw-rw-    1 quebec   root          3009 Jul 29 08:44 vnstat.txt
set to jffs, then delete the whole opt/share/dn-vnstat.d directory
Code:
rm -rf /opt/share/dn-vnstat.d
post contents of your config file
Code:
cat /jffs/addons/dn-vnstat.d/config
then try moving to USB again
 
set to jffs, then delete the whole opt/share/dn-vnstat.d directory
Code:
rm -rf /opt/share/dn-vnstat.d
post contents of your config file
Code:
cat /jffs/addons/dn-vnstat.d/config
then try moving to USB again
Done & this is config file before & after changing to USB. I could see stats for a minute after changing to USB but bit anymore.
Code:
DAILYEMAIL=none
DATAALLOWANCE=600.00
USAGEEMAIL=false
ALLOWANCEUNIT=G
STORAGELOCATION=jffs

DAILYEMAIL=none
DATAALLOWANCE=600.00
USAGEEMAIL=false
ALLOWANCEUNIT=G
STORAGELOCATION=usb
 
Done & this is config file before & after changing to USB. I could see stats for a minute after changing to USB but bit anymore.
Code:
DAILYEMAIL=none
DATAALLOWANCE=600.00
USAGEEMAIL=false
ALLOWANCEUNIT=G
STORAGELOCATION=jffs

DAILYEMAIL=none
DATAALLOWANCE=600.00
USAGEEMAIL=false
ALLOWANCEUNIT=G
STORAGELOCATION=usb
for some reason you have duplicated contents in your config file. delete all of the duplicate lines, but ensure STORAGELOCATION is set to where the files have been moved to
 
for some reason you have duplicated contents in your config file. delete all of the duplicate lines, but ensure STORAGELOCATION is set to where the files have been moved to
It's not duplicated, I opened the file & pasted contents before & after changing to USB. This is what I see-
Code:
DAILYEMAIL=none
DATAALLOWANCE=600.00
USAGEEMAIL=false
ALLOWANCEUNIT=G
STORAGELOCATION=usb
 
It's not duplicated, I opened the file & pasted contents before & after changing to USB. This is what I see-
Code:
DAILYEMAIL=none
DATAALLOWANCE=600.00
USAGEEMAIL=false
ALLOWANCEUNIT=G
STORAGELOCATION=usb
Apologies, that wasn't clear. What do the directories look like now? I note you said that the charts are no longer working, so i wonder if something is resetting itself
 
Apologies, that wasn't clear. What do the directories look like now? I note you said that the charts are no longer working, so i wonder if something is resetting itself
Code:
quebec@RT-AC68U-20E0:/tmp/home/root# ls -la /jffs/addons/dn-vnstat.d
drwxrwxrwx    5 quebec   root             0 Jul 29 09:40 .
drwxr-xr-x   13 quebec   root             0 Jul 29 09:06 ..
-rw-rw-rw-    1 quebec   root             0 Jul 23 08:14 .v2upgraded
-rw-rw-rw-    1 quebec   root           228 Jul 29 09:06 .vnstatusage
-rw-r--r--    1 quebec   root            90 Jul 29 09:40 config
-rw-r--r--    1 quebec   root            91 Jul 29 09:05 config.bak
drwxrwxrwx    2 quebec   root             0 Jul 29 09:05 csv
drwxrwxrwx    2 quebec   root             0 Jul 29 09:05 images
drwxrwxrwx    2 quebec   root             0 Jul 29 09:05 v1
-rw-rw-rw-    1 quebec   root         53566 Jul 23 08:14 vnstat-ui.asp
-rw-rw-rw-    1 quebec   root          4633 Jul 29 09:06 vnstat.conf
-rw-rw-rw-    1 quebec   root          4633 Jul 29 09:04 vnstat.conf.bak
-rw-rw-rw-    1 quebec   root          4631 Jul 23 08:14 vnstat.conf.default
-rw-rw-rw-    1 quebec   root          3009 Jul 29 09:05 vnstat.txt
quebec@RT-AC68U-20E0:/tmp/home/root# ls -la /opt/share/dn-vnstat.d
drwxrwxrwx    5 quebec   root          4096 Jul 29 09:09 .
drwxr-xr-x   11 quebec   root          4096 Jul 29 09:09 ..
-rw-rw-rw-    1 quebec   root             0 Jul 29 09:09 .v2upgraded
-rw-rw-rw-    1 quebec   root           228 Jul 29 09:40 .vnstatusage
drwxrwxrwx    2 quebec   root          4096 Jul 29 09:40 csv
drwxrwxrwx    2 quebec   root          4096 Jul 29 09:40 images
drwxrwxrwx    2 quebec   root          4096 Jul 29 09:09 v1
-rw-rw-rw-    1 quebec   root          4627 Jul 29 09:09 vnstat.conf
-rw-rw-rw-    1 quebec   root          4631 Jul 29 09:09 vnstat.conf.default
-rw-rw-rw-    1 quebec   root          3009 Jul 29 09:40 vnstat.txt
 

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