Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi all,
I would really appreciate some help to create a bash shell script to do this:
1. run a ping command (e.g. ping -c 10 {ServerName})
2. (TEST1) find the average ping time value (from ping results using probably grep) and compare against {TimeThreshold}
3. if average ping time value is greater than {TimeThreshold}, then run traceroute command (traceroute -m 20 {ServerName}), "mark" test as "failed" (exit result value 1) and end script, otherwise continue script...
4. (TEST2) find packet loss value (from ping results above) and compare against {PacketLossThreshold}
5. if packet loss value is greater than {PacketLossThreshold}, then run traceroute command (traceroute -m 20 {ServerName}), "mark" test as "failed" (exit result value 1) and end script, otherwise "mark" test as "success" (exit result value 0)This would eventually be used with another software (Mac-based Dejal Simon: http://www.dejal.com/simon) to include ping and traceroute results in an email notifier.
Thanks in advance for any feedback.
Cheers,
Derek

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |