What's new

vnStat vnStat web UI stopped working

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

Oracle

Regular Contributor
The web UI page for dn-vnStat doesn't load anymore.
Not only does it not load but it causes httpd to hit 100% CPU use and block the entire router web UI.
Router model AC86U on Merlin 386.7.

This problem appeared right after I upgraded Diversion from 4.2. to 4.3. I don't see the connection between the 2 (maybe there isn't any) but one happened right after the other.
 

Attachments

  • StuckVnStat.png
    StuckVnStat.png
    15.1 KB · Views: 160
  • StuckWebUI.png
    StuckWebUI.png
    33.2 KB · Views: 162
Check the files in /www/ext/dn-vnstat/. Anything really large or old looking? Never used this, but I would start by assuming these data files are part of the problem.
 
This will be a challenge to diagnose.

So if I reboot the router and go to the vnStat web UI page (Addons -> dn-vnstat), the page loads.
If I then go and open a Diversion page (LAN -> Diversion) and then come back to the dn-vnstat page, the whole router web UI freezes. I can't say how consistent this is - already had to reboot 3 times via PuTTY because the web UI stopped responding.

vnStat works by generating usage images every 5 min. Something seems to interfere with the images creation, because they have occasionally started to come out incomplete.
 

Attachments

  • vnStatBrokenImg.png
    vnStatBrokenImg.png
    105.7 KB · Views: 151
This problem persists, although less severe (or I got used to it and avoid clicking too much around the web UI).
Data appears to be fine but every now and then the page would freeze or images load partially.
Let's say - around half the time. I.e., images are broken, after 5 min they are ok, next refresh - broken again. By "broken" I mean incomplete, like on the attachment above.
 
vnstat dont show anything. in case of "Update stats now" listing as below

Choose an option: 1

vnstati updating stats for UI

Config: Invalid value for UnitMode, resetting to "0".
Error: Unable to read database "/opt/var/lib/vnstat/eth0": No such file or directory
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "-hg". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "31". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "12". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "10". Use --help for help.
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
vnstats as of: Wed Aug 24 22:38:41 GMT 2022

Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "25". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "8". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "6". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "-y". Use --help for help.

vnstat_totals summary generated

Error: near line 3: no such table: interface
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: fiveminute
 
vnstat dont show anything. in case of "Update stats now" listing as below

Choose an option: 1

vnstati updating stats for UI

Config: Invalid value for UnitMode, resetting to "0".
Error: Unable to read database "/opt/var/lib/vnstat/eth0": No such file or directory
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "-hg". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "31". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "12". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown arg "10". Use --help for help.
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
vnstats as of: Wed Aug 24 22:38:41 GMT 2022

Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "25". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "8". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "6". Use --help for help.
Config: Invalid value for UnitMode, resetting to "0".
Unknown parameter "-y". Use --help for help.

vnstat_totals summary generated

Error: near line 3: no such table: interface
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: fiveminute
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: hour
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: day
Error: near line 4: no such table: fiveminute
Do you have Entware installed? Have you tried an uninstall/reinstall?
 
Do you have Entware installed? Have you tried an uninstall/reinstall?
firmware is Asuswrt-Merlin 374 LTS release 53D1
Entware is installed
uninstalled it
and installed again via amtm

Enter option vn
_____________________________________________

This installs vnStat - data use monitoring with email function
on your router.

Author: dev_null
https://www.snbforums.com/forums/asuswrt-merlin-addons.60/?prefix_id=34
_____________________________________________

Continue? [1=Yes e=Exit] 1

##################################################
## ##
## vnStat on Merlin ##
## for AsusWRT-Merlin routers ##
## ##
## v2.0.4 on RT-N66U ##
## ##
## https://github.com/de-vnull/vnstat-on-merlin ##
## ##
##################################################

Welcome to dn-vnstat v2.0.4, a script by dev_null and Jack Yaz

Checking your router meets the requirements for dn-vnstat

Installing required packages from Entware

Downloading https://pkg.entware.net/binaries/mipsel/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware-ng
Unknown package 'vnstat2'.
Collected errors:
* opkg_install_cmd: Cannot install package vnstat2.
Unknown package 'vnstati2'.
Collected errors:
* opkg_install_cmd: Cannot install package vnstati2.
Package jq (1.5-2a) installed in root is up to date.
Package sqlite3-cli (3210000-1) installed in root is up to date.
Package p7zip (16.02-1) installed in root is up to date.
Package findutils (4.6.0-1) installed in root is up to date.

WAN Interface detected as eth0

Is this correct? (y/n) y

