So i was wondering were the data for the bandwidth usage is saved...
I used to use Tomato which offered to save the bandwidth usage data in several places... ram only, nvram, cifs, etc...
I'm asking cause i don't want to loose the data on power failures and we get a lot of those here. I also hope its not saved in the nvram, as frequent writes in there will eventually brick the router for good.
Were's the bandwidth usage data saved?
Moderator: Moderators
- DoesItMatter
- Moderator
- Posts: 1373
- Joined: Thu May 21, 2009 3:56 pm
Re: Were's the bandwidth usage data saved?
I think its under
usr/data/bwmon
and yes, It does write to flash - where else is it going to write?
has to write to flash to preserve the data in case of a reboot
and/or power failure.
usr/data/bwmon
and yes, It does write to flash - where else is it going to write?
has to write to flash to preserve the data in case of a reboot
and/or power failure.


2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400
Re: Were's the bandwidth usage data saved?
Whats the write frequency?
- DoesItMatter
- Moderator
- Posts: 1373
- Joined: Thu May 21, 2009 3:56 pm
Re: Were's the bandwidth usage data saved?
Not sure... you would have to check that yourself.
If you login via telnet, you can check it every so often.
Maybe hourly? I think its more often than daily because it
should have pretty current data if the router happened to reboot.
I am not sure myself as I never monitor bandwidth usage.
I've only used it a couple of times just to test the feature.
----------------------------
Edit: OK - found out where this setting is:
Status Tab -> Bandwidth Usage sub-tab -> Time Frame setting
You can choose every 15 mins, every 6 hours, every day, etc...
So you can choose what you think is best for your area,
depending I guess on how often you might have a power outage.
If you login via telnet, you can check it every so often.
Maybe hourly? I think its more often than daily because it
should have pretty current data if the router happened to reboot.
I am not sure myself as I never monitor bandwidth usage.
I've only used it a couple of times just to test the feature.
----------------------------
Edit: OK - found out where this setting is:
Status Tab -> Bandwidth Usage sub-tab -> Time Frame setting
You can choose every 15 mins, every 6 hours, every day, etc...
So you can choose what you think is best for your area,
depending I guess on how often you might have a power outage.


2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400
Re: Were's the bandwidth usage data saved?
In the Tomato firmware I used previously http://www.polarcloud.com/tomatofaq#what_is_cifs, usage data could be optionally saved to a cifs share. This worked well for me as I have a ReadyNAS which can provide cifs shares as well as NFS shares etc. So I would provide a special share just for my router to use.
Lets not reinvent the wheel, maybe the code can be borrowed.
Lets not reinvent the wheel, maybe the code can be borrowed.
Re: Were's the bandwidth usage data saved?
DoesItMatter: that's not the write frequency, that's the display frequency for the graph/tables.
The write frequency is hard-coded to once every 4 hours.
The data is saved (in binary form) to files in /usr/data/bwmon and /tmp/data/bwmon. Note that /usr/data/bwmon files are persistent, while /tmp/data/bwmon is on the ramdisk, so these files get erased when the router reboots. Only short time-frame files are saved to the ramdisk.
The write frequency is hard-coded to once every 4 hours.
The data is saved (in binary form) to files in /usr/data/bwmon and /tmp/data/bwmon. Note that /usr/data/bwmon files are persistent, while /tmp/data/bwmon is on the ramdisk, so these files get erased when the router reboots. Only short time-frame files are saved to the ramdisk.
Re: Were's the bandwidth usage data saved?
Ive just started using gargoyle & definitely like the simplified interface. I was using both tomato & dd-wrt on different routers
Thankyou for specifying the user data locations
If not could it be a request for a future release.... Im on a cable internet connection & a lot of data can be downloaded in 4 hours
Thankyou for specifying the user data locations

Is it possible to change this write freq value from 4 hours via code / script?Eric wrote:The write frequency is hard-coded to once every 4 hours
If not could it be a request for a future release.... Im on a cable internet connection & a lot of data can be downloaded in 4 hours