What's new

[Beta] VNSTAT on Merlin; CLI, UI and email data use monitoring (install script offline for now)

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

Status
Not open for further replies.
Diversion links /opt to the /entware directory on the stick, so it should survive reboots. I can't test right now.

Also, a minor suggestion would be to make the cru call a script rather than these long linked lines. That way you can fiddle with the script without dealing with cru d and cru a, and you can put in some logging for success and failure. I've made the cru daily update call to a script in vnstat.d that at the moment just contains the long line.

Down the road also might be to use the graphics used by say, the unbound and connmon addons; just for a consistent look.
 
Email update: thanks to @elorimer 's script, there is now a second (better! in most cases) option for the vnstat-stats email process.

This adds another dependency - leveraging @thelonelycoder 's Diversion "communication" email process - but solves other issues, including support for platforms other than gmail, secure storage of passwords, etc.

Here are the steps to replace the existing send-vnstat process:
  1. Make sure that Diversion's email communication is set up (amtm > 1 (Diversion) > c (communication) > 5 (edit email settings, test email)) with the account of your choice.
  2. In /jffs/scripts, create the div-email.sh from this source. Make sure it's executable (octal 0755).
  3. Update the cron job via SSH to point to this script rather than the send-vnstat script (all on a single line):
    cru a vnstat_daily "59 23 * * * /opt/bin/vnstat -u && sh /jffs/scripts/vnstat-stats && sh /jffs/scripts/div-email.sh Vnstat-stats /home/root/vnstat.txt"
  4. Test by running /opt/bin/vnstat -u && sh /jffs/scripts/vnstat-stats && sh /jffs/scripts/div-email.sh Vnstat-stats /home/root/vnstat.txt
  5. If not using send-vnstat, you can delete it (to secure your email details).
I'll be connecting with @Martineau to make mods to the install script he has so generously created.

---

Aside: the beauty of this div-email.sh is that you can send anything that can be put into a text file as an email message. Simply pass the script name /jffs/scripts/div-email.sh (space) "Subject line in quotes if there are spaces" (space) /path/to/text/file - that's it.

For example, here's my script to send weekly skynet updates:

Code:
#!/bin/sh
# change the number 25 below to the number of hits you want in your report
sh /jffs/scripts/firewall stats 25 | sed -r 's/'$(echo -e "\033")'\[[0-9]{1,2}(;([0-9]{1,2})?)?[mK]//g' | strings >  /home/root/skynet.txt
# the next command prunes whitespace from the top of the file
sed -i '1,25d' /home/root/skynet.txt
# sends a message to the system log
logger -s -t skynet_stats periodic stats complete

Which now is sent with the same div-email.sh script via this cron job (no additional email customization required!):
cru a skynet-wkly "2 2 * * SUN sh /jffs/scripts/skynet-stats && /jffs/scripts/div-email.sh Skynet-stats /home/root/skynet.txt"
Based on @elorimer's suggestion I did with foresight already add the ability in vnstat-install v1.04 to optionally specify a custom e-mail script during the install to override send-vnstat

e.g.
Code:
./vnstat-install.sh install /jffs/scripts/GMailSSL.sh

./vnstat-install.sh: v1.04b Installing 'vnstat'....

<snip>

cru l

*/13 * * * * /opt/bin/vnstat -u && sh /jffs/addons/vnstat.d/vnstat-ww.sh #vnstat_update#
59 23 * * * /opt/bin/vnstat -u && sh /jffs/addons/vnstat.d/vnstat-stats && sh /jffs/scripts/GMailSSL.sh /home/root/vnstat.txt #vnstat_daily#
but only one argument will be passed to the custom script i.e. the name of the stats report file.

However, I have created vnstat-install v1.05 to use your new div-email.sh script ONLY if it is appropriate to do so

e.g.
Code:
./vnstat-install.sh install

./vnstat-install.sh: v1.05 Installing 'vnstat'....

<snip>

cru l

*/13 * * * * /opt/bin/vnstat -u && sh /jffs/addons/vnstat.d/vnstat-ww.sh #vnstat_update#
59 23 * * * /opt/bin/vnstat -u && sh /jffs/addons/vnstat.d/vnstat-stats && sh /jffs/addons/vnstat.d/div-email.sh Vnstat-stats /home/root/vnstat.txt #vnstat_daily#

Published v1.05 on my Github .

