Command line reference for editing quotas
Posted: Tue Nov 26, 2013 4:58 pm
I bought a router with gargoyle pre-installed recently and LOVE the quotas and bandwidth monitoring features. Before, my family of four was constantly struggling to stay below our (somewhat paltry) monthly quota from our ISP and never sure which device or devices were sucking down all our bandwidth.
I have set up a monthly quota for the network and daily quotas for each user. It works great, but I would like to make one tweak. I've been logging in once a week or so and updating the daily quotas based on how much of our monthly quota is left, and I would like to automate that.
I would like to ssh into the router and write a script to update the per-user (nightly) quotas based on how much bandwidth is left for the month.
I think I found the quotas in /overlay/usr/data/quotas/, but I'm not quite sure what their format is. They look like this:
1385485201
0.0.0.0 57689303
Is the first line the total and the second the current usage? If not, where can I find the current usage?
Also, more broadly, are there any issues or pitfalls I should be aware of in trying this?
I have set up a monthly quota for the network and daily quotas for each user. It works great, but I would like to make one tweak. I've been logging in once a week or so and updating the daily quotas based on how much of our monthly quota is left, and I would like to automate that.
I would like to ssh into the router and write a script to update the per-user (nightly) quotas based on how much bandwidth is left for the month.
I think I found the quotas in /overlay/usr/data/quotas/, but I'm not quite sure what their format is. They look like this:
1385485201
0.0.0.0 57689303
Is the first line the total and the second the current usage? If not, where can I find the current usage?
Also, more broadly, are there any issues or pitfalls I should be aware of in trying this?