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!

How often are the stats updated and where is it specified? Is it a script that runs to update the stats?(out of curiosity). Just trying to understand how scripts work?
If you read through the vnStat-on-Merlin landing page here, you'll see some explanation on how I original designed the script (pre-R1). The R1 and R2 releases were built with Jack Yaz's assistance and automate (and in R2, significantly enhance) the stats presented.

To answer your specific question: every 5 minutes for regular usage and at 23:59 for daily stats, both via cron jobs (also described on the landing page; see the non-UI configuration steps here).
 
Hi, is there a way to transfer stats from one router to another? In my case, I upgraded my router and was wondering if there’s a way I could keep the stats. Thanks!
 
Thank you very much for this. Missed it when I searched the thread.

I copied over vnstat.db as per the post but it’s giving me a “eth4 not found in database” error. Noticed that vnstat was reading the wan as eth0 on the old router but eth4 on the new one.

Any ideas guys? Thanks again!

I think you're out of luck since the data is kept by interface and there is not an export > import function in vnStat 2.x (the underlying program).
 
Thanks for this wonderful utility.

I’ve been using it a couple days - the tx and rx numbers look kind of suspicious, they’re always similar. I don’t believe that streaming 13 GB of video at 9pm also resulted in 13 GB of uploads.

Can someone give me a clue as to why or where to debug?

Code:
     hour        rx      |     tx      |    total
-------------------------+-------------+------------
 2021-12-10
     15:00     390.33 MB |   111.38 MB |   501.71 MB
     16:00       1.48 GB |     1.34 GB |     2.82 GB
     17:00     261.68 MB |   189.65 MB |   451.33 MB
     18:00     501.18 MB |   311.49 MB |   812.67 MB
     19:00       5.79 GB |     5.77 GB |    11.56 GB
     20:00      10.09 GB |     9.77 GB |    19.86 GB
     21:00      13.18 GB |    13.16 GB |    26.34 GB
     22:00       5.13 GB |     3.94 GB |     9.06 GB
     23:00       3.20 GB |     3.08 GB |     6.28 GB
 2021-12-11
     00:00       2.49 GB |     2.48 GB |     4.98 GB
     01:00     440.80 MB |   434.43 MB |   875.23 MB
     02:00       2.14 GB |     2.13 GB |     4.27 GB
     03:00       2.78 GB |     2.76 GB |     5.54 GB
     04:00     366.45 MB |   348.32 MB |   714.77 MB
     05:00     213.47 MB |   205.48 MB |   418.95 MB
     06:00      30.93 MB |    45.06 MB |    75.99 MB
     07:00      47.01 MB |    43.68 MB |    90.69 MB
     08:00       1.19 GB |     1.19 GB |     2.38 GB
     09:00       1.17 GB |     1.16 GB |     2.33 GB
     10:00     401.51 MB |   447.30 MB |   848.81 MB
     11:00      27.19 MB |    27.68 MB |    54.88 MB
     12:00      30.07 MB |    27.77 MB |    57.85 MB
     13:00      21.11 MB |    16.08 MB |    37.19 MB
     14:00     124.72 MB |   118.68 MB |   243.40 MB
     15:00      27.86 MB |    26.23 MB |    54.09 MB
 
Thanks for this wonderful utility.

I’ve been using it a couple days - the tx and rx numbers look kind of suspicious, they’re always similar. I don’t believe that streaming 13 GB of video at 9pm also resulted in 13 GB of uploads.

Can someone give me a clue as to why or where to debug?
What's your setup (connection type) and do you have hardware acceleration enabled? What interface is being monitored?

Any setting that bypasses the IP stack will give unreliable results.

Check Tools > Sysinfo - HW acceleration | Runner: Disabled - Flow Cache: Disabled
 
What's your setup (connection type) and do you have hardware acceleration enabled? What interface is being monitored?

Any setting that bypasses the IP stack will give unreliable results.

Check Tools > Sysinfo - HW acceleration | Runner: Disabled - Flow Cache: Disabled
Ah of course.

I had read this earlier but forgot about it. Thanks for the tip.
 
I disabled acceleration:
1639320505438.png


But the numbers are still weirdly symmetric.
Code:
2021-12-12
     00:00       9.41 GB |     9.34 GB |    18.76 GB
     01:00     701.40 MB |   679.26 MB |     1.38 GB
     02:00       1.90 GB |     1.88 GB |     3.78 GB
     03:00       3.31 GB |     3.29 GB |     6.60 GB
     04:00      94.60 MB |    39.46 MB |   134.06 MB
     05:00     418.48 MB |   412.00 MB |   830.48 MB
     06:00      86.04 MB |    94.80 MB |   180.84 MB
     07:00      63.72 MB |    57.87 MB |   121.59 MB
     08:00     172.26 MB |   129.33 MB |   301.59 MB

I’m monitoring eth0, which ifconfig shows to be my external IP.

I turned off HW acceleration some time around 23:30 and rebooted.
1639321078151.png


The Asus traffic analyzer seems to at least correlate to what I expect tx and rx patterns to be at the different times, even though I’m not confident in the absolute y axis number.
1639321244155.png
 
