Can ttraff data be saved to somewhere other than nvram?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2
Author Message
feliciano
DD-WRT Guru


Joined: 24 Oct 2008
Posts: 1079
Location: Latin America

PostPosted: Wed Jan 19, 2022 0:05    Post subject: Reply with quote
fizikz wrote:
Any reports of dying flash on routers, a general idea of how long it typically took, and under what types of usage?

Of the many routers I have had, I recall one ubiquity, one belkin, and a third one dying because nvram issues. I killed the air-station by enabling some fancy spectrum analysis feature it had, the others were old by the time, although quality issues cannot be discarded.

_________________
If you want support, please read first the announcements and forum rules.
Si usted desea ayuda, por favor lea primero los anuncios y las reglas del foro.
Sponsor
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Wed Jan 19, 2022 4:47    Post subject: Reply with quote
feliciano wrote:
Of the many routers I have had, I recall one ubiquity, one belkin, and a third one dying because nvram issues. I killed the air-station by enabling some fancy spectrum analysis feature it had, the others were old by the time, although quality issues cannot be discarded.


So the danger is quite real. I hope the feature request to store ttraff data directly to USB gets implemented sooner rather than later, but we all know how strained the development resources are already.
feliciano
DD-WRT Guru


Joined: 24 Oct 2008
Posts: 1079
Location: Latin America

PostPosted: Wed Jan 19, 2022 11:10    Post subject: Reply with quote
Don't get me wrong, I don't think it was ttraff what damaged those routers. I have had several equipments running ttraff and logs for years without other memory issues. The three millenials routers I refer perhaps were of a cheaper/basic technology and/or suffered other issues (but I'm almost sure the airrouter was because a failure on it's stock firmware).

But if this concerns you so much, you can write a cron script to generate traffic counters and store those to a file on a mounted USB drive. The most rudimentary/universal way to do that would it be something related with:
Code:
ifconfig $WAN_if |grep "RX bytes"
ifconfig $WAN_if |grep "TX bytes"

store it to a RAM variable or a temp file, wait, repeat, substract, store the traffic stats, (avg speed, etc.).

_________________
If you want support, please read first the announcements and forum rules.
Si usted desea ayuda, por favor lea primero los anuncios y las reglas del foro.
kernel-panic69
DD-WRT Guru


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

PostPosted: Wed Jan 19, 2022 15:54    Post subject: Reply with quote
Just to reiterate a workaround / solution given already:
egc wrote:
https://elatov.github.io/2017/01/email-dd-wrt-monthly-bandwidth-usage/

To answer your question, yes it can be saved elsewhere and retained. You also have the option of using YaMon instead, which uses a USB drive and not nvram, if I am not mistaken.

_________________
"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
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Sun Jan 23, 2022 23:10    Post subject: Reply with quote
Ideally, the ttraff feature request for writing to USB gets implemented soon™ / eventually. Next to that, the most practical option looks like YaMon, but I'm hesitant about a project that seems abandoned and unenthusiastic about it fetching files from the internet.
feliciano
DD-WRT Guru


Joined: 24 Oct 2008
Posts: 1079
Location: Latin America

PostPosted: Tue Jan 25, 2022 16:22    Post subject: Reply with quote
fizikz wrote:
Ideally, the ttraff feature request for writing to USB gets implemented soon™ / eventually. Next to that, the most practical option looks like YaMon, but I'm hesitant about a project that seems abandoned and unenthusiastic about it fetching files from the internet.

YaMon is Open Source, so anyone can check the source code and/or compile it / install it whether hesitant.
On the other hand -without wanting to start an argument- I assume you are running dd-wrt, which most likely you downloaded "from the Internet", so that's the whole thing with 3rd party projects, you either trust on the community and accept what is being shared with you for free (as in a beer?), or you examine the code yourself, or write your own code, or stick with the manufacturer's code (on which "you trust"). [End of off Topic].

_________________
If you want support, please read first the announcements and forum rules.
Si usted desea ayuda, por favor lea primero los anuncios y las reglas del foro.
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Tue Jan 25, 2022 21:23    Post subject: Reply with quote
feliciano wrote:
YaMon is Open Source, so anyone can check the source code and/or compile it / install it whether hesitant.
On the other hand -without wanting to start an argument- I assume you are running dd-wrt, which most likely you downloaded "from the Internet", so that's the whole thing with 3rd party projects, you either trust on the community and accept what is being shared with you for free (as in a beer?), or you examine the code yourself, or write your own code, or stick with the manufacturer's code (on which "you trust"). [End of off Topic].

What I mean is that I don't like a program running on the router fetching files from usage-monitoring.com and google:
https://usage-monitoring.com/help/?t=doLocalFiles
It can make sense for webpages to fetch css and js files, but I don't like a program having such dependencies.
Even more so now that YaMon development appears to be abandoned.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Wed Jan 26, 2022 6:49    Post subject: Reply with quote
Updated Zabbix Template, https://searx.me/ -> https://serx.cf/search?q=open+source+network+monitoring
MesMurized
DD-WRT User


Joined: 08 Aug 2017
Posts: 84

PostPosted: Thu Jan 27, 2022 3:53    Post subject: Reply with quote
Once/day nvram write?!??
Quote:
grep ttraff /var/log/messages*
/var/log/messages:Jan 25 23:59:51 P9000-DD-WRT user.debug : ttraff: data for 25-1-2022 commited to nvram
/var/log/messages.0:Jan 24 21:31:34 P9000-DD-WRT user.info : [ttraff] : traffic counter daemon successfully started
/var/log/messages.0:Jan 24 21:31:34 P9000-DD-WRT user.debug : ttraff: data collection started
/var/log/messages.0:Jan 24 23:59:28 P9000-DD-WRT user.debug : ttraff: data for 24-1-2022 commited to nvram

_________________
Current: Netgear R9000 DD-WRT v3.0-r55460 std (03/25/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
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