/opt/share/dn-vnstat.d/vnstat.conf does not exist, downloading now.

sed: /opt/share/dn-vnstat.d/vnstat.conf: No such file or directory
New version of vnstat-ui.asp downloaded

Mounting WebUI tab for dn-vnstat

Mounted dn-vnstat WebUI page as user2.asp

New version of S33vnstat downloaded

/jffs/scripts/dn-vnstat: line 1: can't create /opt/share/dn-vnstat.d/.vnstatusage: nonexistent directory
/jffs/scripts/dn-vnstat: line 1: can't create /opt/share/dn-vnstat.d/.vnstatusage: nonexistent directory
/jffs/scripts/dn-vnstat: line 1: can't create /opt/share/dn-vnstat.d/.vnstatusage: nonexistent directory
vnstatd not running, please check system log
 
Last edited:
firmware is Asuswrt-Merlin 374 LTS release 53D1
Entware is installed
uninstalled it
and installed again via amtm

Enter option vn
_____________________________________________

This installs vnStat - data use monitoring with email function
on your router.

Author: dev_null
https://www.snbforums.com/forums/asuswrt-merlin-addons.60/?prefix_id=34
_____________________________________________

Continue? [1=Yes e=Exit] 1

##################################################
## ##
## vnStat on Merlin ##
## for AsusWRT-Merlin routers ##
## ##
## v2.0.4 on RT-N66U ##
## ##
## https://github.com/de-vnull/vnstat-on-merlin ##
## ##
##################################################

Welcome to dn-vnstat v2.0.4, a script by dev_null and Jack Yaz

Checking your router meets the requirements for dn-vnstat

Installing required packages from Entware

Downloading https://pkg.entware.net/binaries/mipsel/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware-ng
Unknown package 'vnstat2'.
Collected errors:
* opkg_install_cmd: Cannot install package vnstat2.
Unknown package 'vnstati2'.
Collected errors:
* opkg_install_cmd: Cannot install package vnstati2.
Package jq (1.5-2a) installed in root is up to date.
Package sqlite3-cli (3210000-1) installed in root is up to date.
Package p7zip (16.02-1) installed in root is up to date.
Package findutils (4.6.0-1) installed in root is up to date.

WAN Interface detected as eth0

Is this correct? (y/n) y

/opt/share/dn-vnstat.d/vnstat.conf does not exist, downloading now.

sed: /opt/share/dn-vnstat.d/vnstat.conf: No such file or directory
New version of vnstat-ui.asp downloaded

Mounting WebUI tab for dn-vnstat

Mounted dn-vnstat WebUI page as user2.asp

New version of S33vnstat downloaded

/jffs/scripts/dn-vnstat: line 1: can't create /opt/share/dn-vnstat.d/.vnstatusage: nonexistent directory
/jffs/scripts/dn-vnstat: line 1: can't create /opt/share/dn-vnstat.d/.vnstatusage: nonexistent directory
/jffs/scripts/dn-vnstat: line 1: can't create /opt/share/dn-vnstat.d/.vnstatusage: nonexistent directory
vnstatd not running, please check system log
I'm definitely not a pro at this stuff when it comes to entware and such, but it just seems to me based on your log that the vnstat2 package/download is either not available or corrupt? That has a cascading effect as the install process unfolds, because files, configs, directories are just not there.

Perhaps someone can chime in to help determine what's happening with that vnstat2 package?
 
firmware is Asuswrt-Merlin 374 LTS release 53D1
That may be a problem as well:
  • AsusWRT Merlin version 384.19 or later for R1.
    • R1 has been tested on 384.19 through 386.2_6 release version.
      • Earlier versions (384-series only) may likewise function; kindly report any further experiences (include router model and firmware version).
      • Initial testing on John's fork appears to demonstrate expected functionality. Kindly report any further experiences (include router model and firmware version).
    • AsusWRT Merlin version 386.2 or later for R2.
      • R2 has been tested on 386.2_6 release version.
      • No version of 384.x nor John's fork have been tested (no supported hardware available) - please report success/failure.
 
How will I know what is the name of wan in ax58 to set proper name for vnStat ? It assign eth4 by default but isn't it the standard lan port for a connected device?
 
How will I know what is the name of wan in ax58 to set proper name for vnStat ? It assign eth4 by default but isn't it the standard lan port for a connected device?
Usually it's eth0
 
'no interface matching eth0 found in database'
So interestingly enough, I was reading up that AX58's use eth4 for their wan0 interface... you can check for yourself running this command and seeing what it comes back with?

Code:
nvram get wan0_ifname
 

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