User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 426,940 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,340 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 6275 | Replies: 1
Reply
Join Date: Mar 2005
Posts: 3
Reputation: phragix is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
phragix phragix is offline Offline
Newbie Poster

Time control with Shell script

  #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 : )
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2005
Location: Woodland Hills CA
Posts: 49
Reputation: aj.wh.ca is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
aj.wh.ca aj.wh.ca is offline Offline
Light Poster

Re: Time control with Shell script

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 12:30 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC