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!

I never saw anything like this in testing. Apologies.

It's one of my Special Powers to be able to find stuff like this, so don't apologise!
I'll hang off doing a full uninstall/reinstall (as my next step?) until I hear back from you guys.
Would prefer to keep my data for last 3 months if possible ...

:)
 
It's one of my Special Powers to be able to find stuff like this, so don't apologise!
I'll hang off doing a full uninstall/reinstall (as my next step?) until I hear back from you guys.
Would prefer to keep my data for last 3 months if possible ...

:)
Same issue here.

A manual install seemed to allow me to update to 2.0.

See the GitHub -


--

/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/de-vnull/vnstat-on-merlin/main/dn-vnstat.sh" -o "/jffs/scripts/dn-vnstat" && chmod 0755 /jffs/scripts/dn-vnstat && /jffs/scripts/dn-vnstat install

--
 
A manual install seemed to allow me to update to 2.0.

@Todd_Hawaii

Manual command-line install/upgrade worked for me as well, thanks for the tip!
Appears to have retained all my data from what I can tell so far I think?

@dev_null @Jack Yaz

2.0 is looking great and very useful, congratulations to both of you!

2 questions ...

1 - I'm not sure the "Start day for bandwidth allowance cycle" is being honoured?
I have always had my start of cycle set to Day 14, but after the update to 2.0, this had reset itself to the default Day 1 in both CLI and GUI. Is this a minor bug?
After a couple of hours I noticed this and set it back to (correct for me) Day 14, but in the GUI the monthly entries are displaying as though the cycle still starts on Day 1, see screen shot.
The actual upload/download/total looks right, if I add up my individual dailies for July 14-19 ...
So maybe just a display bug? Each monthly tally used to display as 2021-07 (14) for example ... maybe it's the result of doing the manual CLI upgrade/reinstall as opposed to the AMTM upgrade?

Start Day Bug.jpg



2 - Now that I've successfully upgraded, I've switched location to USB, which I assume copies my old data from JFFS to USB?
So far I don't seem to have regained any JFFS space ... is the location "switching" process supposed to"clean up" JFFS and free up space?
If not, where should I look in JFFS and what can I (safely) delete to free up space?
 
Last edited:
@Todd_Hawaii

2 - Now that I've successfully upgraded, I've switched location to USB, which I assume copies my old data from JFFS to USB?
So far I don't seem to have regained any JFFS space ... is the location "switching" process supposed to"clean up" JFFS and free up space?
If not, where should I look in JFFS and what can I (safely) delete to free up space?
the files used for dn-vnstat are tiny. the location switch moves /jffs/addons/dn-vnstat.d to /opt/share/dn-vnstat.d
database files have always been stored on USB in /opt/var/lib/vnstat

the location switch to USB is more of a mechanism to provide "portability" should your router suddenly die and you lose access to JFFS
 
R1 to R2 upgraders, my apologies for the botched update. I foolishly left a reference to a Github branch which I deleted some time last night after R2 went live, as there had be no "HALP" posts within the first hour or so of release. Little did I know, deleting the branch actually triggered a failure. I have restored the branch so now R1 to R2 upgrades will go through OK.
 
USB only became a choice with 2.0.0, JFFS has been the default.

This is what the new charts look like. If you had them you'd know it.

So does the UI state it's version 2.0.0 or 1.0.2? If it's 1.0.2 and you update from the UI does it work?

I'm confounded because I tested the update at least 50 different times, and a fail to update wasn't an issue I encountered.
this was my mistake, sorry for creating work and confusion.
 
what did the update warning say about a config reset? ;-)

@Jack Yaz

Hmmm, OK guilty as charged ...
I'm usually not too bad at RTFM, but comprehensively failed on this occasion!

:)

Now that I've "fixed" it though, what about the display glitch, as in 2021-07 (1) should actually be displaying as 2021-07 (14) ?
 