When your Github repository is ready....then you can take on the support/maintenance.
 
Last edited:
For reasons not clear to me, the add-ons page is now only displaying broken links to the .pngs

Is it correct for the source to be, e.g: /user/vnstat/vnstat_eth0_h.png
Rather than something in /opt/var/lib/vnstat/?
If I change the source directory to be /tmp/var/wwwext/vnstat/ I see graphs instead of broken links.
 
Last edited:
Request to users of Vnstat on Merlin: if anyone has installed with Martineau's script and not modified the database file location (that is, left the db - eth0 and .eth0 - in the default install location, which is probably in the /opt/ directory) - can you let me know if the statics survive reboot in this default location please.
Even though I didn't use the script to install vnstat I was going to suggest you remove the recommendation to change the database location. The default database location is in a fairly standard place within the Entware file structure (below /opt/var) and therefore by definition it should survive a reboot. The database files are only a few kB so their size shouldn't require them being moved.
 
Last edited:
Even though I didn't use the script to install vnstat I was going to suggest you remove the recommendation to change the database location. The default database location is in a fairly standard place within the Entware file structure (below /opt/var) and therefore by definition it should survive a reboot. The database files are only a few kB so their size shouldn't require them being moved.
In retrospect, I agree. I had in my notes that the db disappeared during my early experimentation... I though it was because /opt/ might be volatile, but with the symlink it's clearly not. So the earlier issue must have been for some other reason. I'm cleaning up the install instructions as I move from bitbucket to github, so I will clear that recommendation (perhaps with a note that if the db disappears on reboot to check the symlinks or to at that point move the db). Cheers and thanks for the encouraging words.
 
For reasons not clear to me, the add-ons page is now only displaying broken links to the .pngs

Is it correct for the source to be, e.g: /user/vnstat/vnstat_eth0_h.png
Rather than something in /opt/var/lib/vnstat/?
If I change the source directory to be /tmp/var/wwwext/vnstat/ I see graphs instead of broken links.
Did this resolve itself? Usually the broken link picture occurs at reboot before the vnstat-ww script runs vnstati to create updated images. Check your cron entries (my default was to refresh every 13 minutes). Manually running vnstat-ww followed by a hard refresh of the UI page (CTRL+F5 or equivalent) should fix the issue.
 
I seem to have the same issue as @elorimer above with the broken links/pics. I used the easy install from @Martineau and noticed this as the last two lines during install. Not sure if this helps but figured you should be aware of the messages.

Code:
convert: UnableToOpenBlob '/tmp/var/wwwext/vnstat/vnstat.png': No such file or directory @ error/blob.c/OpenBlob/3496.
convert: WriteBlob Failed `/tmp/var/wwwext/vnstat/vnstat.png' @ error/png.c/MagickPNGErrorHandler/1715.

Edit: Manually running this "/jffs/addons/vnstat.d/vnstat-ww.sh" and then refreshing shows content now.
Code:
QuikSilver156@RT-AC86U-AEA8:/tmp/home/root# /jffs/addons/vnstat.d/vnstat-ww.sh
QuikSilver156: vnstati updated
 
I seem to have the same issue as @elorimer above with the broken links/pics. I used the easy install from @Martineau and noticed this as the last two lines during install. Not sure if this helps but figured you should be aware of the messages.

Code:
convert: UnableToOpenBlob '/tmp/var/wwwext/vnstat/vnstat.png': No such file or directory @ error/blob.c/OpenBlob/3496.
convert: WriteBlob Failed `/tmp/var/wwwext/vnstat/vnstat.png' @ error/png.c/MagickPNGErrorHandler/1715.

Edit: Manually running this "/jffs/addons/vnstat.d/vnstat-ww.sh" and then refreshing shows content now.
Code:
QuikSilver156@RT-AC86U-AEA8:/tmp/home/root# /jffs/addons/vnstat.d/vnstat-ww.sh
QuikSilver156: vnstati updated

During the install, vnstat-install.sh Beta v1.0b5 included post install code to check that vnstat was UP but only populated the one broken link that I had personaly encountered/observed (probably because the database already exists as the script currently never deletes it.)

