Posted: Mon Jan 10, 2022 3:40 Post subject: Can ttraff data be saved to somewhere other than nvram?
Can ttraff data be saved to USB storage or even the internal jffs, instead of nvram?
I just realized it's just a matter of time until nvram is filled, since ttraff stores an additional ~300 bytes per month, and that might, or will, cause issues eventually.
Sure. nvram show | grep ttraff. You'll notice which one[s] to save. Not sure what you'll do with it except reload unless you roll your own. Current releases have backup/restore _________________ Current: Netgear R9000 DD-WRT v3.0-r55460 std (03/25/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5
I mean can the ttraff daemon store the data directly onto a different storage instead of nvram?
if you're thinking of live data, then no. Maybe it's worth a request?!?? We were lucky to get save/restore current for upgrades w/reset. _________________ Current: Netgear R9000 DD-WRT v3.0-r55460 std (03/25/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5
Any idea how many write or erase cycles the tiny nvram can take? At least I can monitor the free space and delete some ttraff entries myself when needed but if nvram dies then the whole router is done for.
Could be ... but router flash will likely give out first. Same if storing to USB flash. _________________ Current: Netgear R9000 DD-WRT v3.0-r55460 std (03/25/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5
Joined: 24 Oct 2008 Posts: 1079 Location: Latin America
Posted: Fri Jan 14, 2022 13:16 Post subject:
fizikz wrote:
Any idea how many write or erase cycles the tiny nvram can take? At least I can monitor the free space and delete some ttraff entries myself when needed but if nvram dies then the whole router is done for.
The NVRAM supports thousands of writing cycles, deppending on which technology is manufactured of. (And traff defaults nvram commmits daily).
What is more important is the limted size of the NVRAM, therefore traff uses a mechanism to automatically purge old data when the free space is low.
On the other hand, as a workaround for saving the long-term data before erasing it, we can create an script and use nvram show |grep traff and logger or ftp that to an external server, or redirect it to a local file. _________________ 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.
Being able to write to USB would be ideal, as requested in that ticket, because USB drives are cheap and easy to replace, compared to replacing a router. Plus with the large size of USB flash drives, it would take a long time to reach failure.
Joined: 24 Oct 2008 Posts: 1079 Location: Latin America
Posted: Tue Jan 18, 2022 23:53 Post subject:
fizikz wrote:
feliciano wrote:
The NVRAM supports thousands of writing cycles, deppending on which technology is manufactured of. (And traff defaults nvram commmits daily).
Thousands of write cycles sounds quite little in the context of daily writes. I hope it's more. Any idea what kind of flash that little 64KiB is?
AFAIK, nvram is a dedicated partition of the flash of a router, therefore it has the same endurance of the technology it was choosen for the particular equipment, so it can reach 10000 or 100000 cycles deppending on that. The main constrain here is "wear leveling" technology (popular for SSDs) is complicated for an area with constant low free space.
fizikz wrote:
Being able to write to USB would be ideal, as requested in that ticket, because USB drives are cheap and easy to replace, compared to replacing a router. Plus with the large size of USB flash drives, it would take a long time to reach failure.
feliciano wrote:
a workaround for saving the long-term data before erasing it, we can create an script and use nvram show |grep traff and logger or ftp that to an external server, or redirect it to a local file.
This "local file" can be on a mounted USB drive. _________________ 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.
Last edited by feliciano on Wed Jan 19, 2022 0:02; edited 2 times in total
AFAIK, nvram is a dedicated partition of the flash of the router, therefore it has the same endurance of the technology upon it was choosen for a particular system, so it can reach 10000 or 100000 cycles deppending on that. The main constrain here is "wear leveling" technology (popular for SSDs) is complicated for an area with constant low free space.
10000 or 100000 cycles would be more comfortable, but yes the wear leveling and write amplification complications remain on a tiny storage.
Any reports of dying flash on routers, a general idea of how long it typically took, and under what types of usage?