@Jack Yaz

Hmmm, OK guilty as charged ...
I'm usually not too bad at RTFM, but comprehensively failed on this occasion!

:)

Now that I've "fixed" it though, what about the display glitch, as in 2021-07 (1) should actually be displaying as 2021-07 (14) ?
that information comes from vnstat itself, I suspect it will correct itself for the next month when the next month starts
historical data we can possibly amend in the database itself. are you able to send me a copy of your db file from /opt/var/lib/vnstat so I can poke at it with sqlite?
 
R1 to R2 upgraders, my apologies for the botched update. I foolishly left a reference to a Github branch which I deleted some time last night after R2 went live, as there had be no "HALP" posts within the first hour or so of release. Little did I know, deleting the branch actually triggered a failure. I have restored the branch so now R1 to R2 upgrades will go through OK.
Upgrade went thru this morning. Thanks!
 
are you able to send me a copy of your db file from /opt/var/lib/vnstat so I can poke at it with sqlite?
@Jack Yaz

Sure, if you can be bothered and really want to have a play. Appreciate it.
Have sent you a PM with OneDrive link to Zipped folder ..

(Later)
If you DO figure out what it is that needs to be changed and can document it for mere mortals,
I can probably have a crack at editing it myself locally which would make it more up to date without "holes" in the data?

I had a quick look with DB Browser and is it as simple as changing the dates in the "Month" Table?
No, surely that would be too obvious? :)

DB Browser for SQLiteDB Browser for SQLite - -Users-stephenh-Desktop-vnstat-edit-vnstat.dbScre...jpg



Edit: Yep, got a chance to try that and as I thought it's NOT that simple ... didn't work.
 
Last edited:
I upgraded to 2.0 with no problems, but found I haven't been recording stats since July 4! ARG! (Well, this is a backup for normal bandwidth stats, so not a huge loss, but I was surprised)

Found this in the log following a reboot:
Code:
May  5 00:05:25 AC86U-MAIN vnstat: Starting monitoring for interface eth0
May  5 00:05:25 AC86U-MAIN vnstat: NTP not synced, exiting

And only 4 lines later the time sync kicked in (to July 4). That was a firmware upgrade, maybe something slowed down the normal boot, since this has been working for several months.

I am running ntpMerlin (chrony), is there something I need to add in vnStat config to make this work better? I thought I remembered some discussion about NTP watchdogs, but I can't find it now :(

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

I have actually only used 24.35 GB.
 
I thought I remembered some discussion about NTP watchdogs, but I can't find it now :(
@pdc

You need to install another of @Jack Yaz 's fine add-ons, scMerlin 2.3.0, from the AMTM menu, and then you can activate the NTP Watchdog from there, in either the CLI or Web GUI.
 
@pdc

You need to install another of @Jack Yaz 's fine add-ons, scMerlin 2.3.0, from the AMTM menu, and then you can activate the NTP Watchdog from there, in either the CLI or Web GUI.
Oh, that's why I couldn't find it, all part of the YazSuite™ :cool:

Thanks!
 
What does NTP watchdog script do?
See this post: https://www.snbforums.com/threads/ntp-boot-watchdog-script.71069/

Basically it will pause other scripts from running until NTP is up. Which in turn should help avoid the vnstat error I saw:
Code:
May  5 00:05:25 AC86U-MAIN vnstat: Starting monitoring for interface eth0
May  5 00:05:25 AC86U-MAIN vnstat: NTP not synced, exiting
The May 5 is another sign that time sync has not yet occurred... (This was actually on July 4, a few weeks ago)
 
The Data Usage and Compare Usage shows No Data to display for me?

Edit: Ahh, think there's a collection period for time to populate.
 
The Data Usage and Compare Usage shows No Data to display for me?

Edit: Ahh, think there's a collection period for time to populate.
What does that mean? I was seeing data but can't anymore after changing storage location to USB from jffs.
 

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