The first thing I'd suggest is uninstalling the app, don't preserve the settings or data when prompted, reboot and reinstall dn-vnstat.

It looks like it's still monitoring your VLAN for some reason.
 
The first thing I'd suggest is uninstalling the app, don't preserve the settings or data when prompted, reboot and reinstall dn-vnstat.

It looks like it's still monitoring your VLAN for some reason.
Thanks, I’ll give this a shot and see how it performs over the next day.
 
After deleting vnStat, rebooting, and reinstalling - I’m still getting the same issue.

Here’s the Asus Traffic Analyzer showing my overnight backups ran:
1639408419894.png



And here’s vnStat showing tx and rx lines on top of each other.
1639408333505.png


Is there something unique about my configuration that could cause this?
I’m running this on RT-AC66U B1 on Merlin 386.3_2 as AiMesh router with DoT, LAN br1, plus Asus built-in guest network br2 (currently no clients). Scripts are vnStat, Diversion (disabled), and nothing else.

Edit: could I have a file permissions issue that could cause this?
 
Last edited:
Yesterday after the numerous Entware updates were installed, my stats stopped updating. I forced an update which didn't help but it did generate the following:

Code:
vnstati: error while loading shared libraries: libwebpdecoder.so.4.1.1: cannot open shared object file: No such file or directory

Did the Entware updates possibly break something?
 
Yesterday after the numerous Entware updates were installed, my stats stopped updating. I forced an update which didn't help but it did generate the following:

Code:
vnstati: error while loading shared libraries: libwebpdecoder.so.4.1.1: cannot open shared object file: No such file or directory

Did the Entware updates possibly break something?
I also updated my Entware packages yesterday before I reinstalled vnStat (above post) but I don’t see any error messages like yours.
 
After deleting vnStat, rebooting, and reinstalling - I’m still getting the same issue.
Ok! I repeated these steps this morning, but instead of reinstalling vnStat with amtm, I used the curl command from GitHub. Now it seems to be working!

1639418252690.png
 
Yesterday after the numerous Entware updates were installed, my stats stopped updating. I forced an update which didn't help but it did generate the following:

Code:
vnstati: error while loading shared libraries: libwebpdecoder.so.4.1.1: cannot open shared object file: No such file or directory

Did the Entware updates possibly break something?
Same error code here after I updated Entware packages. So there is an error and some graphs are not being updated (Monthly usage, weekly usage and daily usage).

The other stats seems ok and updated.

Forcing vn-stat update (uf) didn’t solve the problem.

edit. “Summary of all usage“ and “Top 10 usage“ are not being updated too.
 
Last edited:
After deleting vnStat, rebooting, and reinstalling - I’m still getting the same issue.

Here’s the Asus Traffic Analyzer showing my overnight backups ran:


And here’s vnStat showing tx and rx lines on top of each other.


Is there something unique about my configuration that could cause this?
I’m running this on RT-AC66U B1 on Merlin 386.3_2 as AiMesh router with DoT, LAN br1, plus Asus built-in guest network br2 (currently no clients). Scripts are vnStat, Diversion (disabled), and nothing else.

Edit: could I have a file permissions issue that could cause this?
I'm not sure, I need to think about it a bit, we've really not seen anything quite the same. You seem to have a minimal setup, it might be worth considering a full reset to see if that helps, but before you do that, let me poke around on my test router a bit. Seems odd...
 
Yesterday after the numerous Entware updates were installed, my stats stopped updating. I forced an update which didn't help but it did generate the following:

Code:
vnstati: error while loading shared libraries: libwebpdecoder.so.4.1.1: cannot open shared object file: No such file or directory

Did the Entware updates possibly break something?
Same error code here after I updated Entware packages. So there is an error and some graphs are not being updated (Monthly usage, weekly usage and daily usage).

The other stats seems ok and updated.

Forcing vn-stat update (uf) didn’t solve the problem.

edit. “Summary of all usage“ and “Top 10 usage“ are not being updated too.
It's entirely possible that an Entware update introduced an incompatibility. I haven't updated Entware (and will avoid it on my main router for now).

I'm going to need to call on @Jack Yaz to ask for his thoughts. Calling Dr. Yaz, Dr. Yaz please?
 
I'm not sure, I need to think about it a bit, we've really not seen anything quite the same. You seem to have a minimal setup, it might be worth considering a full reset to see if that helps, but before you do that, let me poke around on my test router a bit. Seems odd...
Have there been instances where webui says HW acceleration is off, but it’s actually still on?

Edit 3 hours later:
Well, this is weird. After working for a while, the tx and rx lines have once again converged. I’m now measuring symmetric uplink/downlink.

1639451289411.png
 
Last edited:
Yesterday after the numerous Entware updates were installed, my stats stopped updating. I forced an update which didn't help but it did generate the following:

Code:
vnstati: error while loading shared libraries: libwebpdecoder.so.4.1.1: cannot open shared object file: No such file or directory

Did the Entware updates possibly break something?

Hey, I just wanted to add that I updated things yesterday and am now also encountering this!

Stats are updating fine but hourly/daily/monthly graphs aren't generating which is also reflected in my daily dn-vnstat stats email :(
 

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