Page 1 of 1

Big problem with quota

Posted: Sat Dec 26, 2015 7:24 pm
by Tareq
When the router's power Suddenly cut (power off) , the bandwidth usage of the current day resets to zero.
That make mistake in qouta of each user.

I try it many time.

Please help.



Notice:
For this reason i found a big difference between gargoyle and isp bandwidth usage.

Re: Big problem with quota

Posted: Sat Dec 26, 2015 10:31 pm
by Lantis
The only solution is to increase the frequency at which the bandwidth data is saved.
Currently it's every 4 hours I believe.

This comes with the risk of increasing wear levels on the flash storage.

How would you like to proceed?

Re: Big problem with quota

Posted: Sat Dec 26, 2015 10:55 pm
by Tareq
What happen to the memory if the frequency saved every 1 minute?

I think you can make the frequency time as option in gargoyle interface.

Is there any way to change the frequency time on my gargoyle ? ssh command or any thing ? I want it 1 minute at max.

Re: Big problem with quota

Posted: Sat Dec 26, 2015 11:06 pm
by Lantis
It's controlled by the Crontab I believe.

Flash storage generally has ~100,000 flash writes before it starts to degrade.
At 1 minute intervals, in 10 weeks you will exceed this number.
I wouldn't recommend it to be honest.

But, it's your device. Do as you please.

It won't be made an option due to the damage potential that it can cause.

Re: Big problem with quota

Posted: Sat Dec 26, 2015 11:27 pm
by Tareq
Ok thank you

Mabe i make it 15 minutes , if it work for 3 years thats good.
But how can i change it ? What is the command or what is the parameter which i change ? I never use ssh befoe.

Please help me

Re: Big problem with quota

Posted: Sun Dec 27, 2015 12:30 am
by Lantis
I'd recommend using WinSCP to log into the router and edit the files in a GUI.

The file at /etc/crontabs/root is the one you want to edit.
The line:
0 0,4,8,12,16,20 * * * /usr/bin/backup_quotas
Dictates that it should be backed up every 4 hours.

Code: Select all

 # ┌───────────── min (0 - 59)
 # │ ┌────────────── hour (0 - 23)
 # │ │ ┌─────────────── day of month (1 - 31)
 # │ │ │ ┌──────────────── month (1 - 12)
 # │ │ │ │ ┌───────────────── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
 # │ │ │ │ │
 # │ │ │ │ │
 # * * * * *  command to execute
This is the format of a cron command.

If you need anything further please ask, I just won't be back onto a computer until tomorrow.

Re: Big problem with quota

Posted: Sun Jan 10, 2016 9:36 pm
by sigwx
Is the data saved on a clean reboot (using the Reboot option in the System area)? Not sure if I've noticed losing quota data there (maybe in 1.8.0, but I've not checked in 1.9.0 since its been up for 59 days straight).

Re: Big problem with quota

Posted: Sun Jan 10, 2016 10:35 pm
by Lantis
Yes. A planned, clean reboot should save the data first.