Previous Section  < Day Day Up >  Next Section

ping—reports if a remote system is reachable and alive


ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern]

   [-s packetsize]


ping sends ICMP ECHO_REQUEST packets to a host machine and waits for a response to tell you if the host or gateway is reachable and alive. It is used to track down network connectivity problems. If ping does not receive any reply packets at all it will exit with code 1. On error it exits with code 2. Otherwise it exits with code 0. This makes it possible to use the exit code to see if a host is alive or not.

This program is intended for use in network testing, measurement, and management. Because of the load it can impose on the network, it is unwise to use ping during normal operations or from automated scripts.

    Previous Section  < Day Day Up >  Next Section