Saving bandwidth monitoring data to USB, higher frequency saving
Moderator: Moderators
Saving bandwidth monitoring data to USB, higher frequency saving
Hi all, is there a way to get bandwidth monitoring data to save to an attached USB drive rather than the on-board flash memory? I would also like to get data saved more frequently in combination with writing to the USB drive. My understanding is data are only saved every four hours, with that frequency intended to preserve the life of the flash - however, I assume writing to a USB would make the external memory the disposable object which is easier to replace.
Re: Saving bandwidth monitoring data to USB, higher frequency saving
It's not really configurable, but you could customise it yourself.
Is that something you're comfortable with and would like guidance on?
Is that something you're comfortable with and would like guidance on?
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Saving bandwidth monitoring data to USB, higher frequency saving
My gut reaction is to say yes. It's hard to gauge without knowing how extensive the customization work would be, but I'm generally adventurous. Let's go for it!
Re: Saving bandwidth monitoring data to USB, higher frequency saving
Alright, by no means a comprehensive guide.
/etc/init.d/bwmon-gargoyle
https://github.com/ericpaulbishop/gargo ... it#L20-L32
Those lines control where the backups will be read from for restoring into memory
https://github.com/ericpaulbishop/gargo ... it#L36-L38
Those lines control where the backups will be output to.
https://github.com/ericpaulbishop/gargo ... .init#L283
Controls how often the backup fires
You also need to make sure that the usb stick is available at boot before bwmon starts. As it currently stands it would attempt to start first. You might want to change its start order to 99 (last) and disable then enable the startup script so it relinks to the right spot.
https://github.com/ericpaulbishop/gargo ... nd.init#L2
If you wanted to backup quotas as well, that's a little more in-depth.
/etc/init.d/bwmon-gargoyle
https://github.com/ericpaulbishop/gargo ... it#L20-L32
Those lines control where the backups will be read from for restoring into memory
https://github.com/ericpaulbishop/gargo ... it#L36-L38
Those lines control where the backups will be output to.
https://github.com/ericpaulbishop/gargo ... .init#L283
Controls how often the backup fires
You also need to make sure that the usb stick is available at boot before bwmon starts. As it currently stands it would attempt to start first. You might want to change its start order to 99 (last) and disable then enable the startup script so it relinks to the right spot.
https://github.com/ericpaulbishop/gargo ... nd.init#L2
If you wanted to backup quotas as well, that's a little more in-depth.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Saving bandwidth monitoring data to USB, higher frequency saving
Did you make any progress on this? I ask because I had issues with my main router a few months ago and ended up having to replace it. The symptoms made me suspicious that I may have thrashed a portion of the flash, with approx 150 users and 2 years of use. @Lantis Do you know how much/if any wear leveling happens with OpenWRT/Gargoyle? I may be totally off base and just need to re-flash the firmware, but worth getting an expert opinion.
Re: Saving bandwidth monitoring data to USB, higher frequency saving
There's no wear levelling in OpenWrt/Gargoyle itself. The flash controllers may do some on board, and may do detection of bad blocks.
This is also dependent on flash chip, and file system type.
The backups are triggered every 4 hours, which for 2 years is ~4.5k writes. It should not have caused significant issues.
This is also dependent on flash chip, and file system type.
The backups are triggered every 4 hours, which for 2 years is ~4.5k writes. It should not have caused significant issues.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Saving bandwidth monitoring data to USB, higher frequency saving
Any way to turn off saving to flash or or just have it save to ram. Or even just disable it?
Prefer to protect the flash if possible as my ISP already has bandwidth logs
Prefer to protect the flash if possible as my ISP already has bandwidth logs
Re: Saving bandwidth monitoring data to USB, higher frequency saving
See here:
https://github.com/ericpaulbishop/gargo ... feaf9c084e
You would also need the previous two commits.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.