| | |
Time control with Shell script
![]() |
•
•
Join Date: Mar 2005
Posts: 3
Reputation:
Solved Threads: 0
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 : )
_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
snmpget _ _ _ _
_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
Thank you very much for your kind attention : )
•
•
Join Date: Mar 2005
Posts: 53
Reputation:
Solved Threads: 1
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.
-------------
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
-------------------------------------------
aj.wh.ca
-------------------------------------------
www.swiftthoughts.com
-------------------------------------------
![]() |
Similar Threads
- How to su properly in a shell script (Shell Scripting)
- For Pay Shell Script - Zip / FTP / Delete transactional files (Shell Scripting)
- Convert shell script for looping (Shell Scripting)
- shell script (Shell Scripting)
- Shell script (Legacy and Other Languages)
- Problem with variables in Windows shell script (Windows NT / 2000 / XP)
- Using find in a bash shell script (Shell Scripting)
- Shell Script for Gnome 2.6 Print Manager. (Shell Scripting)
Other Threads in the Shell Scripting Forum
- Previous Thread: simple shell script....complex migraine
- Next Thread: incorporating exchange access to a cron script
Views: 8493 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Shell Scripting





