Hi,
I have just installed Gargoyle on a wrt54gl and I am setting up quotas to restrict the daily usage of machines on my network. I noticed that usage data is stored in /usr/data/restricter. This data appears to be updated only when settings are changed. If the power is switched off to the router does any accumulated usage get lost?
From a quick look at the source code restricter.c my understanding is that that the data is only updated once a day and that a variable quota_backup_interval can be set to have it backed up more often. Is this correct?
Also is there a correct way to shutdown the router so that things such as quotas and bandwidth data are saved and not lost?
Thanks
Peter
Quotas and shutdown
Moderator: Moderators
Re: Quotas and shutdown
Yup, that's exactly right. The reason I have it write only once a day is that if you write too frequently to a flash chip it can wear out, but once a day is infrequently enough that it shouldn't cause any problems unless you intend to use your router for a few decades.
If the router loses power randomly you can lose up to a day of usage, but the data previous to this will get restored. There's really no way to shut down & save if the router just loses power so the only way to prevent against this is to backup more frequently.
If you use the reboot button under the system/reboot section, the router will shut down properly, saving bandwidth/quota data.
If the router loses power randomly you can lose up to a day of usage, but the data previous to this will get restored. There's really no way to shut down & save if the router just loses power so the only way to prevent against this is to backup more frequently.
If you use the reboot button under the system/reboot section, the router will shut down properly, saving bandwidth/quota data.
Re: Quotas and shutdown
Eric,
Thanks for the quick response. I didn't think about wearing out the flash chip. The problem for me is that we sometimes turn the router off in the middle of the day if we leave the house. In this case we would lose the quota details. Also I could see someone exploiting this to reduce their usage.
I don't seem to have a reboot option under System on my version of Gargoyle (or i'm looking in the wrong spot).
Thanks
Peter
Thanks for the quick response. I didn't think about wearing out the flash chip. The problem for me is that we sometimes turn the router off in the middle of the day if we leave the house. In this case we would lose the quota details. Also I could see someone exploiting this to reduce their usage.
I don't seem to have a reboot option under System on my version of Gargoyle (or i'm looking in the wrong spot).
Thanks
Peter
Re: Quotas and shutdown
The only way this could be exploited is if someone has physical access to the router (to unplug it). If you have physical access to the router, you can do anything you like including installing new firmware. If you don't have physical security on your router, it can always be compromised fairly easily.
The reboot button is only in the bleeding edge firmware. You can upgrade now or wait a week and install Beta 5.
The reboot button is only in the bleeding edge firmware. You can upgrade now or wait a week and install Beta 5.
Re: Quotas and shutdown
I am not really worried about the physical access to the router but more concerned about saving the values before the router is turned off. Is it possible to program the router to run a script when the Cisco button on the front is pressed?
Peter
Peter