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!

Please describe:
- Router model (note the supported models in the first post)
- Firmware version (note the minimum required version in the first post)
- Other installed add-ons
- Are any other add-ons having problems
- Have you tried a force-update? (You should not lose any data)
- Have you tried a reboot? (You should not lose any data)
Router rt ax86u. Firmware 288.1
I tried to even uninstall and reinstall, still the same problem.
 

Attachments

  • Screenshot_20230115-210320.jpg
    Screenshot_20230115-210320.jpg
    23.2 KB · Views: 92
Router rt ax86u. Firmware 288.1
I tried to even uninstall and reinstall, still the same problem.
I presume you mean 388.1.

What interface? What type of connection and speed?

Are Diversion and Yazfi working as expected? Do you have a full install of Entware?

I would recommend updating Entware packages because there are other dependencies in dn-vnstat beyond the ones you tried to reload.

Then force re-update dn-vnstat.

I am running this on the same router with the same firmware (as are many others I'm sure) so there's something going on with your specific setup,
 
I presume you mean 388.1.

What interface? What type of connection and speed?

Are Diversion and Yazfi working as expected? Do you have a full install of Entware?

I would recommend updating Entware packages because there are other dependencies in dn-vnstat beyond the ones you tried to reload.

Then force re-update dn-vnstat.

I am running this on the same router with the same firmware (as are many others I'm sure) so there's something going on with your specific setup,
Thank you for your help
Diversion and Yazfi work with no problems.
I updated entware and after that I updated dn-vnstat. Still the same problem.
I basically stacked on December 2022. I have no clue what to do . I am on latest Merlin firmware.
 
Thank you for your help
Diversion and Yazfi work with no problems.
I updated entware and after that I updated dn-vnstat. Still the same problem.
I basically stacked on December 2022. I have no clue what to do . I am on latest Merlin firmware.
Since you haven't included other configuration questions, there's little else I can think of.

You could back-up your data files which are located at /opt/var/lib/vnstat/vnstat.db, assuming you're on USB, otherwise this file in on JFFS. The location of that file depends on whether you store it in jffs (addons/dn-vnstat.d folder) or usb (opt/share/dn-vnstat.d folder). Uninstall dn-vnstat - do not let the uninstall save the db - and reboot. Then reinstall the application. Run some speedtests or something to use some data and wait 10 mins to see if the full reinstall has fixed the issue. If it is recording data properly, you can restore the database.

To restore the database, go back to your ssh prompt, run the command /opt/etc/init.d/S33vnstat stop, copy the vnstat.db back to the folder you saved it from above, then run the command /opt/etc/init.d/S33vnstat start (or reboot the router).
 
Since you haven't included other configuration questions, there's little else I can think of.

You could back-up your data files which are located at /opt/var/lib/vnstat/vnstat.db, assuming you're on USB, otherwise this file in on JFFS. The location of that file depends on whether you store it in jffs (addons/dn-vnstat.d folder) or usb (opt/share/dn-vnstat.d folder). Uninstall dn-vnstat - do not let the uninstall save the db - and reboot. Then reinstall the application. Run some speedtests or something to use some data and wait 10 mins to see if the full reinstall has fixed the issue. If it is recording data properly, you can restore the database.

To restore the database, go back to your ssh prompt, run the command /opt/etc/init.d/S33vnstat stop, copy the vnstat.db back to the folder you saved it from above, then run the command /opt/etc/init.d/S33vnstat start (or reboot the router).
I don't know that did you mean by what kind of interface I use.
I have Xfinity blast 800down 20upload

I already uninstalled vnstat and reinstalled. I don't care if loose any data, however the problem still there.
 

Attachments

  • Screenshot_20230121-200220.jpg
    Screenshot_20230121-200220.jpg
    47.2 KB · Views: 99
I already uninstalled vnstat and reinstalled. I don't care if loose any data, however the problem still there.

I just re-read your initial post. Did you run the full command opkg remove vnstati2 libgd libwebp && opkg install vnstati2? Because if all you ran was remove, then you need to reinstall the missing apps.

So try this: force an update with uf, then run the above at the command line, then reboot.

If this doesn't work, you may need to go the reset route.
 
I just re-read your initial post. Did you run the full command opkg remove vnstati2 libgd libwebp && opkg install vnstati2? Because if all you ran was remove, then you need to reinstall the missing apps.

So try this: force an update with uf, then run the above at the command line, then reboot.

If this doesn't work, you may need to go the reset route.
Thank you again for helping me.
Yes, I ran those commands
However...
That's funny. I uninstalled it again yesterday.
Waited 24hrs. And installed it again.
Here what I got. That's mean it is working?
 

Attachments

  • Screenshot_20230122-133059.jpg
    Screenshot_20230122-133059.jpg
    49.2 KB · Views: 94
Thank you again for helping me.
Yes, I ran those commands
However...
That's funny. I uninstalled it again yesterday.
Waited 24hrs. And installed it again.
Here what I got. That's mean it is working?
It would appear so. Glad you got it working.
 
  • Like
Reactions: pdc
Hi, I have problem with this:
Code:
vnstati updating stats for UI

vnstati: error while loading shared libraries: /opt/lib/libjpeg.so.62: file too short
vnstati: error while loading shared libraries: /opt/lib/libjpeg.so.62: file too short
vnstati: error while loading shared libraries: /opt/lib/libjpeg.so.62: file too short
vnstati: error while loading shared libraries: /opt/lib/libjpeg.so.62: file too short
vnstati: error while loading shared libraries: /opt/lib/libjpeg.so.62: file too short
cp: can't stat '/opt/share/dn-vnstat.d/images/vnstat_s.png': No such file or directory
cp: can't stat '/opt/share/dn-vnstat.d/images/vnstat_hg.png': No such file or directory
cp: can't stat '/opt/share/dn-vnstat.d/images/vnstat_d.png': No such file or directory
cp: can't stat '/opt/share/dn-vnstat.d/images/vnstat_t.png': No such file or directory
cp: can't stat '/opt/share/dn-vnstat.d/images/vnstat_m.png': No such file or directory
.
.
.
mv: can't rename '/tmp/dn-vnstatdata.zip': No such file or directory

Edit:
The problem turned out to be the file in libs libjpeg.so.62 weighed 0 bytes.
Now I have problem with this all the time:
Code:
You have used 0.00% (0.00GB) of your 1200.00GB cycle allowance; the next cycle starts on day 1 of the month.

Asus RT-AC87u FW: 384.13_10 (latest Merlin)
 
Last edited:
Asus RT-AC87u FW: 384.13_10 (latest Merlin)
Unfortunately, your firmware is too old for this to work, at least reliably. Please consult the first post for the minimum hardware/firmware requirements.

You *may* be able to get it to work manually (hint: review the R1 release notes, or search for my very first thread on the alpha version, which was largely a manual configuration), but it's not supported with any of the existing scripts.
 
Unfortunately, your firmware is too old for this to work, at least reliably. Please consult the first post for the minimum hardware/firmware requirements.

You *may* be able to get it to work manually (hint: review the R1 release notes, or search for my very first thread on the alpha version, which was largely a manual configuration), but it's not supported with any of the existing scripts.
But until mid-January it was working fine on 2.0.4. Later I changed the file system from ext2 to ext4 (Kingston 32GB) and the problem started. Files from December were generated correctly and the state of used data. I installed the script via integrated amtm in Merlin FW.
 
But until mid-January it was working fine on 2.0.4. Later I changed the file system from ext2 to ext4 (Kingston 32GB) and the problem started. Files from December were generated correctly and the state of used data. I installed the script via integrated amtm in Merlin FW.
I'd never tested anything prior to 384.19, so I can only recommend you force-reinstall, particularly the Entware install.

I was under the impression that the Entware versions of vnstat2 were higher than those available on 384, but I suppose I could have misunderstood.

If you were truly running R2, then I would backup the data files as I described above, remove the app, reboot, reinstall the app, pause it using the S33vnstat commands described in #365, copy the data file back, and reboot. If necessary, run the opkg commands too. If you were using R1, then follow the backup instructions on the GitHub page.

I wish I could provide something more than general guidance, but this is unsupported on firmware this old (also: firware that old is a security risk to you) and I have no way to reproduce or test.
 
data usage report stopped by some date for me after power outage here. I suspect that the problem is with db. Is there a way to repair this db or needs to recreate a new one ?
 
data usage report stopped by some date for me after power outage here. I suspect that the problem is with db. Is there a way to repair this db or needs to recreate a new one ?
Can you please clarify: the graphic is not updating, the text part is not updating (or both) or you've lost the email report?

Have you tried to force update UF to see if a re-install fixes the issue? Any other steps you've already taken? Any other add-ons not working?

What firmware version (latest can mean many things)? Where are you saving the data (jffs or usb)?

I've not had DB corruption occur during the testing, and I did some pretty rough stuff. If it is a db issue, it could be a sign that your usb drive is failing.
 
Can you please clarify: the graphic is not updating, the text part is not updating (or both) or you've lost the email report?

Have you tried to force update UF to see if a re-install fixes the issue? Any other steps you've already taken? Any other add-ons not working?

What firmware version (latest can mean many things)? Where are you saving the data (jffs or usb)?

I've not had DB corruption occur during the testing, and I did some pretty rough stuff. If it is a db issue, it could be a sign that your usb drive is failing.
The GUI stopped to be updated - all sections, when I triggered manual update for ssh it shows errors with db. NVM, I forced update with new db creation, and now it is working again.
 
The GUI stopped to be updated - all sections, when I triggered manual update for ssh it shows errors with db. NVM, I forced update with new db creation, and now it is working again.
Glad you got it sorted.
 
Hello!
I've been using vnStat for a while and it works really nicely!

Today i changed my ISP. Until now, i was using a PPoE WAN connection type (modem is on bridge mode, GT-AXE11000 doing everything) and now i must configure the wan connection as Automatic IP.

VnStat was configured to monitor interface "ppp0" but after i switched it looked like it wasn't finding the interface anymore (the graphs and consumption tables were not updating).

Through SSH, i changed the interface on the configuration file to "eth0" and it's monitoring again BUT i "lost" all my previous data.

Is there any way i can migrate (or something) the old data to the new monitoring interface?

Thank you!
 
Is there any way i can migrate (or something) the old data to the new monitoring interface?
Thanks for the kind words.

vnStat 2.x, which dn-vnstat is based, does not have built-in backup. Please see here for the available approach: https://www.snbforums.com/goto/post?id=817919.

Note it might be too late, when interface changes, I believe that vnStat reinitializes and probably deletes the old interface use, but you can check.

If your question is 'can I merge previous usage with a different interface', that I cannot answer, because I've never had a reason to. I suppose you could try to rename the old file if you can recover it to match the new interface name and restart vnstat as in the link above. Or you could try to open the db file and edit it, but that would be a completely unsupported approach (be sure to back up all your files).

The db file is in sqlite format, but I'm not sure how vnStat would handle an edited file (if there is any consistency/validation performed).
 
Thanks for the kind words.

vnStat 2.x, which dn-vnstat is based, does not have built-in backup. Please see here for the available approach: https://www.snbforums.com/goto/post?id=817919.

Note it might be too late, when interface changes, I believe that vnStat reinitializes and probably deletes the old interface use, but you can check.

If your question is 'can I merge previous usage with a different interface', that I cannot answer, because I've never had a reason to. I suppose you could try to rename the old file if you can recover it to match the new interface name and restart vnstat as in the link above. Or you could try to open the db file and edit it, but that would be a completely unsupported approach (be sure to back up all your files).

The db file is in sqlite format, but I'm not sure how vnStat would handle an edited file (if there is any consistency/validation performed).
@Celo as @dev_null the backend is a sqlite database and i /think/ vnstat includes the interface tracked as either a column in various tables, or the table name itself. you should be able to poke around using sqlite3-cli (or copy the file to a desktop and use a GUI sqlite tool) and inspect the changes needed
 
@Celo as @dev_null the backend is a sqlite database and i /think/ vnstat includes the interface tracked as either a column in various tables, or the table name itself. you should be able to poke around using sqlite3-cli (or copy the file to a desktop and use a GUI sqlite tool) and inspect the changes needed
Yep, did exactly that! A few minutes fiddling around and got all the tables "corrected", pretty easy!
Thank you! :D
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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