Beta v1.06b now also includes the execution of vnstat-ww.sh to hopefully eliminate all broken links
Code:
        if [ -n "$(pidof vnstatd)" ];then
   
            logger -st "$0" "   .....paused for 5 seconds to generate data points"
            sleep 5                                                                    #v1.05  
       
            # Create/Display Daily Summary report usually scheduled by cron @23:59
            #                (also used to populate the Addon GUI tab 'Vnstat/vnstati' section 'Vnstat CLI' otherwise you get a broken link!)
            echo -en $cBCYA
            /opt/bin/vnstat -u && sh /jffs/addons/vnstat.d/vnstat-stats                # v1.05
            /jffs/addons/vnstat.d/vnstat-ww.sh                                         # v1.06 Eliminate ALL broken links?
       
            echo -e $cRESET
        else
            echo -e "\a\n\tCritical ERROR! 'vnstatd' NOT running?"
            logger -st "$0" "   Critical ERROR! 'vnstatd' NOT running?"
            exit 66
        fi
 
Last edited:
I'd also like to create an email message that comes when I approach my limits... I've tried grepping the vnstat monthly report to pull out the total column, but have had no success yet.
Do you mean something like this?

Example report
Code:
cat /home/root/vnstat.txt

Vnstats as of:

Wed Feb 10 hh:mm:ss GMT 2021

eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Jan '21   ????.?? GiB |    ?.?  GiB | ????.?? GiB | ????.?? kbit/s
      Feb '21      6.44 GiB |  658.42 MiB |    7.09 GiB |   75.07 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated     19.22 GiB |    1.92 GiB |   21.14 GiB |

eth0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days      6.44 GiB |  658.42 MiB |    7.09 GiB |  110.36 kbit/s
      last week      2.24 GiB |  240.32 MiB |    2.48 GiB |   35.16 kbit/s
   current week      4.20 GiB |  418.10 MiB |    4.61 GiB |  192.29 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated     12.38 GiB |    1.20 GiB |   13.58 GiB |

eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/06/2021     1.29 GiB |  166.19 MiB |    1.45 GiB |  144.32 kbit/s
     02/07/2021   974.49 MiB |   74.13 MiB |    1.02 GiB |  101.81 kbit/s
     02/08/2021     3.13 GiB |  335.60 MiB |    3.46 GiB |  343.82 kbit/s
     02/09/2021   875.71 MiB |   63.18 MiB |  938.90 MiB |   91.16 kbit/s
     02/10/2021   221.15 MiB |   19.32 MiB |  240.46 MiB |   60.87 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       576 MiB |      49 MiB |     625 MiB |
then crude (multiple utilities rather than use a single utility) extraction where current Monthly total=7.09GiB
Code:
grep -E "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec" /home/root/vnstat.txt | tail -n 1 | awk -F'\|' '{gsub(/ /, "", $3); print "Usage for current Month (MTD) is "$3}'

Usage for current Month (MTD) is 7.09GiB
and for a timely e-mail warning
Code:
/jffs/addons/vnstat.d/div-email.sh "Warning" $(grep -E "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec" /home/root/vnstat.txt | tail -n 1 | awk -F'\|' '{gsub(/ /, "", $3); print "Usage for current Month (MTD) is "$3}' > /tmp/report.txt) /tmp/report.txt

*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   203    0     0  100   203      0    146  0:00:01  0:00:01 --:--:--   146
div-email: email event processed
 
Last edited:
I have the same problem as @elorimer and @QuikSilver. During my installation, the interface created is vlan500 instead of eth0. In my case, vlan500 is the internet traffic from provider. In the GUI, the image link is still broken. I can see the images created in /tmp/var/wwwext/vnstat directory. I have manually run /jffs/addons/vnstat.d/vnstat-ww.sh and refresh the page and still the image is broken.

Code:
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Auto detected (nvram get wan0_ifname) 'Interface vlan500'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected (nvram get wan0_ifname) 'Interface vlan500'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Error: Unable to read database "/opt/var/lib/vnstat/vlan500": No such file or directory
Info: -> A new database has been created.
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 19:49:27 MYT 2021

vlan500  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21        12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |

vlan500  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days        12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
   current week        12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

vlan500  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021       12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

