Bandwidth Monitor monthly, daily usage lost when power off

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
missblack
DD-WRT Novice


Joined: 03 May 2017
Posts: 10

PostPosted: Fri Apr 02, 2021 14:10    Post subject: Bandwidth Monitor monthly, daily usage lost when power off Reply with quote
When I check the router Bandwidth Monitor monthly usage, Daily usage lost power off.

So, should I make the router has an hourly restart or any idea how to keep the daily usage or auto-save it in case the power switched off?
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14207
Location: Texas, USA

PostPosted: Fri Apr 02, 2021 14:28    Post subject: Reply with quote
That information is written to RAM, it does not survive a reboot or power cycle AFAIK.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1051964

https://www.howtogeek.com/222740/how-to-the-monitor-the-bandwidth-and-data-usage-of-individual-devices-on-your-network/

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5690

PostPosted: Fri Apr 02, 2021 15:00    Post subject: Reply with quote
Save the traffic log data to NVRAM more often?
missblack
DD-WRT Novice


Joined: 03 May 2017
Posts: 10

PostPosted: Fri Apr 02, 2021 19:17    Post subject: Reply with quote
kernel-panic69 wrote:
That information is written to RAM, it does not survive a reboot or power cycle AFAIK.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1051964

https://www.howtogeek.com/222740/how-to-the-monitor-the-bandwidth-and-data-usage-of-individual-devices-on-your-network/


I do not want to monitor each device, Only the total monthly traffic that I am looking for, to know how much bandwidth has been used.

But I see traffic from days ago, it lost only when the power off the electricity of the device only.

but still can see a few days usage of the bandwidth normally so it will not be lost if I reboot, the issue only with power off that I lost the last data.
missblack
DD-WRT Novice


Joined: 03 May 2017
Posts: 10

PostPosted: Fri Apr 02, 2021 19:25    Post subject: Reply with quote
blkt wrote:
Save the traffic log data to NVRAM more often?


I am not sure I understand scripting

but does this solve it?
Code:
nvram commit


How?

In Additional Cron Jobs maybe?
Code:
0 * * * * nvram commit


Is it correct?
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5690

PostPosted: Fri Apr 02, 2021 20:26    Post subject: Reply with quote
nvram commit is correct as ttraffd does once a day at 23:59, but ensure time zone is set and time is synced.

https://svn.dd-wrt.com//browser/src/router/rc/ttraff.c

A reboot command automatically commits nvram, or you can manually run nvram commit before power off.
missblack
DD-WRT Novice


Joined: 03 May 2017
Posts: 10

PostPosted: Fri Apr 02, 2021 20:52    Post subject: Reply with quote
blkt wrote:
nvram commit is correct as ttraffd does once a day at 23:59, but ensure time zone is set and time is synced.

https://svn.dd-wrt.com//browser/src/router/rc/ttraff.c

A reboot command automatically commits nvram, or you can manually run nvram commit before power off.


So, I can't add to Additional Cron Jobs

Like this :
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5690

PostPosted: Fri Apr 02, 2021 21:01    Post subject: Reply with quote
I'm not saying what you can or cannot do, but I personally would not automate nvram commit every hour.

Maybe consider an external bandwidth monitoring solution, ttraffd is the first thing I disable on my routers.

There is also this, though no longer developed. YAMon 3.4 - usage monitoring for your router
missblack
DD-WRT Novice


Joined: 03 May 2017
Posts: 10

PostPosted: Fri Apr 02, 2021 21:17    Post subject: Reply with quote
blkt wrote:
ttraffd is the first thing I disable on my routers.

Yes, but why you disable it, I found it useful.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5690

PostPosted: Fri Apr 02, 2021 21:24    Post subject: Reply with quote
I would consider it if logging more than the most basic information and with ability to store data externally.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum