ARCHIVED: In Unix, how can I check whether a networked computer has crashed?
To see whether a networked computer has crashed or otherwise become
unavailable, try using the Unix ping
command,
which reports whether a computer at a particular address or IP
number is responding. The syntax for ping
is:
ping address
Replace address
with the name of the computer you want to
check. Because ping
may be stored in a directory that is
not included in your path, you may have to include the full path name
for the program in order to use it. Often, ping
is
located in the /etc
, /sbin
, or
/usr/sbin
directory, so you may need to enter one of the
following:
/etc/ping address /sbin/ping address /usr/sbin/ping address
Replace address
with the hostname of the computer in
question. For example, to check whether the host
mail-relay.iu.edu
is up, you would enter:
/etc/ping mail-relay.iu.edu
On some systems, ping
will simply respond with a message
indicating whether the system is up or down, though typically this
behavior can be modified. On other systems, ping
sends
packets to the remote host and returns information in one second
intervals (by default) about how the host responds. If the version of
ping
on your system does not do this, but simply reports
if a host is alive or not, you may be able to change this by including
-s
in the command, for example:
/etc/ping -s mail-relay.iu.edu
Press Ctrl-c
to stop ping
from sending out
any more packets; ping
then will produce a summary of the
remote host's responses. The summary will include the number of
packets transmitted, the number received, the percentage of packets
lost, and how long it took for each packet to be received and
returned. Ideally, the number of packets received should be equal to
the number transmitted. If the remote host has a problem, packet loss
may occur (i.e., the number of packets received will be fewer than the
number transmitted).
Note: In some situations, a remote computer may
respond to ping
, but not be reachable by other network
tools such as SFTP or rlogin
.
For more information about the ping
command, at the Unix
prompt, enter man ping
.
At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.
This is document agba in the Knowledge Base.
Last modified on 2018-01-18 10:46:59.