convert: UnableToOpenBlob '/tmp/var/wwwext/vnstat/vnstat.png': No such file or directory @ error/blob.c/OpenBlob/3496.
convert: WriteBlob Failed `/tmp/var/wwwext/vnstat/vnstat.png' @ error/png.c/MagickPNGErrorHandler/1715.
vnstat_totals: summary generated
vnstati: vnstati updated stats

admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log# /jffs/addons/vnstat.d/vnstat-ww.sh
vnstati: vnstati updated stats
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
 
I have the same problem as @elorimer and @QuikSilver. During my installation, the interface created is vlan500 instead of eth0. In my case, vlan500 is the internet traffic from provider. In the GUI, the image link is still broken. I can see the images created in /tmp/var/wwwext/vnstat directory. I have manually run /jffs/addons/vnstat.d/vnstat-ww.sh and refresh the page and still the image is broken.

Code:
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Auto detected (nvram get wan0_ifname) 'Interface vlan500'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected (nvram get wan0_ifname) 'Interface vlan500'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Error: Unable to read database "/opt/var/lib/vnstat/vlan500": No such file or directory
Info: -> A new database has been created.
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 19:49:27 MYT 2021

vlan500  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21        12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |

vlan500  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days        12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
   current week        12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

vlan500  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021       12 KiB |      40 KiB |      52 KiB |    0.00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

convert: UnableToOpenBlob '/tmp/var/wwwext/vnstat/vnstat.png': No such file or directory @ error/blob.c/OpenBlob/3496.
convert: WriteBlob Failed `/tmp/var/wwwext/vnstat/vnstat.png' @ error/png.c/MagickPNGErrorHandler/1715.
vnstat_totals: summary generated
vnstati: vnstati updated stats

admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log# /jffs/addons/vnstat.d/vnstat-ww.sh
vnstati: vnstati updated stats
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#
What is the output of
Code:
nvram get wan0_ifname

In the interim, you can manually specify the interface
e.g.
Code:
/jffs/scripts/vnstat-install.sh install eth0
 
My stat page only shows current day and onward. I assume this is as expected though my traffic monitor goes back to August 2020. To me that would me its created a new DB and not importing?
 
What is the output of
Code:
nvram get wan0_ifname

In the interim, you can manually specify the interface
e.g.
Code:
/jffs/scripts/vnstat-install.sh install eth0
The output is vlan500
Code:
nvram get wan0_ifname
vlan500

the new command works. now I can get all the graph properly displayed.
Code:
# /jffs/scripts/vnstat-install.sh install eth0
/jffs/scripts/vnstat-install.sh: v1.06b Installing 'vnstat'....
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' Entware modules
Package vnstat (1.18-2) installed in root is up to date.
Package vnstati (1.18-2) installed in root is up to date.
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Package imagemagick (7.0.9-2) installed in root is up to date.
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' scripts to /jffs/addons/vnstat.d
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
/jffs/scripts/vnstat-install.sh:    Creating Addons GUI TAB
############################################################################################################################################################# 100.0%
vnstat-ui: Mounting vnstat-ui WebUI page as user9.asp

/jffs/scripts/vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
/jffs/scripts/vnstat-install.sh:    Creating cron jobs (e-mail cmd '/jffs/addons/vnstat.d/send-vnstat')
/jffs/scripts/vnstat-install.sh:    Adding cron jobs to services-start
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Manual override 'Interface eth0'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Manual override 'Interface eth0'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Error: Unable to read database "/opt/var/lib/vnstat/eth0": No such file or directory
Info: -> A new database has been created.
 Shutting down vnstatd...              done. 
 Starting vnstatd...              done. 
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 21:07:36 MYT 2021

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21         1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |

 eth0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days         1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
   current week         1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

 eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021        1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

vnstat_totals: summary generated
vnstati: vnstati updated stats
 
The output is vlan500
Code:
nvram get wan0_ifname
vlan500

the new command works. now I can get all the graph properly displayed.
Code:
# /jffs/scripts/vnstat-install.sh install eth0
/jffs/scripts/vnstat-install.sh: v1.06b Installing 'vnstat'....
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' Entware modules
Package vnstat (1.18-2) installed in root is up to date.
Package vnstati (1.18-2) installed in root is up to date.
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Package imagemagick (7.0.9-2) installed in root is up to date.
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' scripts to /jffs/addons/vnstat.d
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
############################################################################################################################################################# 100.0%
/jffs/scripts/vnstat-install.sh:    Creating Addons GUI TAB
############################################################################################################################################################# 100.0%
vnstat-ui: Mounting vnstat-ui WebUI page as user9.asp

