Determining availability of a remote machine

Ian Matters Ian.Matters at
Wed Apr 2 15:04:07 EST 2003

A shell script technique that I have used is this:

if /bin/ping -c 1 -f $NETWORK &> 

#       blah
#       blah
#       blah


         echo "ERROR: Cannot access network"


Ian M.
At 07:50 AM 2/04/2003, you wrote:

>I need to be able to determine if a remote machine is available without
>living through a long timeout. For network configuration reasons I can't
>use ICMP.
>Anyone have a brilliant idea as to how to determine if a machine is alive
>in code without using ICMP? I thought of just connecting to a port, but I
>can't gaurantee that certain ports are open on the remote side, and
>firewalls might get in my way.
>Michael Still (mikal at | Stage 1: Steal underpants
>            | Stage 2: ????
>UTC + 10                          | Stage 3: Profit

More information about the linux mailing list