On Tuesday, June 4, 2002, at 01:01 , <[EMAIL PROTECTED]> wrote:
[..]
> !/usr/bin/sh
> SERVERS="itsux17 its29 itsux24 int-dns1 int-dns2 mrtg defgtway"
> for S in $SERVERS
> do
>         PING1=`/etc/ping $S 32 -n 6 | grep trans | awk '{print $7}' | cut
> -d"%" -f1`
>         if [ $PING1 -gt 25 ]; then
>           if [ $PING1 -gt 99 ]; then
>                 mailx -s "CRITICAL: $PING1 % errors on $S Server may be
> down"  [EMAIL PROTECTED]
>         else
>                 mailx -s "WARNING: $PING1 % errors on $S"
> [EMAIL PROTECTED]
>         fi
>       fi
> done
> exit

you didn't say which OS - so I tailored mine to play in
darwin and linux - but I think you may be a solaris player....

http://www.wetware.com/drieux/pbl/Sys/Admin/pingIt.txt


I think that should give you more than a good intro to ways to
think about the conversion - I didn't expressly fix the how
to do the email stuff - one thing at a time - but that too
has a url you will want to peek at...


ciao
drieux

http://www.wetware.com/drieux/pbl/

--------------

This space left intentionally blank.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to