/jffs/scripts/vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
/jffs/scripts/vnstat-install.sh:    Creating cron jobs (e-mail cmd '/jffs/addons/vnstat.d/send-vnstat')
/jffs/scripts/vnstat-install.sh:    Adding cron jobs to services-start
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Manual override 'Interface eth0'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Manual override 'Interface eth0'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Error: Unable to read database "/opt/var/lib/vnstat/eth0": No such file or directory
Info: -> A new database has been created.
Shutting down vnstatd...              done.
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 21:07:36 MYT 2021

eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21         1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |

eth0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days         1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
   current week         1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

eth0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021        1 KiB |      19 KiB |      20 KiB |    0.00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

vnstat_totals: summary generated
vnstati: vnstati updated stats
I have uploaded a patched vnstat-install.sh Beta v1.06b2

Can you please download and try it without manually overriding the WAN interface.
 
I have uploaded a patched vnstat-install.sh Beta v1.06b2

Can you please download and try it without manually overriding the WAN interface.
I have uploaded a patched vnstat-install.sh Beta v1.06b2

Can you please download and try it without manually overriding the WAN interface.
Ok, let me try it and update you.

By the way, this is my setup so I think the system automatic set the interface name to vlan500
1612963929921.png


Update: Installed with new code and from the output it detects WAN to my PPPoE interface, which I think is correct.
Code:
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log# curl --retry 3 "https://raw.githubusercontent.com/MartineauUK/vnstat/main/vnstat-install.sh" -o "/jffs/scripts/vnstat-install.sh" && chmod 755 "/jffs/scripts/vnstat-install.sh" && /jffs/scripts/vnstat-install.sh install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9364  100  9364    0     0  17836      0 --:--:-- --:--:-- --:--:-- 18542
/jffs/scripts/vnstat-install.sh: v1.06b2 Installing 'vnstat'....
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' Entware modules
Package vnstat (1.18-2) installed in root is up to date.
Package vnstati (1.18-2) installed in root is up to date.
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Package imagemagick (7.0.9-2) installed in root is up to date.
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' scripts to /jffs/addons/vnstat.d
######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
######################################################################################################################################################################################################################################################### 100.0%
######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
/jffs/scripts/vnstat-install.sh:    Creating Addons GUI TAB
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
vnstat-ui: Mounting vnstat-ui WebUI page as user10.asp

/jffs/scripts/vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
/jffs/scripts/vnstat-install.sh:    Creating cron jobs (e-mail cmd '/jffs/addons/vnstat.d/send-vnstat')
/jffs/scripts/vnstat-install.sh:    Adding cron jobs to services-start
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Error: Unable to read database "/opt/var/lib/vnstat/ppp0": No such file or directory
Info: -> A new database has been created.
Shutting down vnstatd...              done.
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 21:34:13 MYT 2021

ppp0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21         4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |

ppp0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days         4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
   current week         4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

ppp0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021        4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

vnstat_totals: summary generated
vnstats: vnstati updating stats for UI

admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#

The GUI page other than the last part is updated, others are not updated yet. I have tried to refreshed and it still show eth0 in the graph (time is before update).
1612964415444.png


I just realized another addon page gets created. So I have two of the vnstat/vnstati page. I proceed to reboot the router. After reboot, there is only 1 addon page loaded. But all the links are broken again.
 
Last edited:
Ok, let me try it and update you.

By the way, this is my setup so I think the system automatic set the interface name to vlan500
View attachment 30583

Update: Installed with new code and from the output it detects WAN to my PPPoE interface, which I think is correct.
Code:
admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log# curl --retry 3 "https://raw.githubusercontent.com/MartineauUK/vnstat/main/vnstat-install.sh" -o "/jffs/scripts/vnstat-install.sh" && chmod 755 "/jffs/scripts/vnstat-install.sh" && /jffs/scripts/vnstat-install.sh install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9364  100  9364    0     0  17836      0 --:--:-- --:--:-- --:--:-- 18542
/jffs/scripts/vnstat-install.sh: v1.06b2 Installing 'vnstat'....
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' Entware modules
Package vnstat (1.18-2) installed in root is up to date.
Package vnstati (1.18-2) installed in root is up to date.
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Package imagemagick (7.0.9-2) installed in root is up to date.
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' scripts to /jffs/addons/vnstat.d
######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
######################################################################################################################################################################################################################################################### 100.0%
######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
/jffs/scripts/vnstat-install.sh:    Creating Addons GUI TAB
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
vnstat-ui: Mounting vnstat-ui WebUI page as user10.asp

