Time control with Shell script

Reply

Join Date: Mar 2005
Posts: 3
Reputation: phragix is an unknown quantity at this point 
Solved Threads: 0
phragix phragix is offline Offline
Newbie Poster

Time control with Shell script

 
0
  #1
Mar 30th, 2005
I'm trying to monitor the traffic on a particular switch for a continuous hour. Could anybody please suggest me how to make it possible? For example if I wanna use snmpget command, what would I do in order to do that for an hour?

_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
snmpget _ _ _ _
_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _

Thank you very much for your kind attention : )
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 53
Reputation: aj.wh.ca is an unknown quantity at this point 
Solved Threads: 1
aj.wh.ca aj.wh.ca is offline Offline
Junior Poster in Training

Re: Time control with Shell script

 
0
  #2
Mar 30th, 2005
A loop and sleep should do the job. Here it is
-------------
for (( i = 1; i <= 60; i++ ))
do
snmpget ......
sleep 60
done

change the seconds and loop count as per your snmpget tuning.
cheers,
aj.wh.ca

-------------------------------------------
www.swiftthoughts.com
-------------------------------------------
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Shell Scripting Forum


Views: 8493 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Shell Scripting
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC