I'm using a cron script every minute to ping outside my network. The
address I'm using is one given to me for this purpose by my new provider
(Activ/Powertel).

#!/bin/sh
# first ping occassionally gives false reading. Second one confirms.
ping -c 1 xxx.xxx.xxx.xxx > /tmp/pingtest 2> /dev/null
if [ $? != 0 ] ; then
    date >> /tmp/pingtest
    mail -s "NETWORK TEST: failed first test" david < /tmp/pingtest
    ping -c 1 xxx.xxx.xxx.xxx >> /tmp/pingtest 2> /dev/null
    if [ $? != 0 ] ; then
        date >> /tmp/pingtest
        mail -s "URGENT: CHECK NETWORK STATUS" david  < /tmp/pingtest
    fi
fi


I've just changed providers, and now I'm getting lots of failed tests,
even though my apache log suggests the system is up. "lots" = about 10 per
hour.

Does this indicate a network problem, or should I come up with a better
script?

thanks, David.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to