Page 1 of 1

Quota query/monitoring by client

Posted: Fri Aug 07, 2015 9:27 am
by landersohn
I would like to write a little app that I can run on a PC connected to my router which displays the current quota for that PC. Onbiously I can get this info when I just go to the router login page but it would be nioce to have it running in some little window somewhere and refreshed every so often.

Question: Is this somehow possible without writing a essentially web browser? can I just scp some file from the router in /dev/.... which might have that info?

Thanks

Re: Quota query/monitoring by client

Posted: Fri Aug 07, 2015 11:18 am
by landersohn
OK, I found how get current quota usage when I ssh into the router.
Question now is, how could I edit the crontabs so that I run the print_quotas script every so often and copy the result into a file which I can then access via SCP?
How would I write an updated crontabs file into the ROM?

Re: Quota query/monitoring by client

Posted: Fri Aug 07, 2015 7:34 pm
by Lantis
You just want to direct the output of the script to a file.

print_quotas > /tmp/file.txt

We've discussed this topic before and the implications of excessive flash writes aren't brilliant. I'd be wary of the frequency that you choose.
You might be better to instead do some kind of result grabbing from the ssh client itself and then do all the manipulation locally.

Re: Quota query/monitoring by client

Posted: Sat Aug 08, 2015 8:47 am
by landersohn
Thanks, I'll try that