/jffs/scripts/vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
/jffs/scripts/vnstat-install.sh:    Creating cron jobs (e-mail cmd '/jffs/addons/vnstat.d/send-vnstat')
/jffs/scripts/vnstat-install.sh:    Adding cron jobs to services-start
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Error: Unable to read database "/opt/var/lib/vnstat/ppp0": No such file or directory
Info: -> A new database has been created.
Shutting down vnstatd...              done.
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 21:34:13 MYT 2021

ppp0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21         4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated        --     |      --     |      --     |

ppp0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days         4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
   current week         4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated        --     |      --     |      --     |

ppp0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021        4 KiB |      36 KiB |      40 KiB |    0.00 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        --     |      --     |      --     |

vnstat_totals: summary generated
vnstats: vnstati updating stats for UI

admin@RT-AC86U-DBA8:/tmp/mnt/amtm/entware/var/log#

The GUI page other than the last part is updated, others are not updated yet. I have tried to refreshed and it still show eth0 in the graph (time is before update).
View attachment 30584

I just realized another addon page gets created. So I have two of the vnstat/vnstati page. I proceed to reboot the router. After reboot, there is only 1 addon page loaded. But all the links are broken again.
So are you definitely using a PPP0 connection NOT eth0 , and the IPTV configuration is seemingly incorrectly setting nvram wan0_ifname then perhaps you need to uninstall then reinstall.
 
So are you definitely using a PPP0 connection NOT eth0 , and the IPTV configuration is seemingly incorrectly setting nvram wan0_ifname then perhaps you need to uninstall then reinstall.
Yes, I am using PPPoE. Internet is on vlan 500 and IPTV is on vlan 600. By select the predefined ISP profile, LAN 4 is set to vlan 600 for connection to STB. I don't watch the bundled IPTV so I go for manual setting and remove vlan tag for LAN 3 and LAN 4 and free up the port for LAN.

I have uninstalled, reboot and reinstalled. I can see the file get created but in the GUI the link are broken.
Code:
admin@RT-AC86U-DBA8:/tmp/var/wwwext/vnstat# ls -alh
drwxrwxrwx    2 admin    root         160 Feb 10 22:37 .
drwxr-xr-x   14 admin    root         620 Feb 10 22:37 ..
-rw-rw-rw-    1 admin    root        1.7K Feb 10 22:37 vnstat_ppp0_d.png
-rw-rw-rw-    1 admin    root        1.4K Feb 10 22:37 vnstat_ppp0_h.png
-rw-rw-rw-    1 admin    root        3.2K Feb 10 22:37 vnstat_ppp0_hs.png
-rw-rw-rw-    1 admin    root        1.6K Feb 10 22:37 vnstat_ppp0_m.png
-rw-rw-rw-    1 admin    root        2.2K Feb 10 22:37 vnstat_ppp0_s.png
-rw-rw-rw-    1 admin    root        1.0K Feb 10 22:37 vnstat_ppp0_t.png

