View Single Post
Old 03-05-2009, 23:36   #12
Joxer
Inactive
 
Join Date: Jan 2008
Location: Sunny Cumbernauld
Services: 20Mb BB, phone
Posts: 651
Joxer is just really niceJoxer is just really niceJoxer is just really niceJoxer is just really niceJoxer is just really niceJoxer is just really nice
Send a message via MSN to Joxer
Re: STM warning application?

I had thought about writing a shell script to do something similar, for me this would involve 3 steps:

1. learn to write shell scripts.
2. Write script.
3. Enjoy!

Still stuck on step 1.


Anyway the basic job is fairly simple, some pseudo code.
Code:
Run at 4 pm (for evening stm)
10 start_total_data = snmpget -v 2c -c public 192.168.100.1 IF-MIB::ifOutOctets.1
20 Wait a bit
25 if time> 9pm then stop
30 Data_Since_STM_Start =(snmpget -v 2c -c public 192.168.100.1 IF-MIB::ifInOctets.1) - start_total_data
40 if Data_Since_STM_Start>(some amount dependant on package and when you want warned) then Do_something_to_alert_user else goto 20
Unless of course SNMP is disabled on you modem, though you could run it on your router if it supports it.
Joxer is offline   Reply With Quote