Page 1 of 1

Were's the bandwidth usage data saved?

Posted: Mon Aug 09, 2010 11:38 pm
by thecrazy
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.

Re: Were's the bandwidth usage data saved?

Posted: Tue Aug 10, 2010 1:59 am
by DoesItMatter
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.

Re: Were's the bandwidth usage data saved?

Posted: Tue Aug 10, 2010 7:07 pm
by thecrazy
Whats the write frequency?

Re: Were's the bandwidth usage data saved?

Posted: Wed Aug 11, 2010 2:05 am
by DoesItMatter
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.

Re: Were's the bandwidth usage data saved?

Posted: Thu Aug 12, 2010 1:55 am
by hipitihop
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.

Re: Were's the bandwidth usage data saved?

Posted: Sat Aug 14, 2010 5:49 pm
by Eric
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.

Re: Were's the bandwidth usage data saved?

Posted: Wed Jun 08, 2011 2:08 am
by billymm
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 ;)
Eric wrote:The write frequency is hard-coded to once every 4 hours
Is it possible to change this write freq value from 4 hours via code / script?

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