Code:
ASUSWRT-Merlin RT-AC86U 386.1_0 Sat Jan 30 20:22:26 UTC 2021
admin@RT-AC86U-DBA8:/tmp/home/root# curl --retry 3 "https://raw.githubusercontent.com/MartineauUK/vnstat/main/vnstat-install.sh" -o "/jffs/scripts/vnstat-install.sh" && chmod 755 "/jffs/scripts/vnstat-install.sh" && /jffs/scripts/vnstat-install.sh install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9364  100  9364    0     0  16456      0 --:--:-- --:--:-- --:--:-- 18253
/jffs/scripts/vnstat-install.sh: v1.06b2 Installing 'vnstat'....
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' Entware modules
Installing vnstat (1.18-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/vnstat_1.18-2_aarch64-3.10.ipk
Installing vnstati (1.18-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/vnstati_1.18-2_aarch64-3.10.ipk
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Installing imagemagick (7.0.9-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/imagemagick_7.0.9-2_aarch64-3.10.ipk
Configuring vnstat.
Configuring vnstati.
Configuring imagemagick.
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' scripts to /jffs/addons/vnstat.d
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
######################################################################################################################################################################################################################################################### 100.0%
/jffs/scripts/vnstat-install.sh:    Creating Addons GUI TAB
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
vnstat-ui: Mounting vnstat-ui WebUI page as user9.asp

/jffs/scripts/vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
/jffs/scripts/vnstat-install.sh:    Creating cron jobs (e-mail cmd '/jffs/addons/vnstat.d/send-vnstat')
/jffs/scripts/vnstat-install.sh:    Adding cron jobs to services-start
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 22:37:53 MYT 2021

ppp0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21    605.13 MiB |  434.29 MiB |    1.02 GiB |   10.50 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated      1.72 GiB |    1.23 GiB |    2.96 GiB |

ppp0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days    605.13 MiB |  434.29 MiB |    1.02 GiB |   14.53 kbit/s
   current week    605.13 MiB |  434.29 MiB |    1.02 GiB |   34.29 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated      1.42 GiB |    1.02 GiB |    2.43 GiB |

ppp0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021   605.13 MiB |  434.29 MiB |    1.02 GiB |  107.02 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       642 MiB |     460 MiB |    1.08 GiB |

convert: UnableToOpenBlob '/tmp/var/wwwext/vnstat/vnstat.png': No such file or directory @ error/blob.c/OpenBlob/3496.
convert: WriteBlob Failed `/tmp/var/wwwext/vnstat/vnstat.png' @ error/png.c/MagickPNGErrorHandler/1715.
vnstat_totals: summary generated
vnstats: vnstati updating stats for UI

admin@RT-AC86U-DBA8:/tmp/home/root#
admin@RT-AC86U-DBA8:/tmp/home/root# /jffs/addons/vnstat.d/vnstat-ww.sh
vnstats: vnstati updating stats for UI
admin@RT-AC86U-DBA8:/tmp/home/root#
 
Last edited:
I have uninstalled, reboot and reinstalled. I can see the file get created but in the GUI the link are broken.
Me too.
 
Yes, I am using PPPoE. Internet is on vlan 500 and IPTV is on vlan 600. By select the predefined ISP profile, LAN 4 is set to vlan 600 for connection to STB. I don't watch the bundled IPTV so I go for manual setting and remove vlan tag for LAN 3 and LAN 4 and free up the port for LAN.

I have uninstalled, reboot and reinstalled. I can see the file get created but in the GUI the link are broken.
Code:
admin@RT-AC86U-DBA8:/tmp/var/wwwext/vnstat# ls -alh
drwxrwxrwx    2 admin    root         160 Feb 10 22:37 .
drwxr-xr-x   14 admin    root         620 Feb 10 22:37 ..
-rw-rw-rw-    1 admin    root        1.7K Feb 10 22:37 vnstat_ppp0_d.png
-rw-rw-rw-    1 admin    root        1.4K Feb 10 22:37 vnstat_ppp0_h.png
-rw-rw-rw-    1 admin    root        3.2K Feb 10 22:37 vnstat_ppp0_hs.png
-rw-rw-rw-    1 admin    root        1.6K Feb 10 22:37 vnstat_ppp0_m.png
-rw-rw-rw-    1 admin    root        2.2K Feb 10 22:37 vnstat_ppp0_s.png
-rw-rw-rw-    1 admin    root        1.0K Feb 10 22:37 vnstat_ppp0_t.png

Code:
ASUSWRT-Merlin RT-AC86U 386.1_0 Sat Jan 30 20:22:26 UTC 2021
admin@RT-AC86U-DBA8:/tmp/home/root# curl --retry 3 "https://raw.githubusercontent.com/MartineauUK/vnstat/main/vnstat-install.sh" -o "/jffs/scripts/vnstat-install.sh" && chmod 755 "/jffs/scripts/vnstat-install.sh" && /jffs/scripts/vnstat-install.sh install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9364  100  9364    0     0  16456      0 --:--:-- --:--:-- --:--:-- 18253
/jffs/scripts/vnstat-install.sh: v1.06b2 Installing 'vnstat'....
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' Entware modules
Installing vnstat (1.18-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/vnstat_1.18-2_aarch64-3.10.ipk
Installing vnstati (1.18-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/vnstati_1.18-2_aarch64-3.10.ipk
Package libjpeg-turbo (2.0.6-1) installed in root is up to date.
Installing imagemagick (7.0.9-2) to root...
Downloading http://bin.entware.net/aarch64-k3.10/imagemagick_7.0.9-2_aarch64-3.10.ipk
Configuring vnstat.
Configuring vnstati.
Configuring imagemagick.
/jffs/scripts/vnstat-install.sh:    Installing 'vnstat' scripts to /jffs/addons/vnstat.d
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
######################################################################################################################################################################################################################################################### 100.0%
/jffs/scripts/vnstat-install.sh:    Creating Addons GUI TAB
#=#=-  #       #                                                                                                                                                                                                                                               #=O#-     #        #            ######################################################################################################################################################################################################################################################### 100.0%
vnstat-ui: Mounting vnstat-ui WebUI page as user9.asp

/jffs/scripts/vnstat-install.sh:    Adding 'vnstat-ui' Addons GUI TAB creation service-event (@boot)
/jffs/scripts/vnstat-install.sh:    Creating cron jobs (e-mail cmd '/jffs/addons/vnstat.d/send-vnstat')
/jffs/scripts/vnstat-install.sh:    Adding cron jobs to services-start
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Customising 'vnstat.conf' 'BandwidthDetection 0'
/jffs/scripts/vnstat-install.sh:    Customising 'S32vnstat/vnstat-ww.sh' scripts Auto detected WAN 'Interface ppp0'
/jffs/scripts/vnstat-install.sh:    Requesting /opt/etc/init.d/S32vnstat.....will then pause for  5 seconds to generate data points
Starting vnstatd...              done.
/jffs/scripts/vnstat-install.sh:    .....paused for 5 seconds to generate data points

Vnstats as of:

Wed Feb 10 22:37:53 MYT 2021

ppp0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Feb '21    605.13 MiB |  434.29 MiB |    1.02 GiB |   10.50 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated      1.72 GiB |    1.23 GiB |    2.96 GiB |

ppp0  /  weekly

                      rx      |     tx      |    total    |   avg. rate
   ---------------------------+-------------+-------------+---------------
    last 7 days    605.13 MiB |  434.29 MiB |    1.02 GiB |   14.53 kbit/s
   current week    605.13 MiB |  434.29 MiB |    1.02 GiB |   34.29 kbit/s
   ---------------------------+-------------+-------------+---------------
      estimated      1.42 GiB |    1.02 GiB |    2.43 GiB |

ppp0  /  daily

         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     02/10/2021   605.13 MiB |  434.29 MiB |    1.02 GiB |  107.02 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated       642 MiB |     460 MiB |    1.08 GiB |

convert: UnableToOpenBlob '/tmp/var/wwwext/vnstat/vnstat.png': No such file or directory @ error/blob.c/OpenBlob/3496.
convert: WriteBlob Failed `/tmp/var/wwwext/vnstat/vnstat.png' @ error/png.c/MagickPNGErrorHandler/1715.
vnstat_totals: summary generated
vnstats: vnstati updating stats for UI

admin@RT-AC86U-DBA8:/tmp/home/root#
admin@RT-AC86U-DBA8:/tmp/home/root# /jffs/addons/vnstat.d/vnstat-ww.sh
vnstats: vnstati updating stats for UI
admin@RT-AC86U-DBA8:/tmp/home/root#
OK thanks.

So to clarify, if 'ppp0' or 'vlan500' is used as the WAN interface (identified either automatically by the script or manually specified), then the GUI links (except for the CLI window) always fail?

I'll let the incumbent SME @dev_null identify/resolve the issue.
 
I just realized another addon page gets created. So I have two of the vnstat/vnstati page. I proceed to reboot the router. After reboot, there is only 1 addon page loaded. But all the links are broken again.
vnstat-install cannot remove the 'Vnstat/vnstati' addon GUI Tab as @dev_null's script to manage the GUI does not recognise or have any code to delete the tab

Code:
        # Remove Addons tab
        if [ -n "$(grep "uninstall)" /jffs/addons/vnstat.d/vnstat-ui)" ];then    # v1.07
            logger -st "$0" "Removing Addons GUI TAB"
            /jffs/addons/vnstat.d/vnstat-ui uninstall        # v1.07
        fi
However during the install vnstat.d/vnstat-ui apparently doesn't seem to correctly detect that its GUI tab already exists.

I'll let SME @dev_null address this issue.
 
Status
Not open for further replies.

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