[Sussex] Ping protocol

Steve Dobson SDobson at manh.com
Tue Jun 24 17:31:00 UTC 2003


John

On 24 June 2003 at 17:10 John Crowhurst wrote:
> 
> > Do you know where I can learn about the Ping protocol, I can not find
> > it.
> >
> > All I want to do is write my own program so it informs me when something
> > has gone wrong with the connection.
> >
> > I have written an script to scan that IP address but that is rather
> > lame, keeping an shell running all the time.  I think more use full if I
> > get write an program that informed me when it goes wrong.
> 
> The simplest way is via a simple shell script:
> 
> if ping -c 1 host >/dev/null;
> then echo "OK"
> else echo "Not OK"
> #Do something about it here
> fi
> 
> All you need to do then is to place the script into your 
> crontab and it will check periodically.

What out for this.  I can be that the machine is still alive but
the application is dean.  This script will not tell you if Apache
has locked up.

Steve




More information about the Sussex mailing list