send ICMP ECHO_REQUEST packets to network hosts
ping host [timeout]
host [data_size [npackets]]
The ping command uses the ICMP
protocol's ECHO_REQUEST datagram to elicit an ICMP
ECHO_RESPONSE from the specified host or network gateway.
If host responds,
ping prints ``host is alive''
on the standard output and exits.
Otherwise, after timeout seconds,
it writes ``no answer from host''.
The default value of timeout is 20 seconds.
When the -s flag is specified,
ping sends one datagram per second,
and prints one line of output for every
ECHO_RESPONSE that it receives.
In this second form, ping computes round trip times
and packet loss statistics;
it displays a summary of this information upon termination or timeout.
If an optional npackets is given,
ping sends only that number of requests.
If npackets is not specified, the command will execute indefinitely.
Use the keyboard interrupt (Delete) key to interrupt the continuous output.
The default datagram packet size is 64 bytes, or you can specify
a size with the data_size command-line argument.
Note that, since ping routinely prepends
an 8-byte header to each datagram it sends,
the packet size that displays when the -s option is used
with the data_size argument
will always be 8 bytes larger than the value you specify.
When using ping for fault isolation, you should first
ping the local host to verify that the local network
interface is running.
The ping command takes the following options:
The provider is passed the SO_DEBUG option.
Outputs packets as fast as they come back or one hundred times
per second, whichever is more.
For every ECHO_REQUEST sent,
a dot ``.'' is printed,
while for every ECHO_REPLY received,
a backspace is printed.
This provides a rapid display of how many packets are being dropped.
Only a privileged user may use this option.
This can be very hard on a network and should be used with caution.
Wait wait seconds between sending each packet.
The default is to wait for one second between packets.
This option is incompatible with the -f option.
Loose source route.
Use this option in the
header to send the packet to the given host and back again.
Usually specified with the -R option.
The -l option is only valid
when the host is localhost or `uname -n`.
Numeric output only.
No attempt will be made to look up symbolic names for host addresses.
The specified pattern is used to fill packets being sent.
pattern is specified as a hex byte string
and may be up to 16 bytes long.
The pattern is repeated to fill the data portion of the packet.
For example, -p ff causes packets to be filled with all ones.
This option is useful for diagnosing data-dependent problems in a network.
Causes nothing to be displayed except the summary lines at startup time
and when finished.
Bypass the normal routing tables and send directly to a host on an
If the host is not on a directly-attached network,
an error is returned.
This option can be used to ping a local host
through an interface that has been dropped by the
router daemon (see
record route option, which will store the route
of the packet inside the
The contents of the record route
will only be printed if the -v option is given,
and only be set on return packets if the target host
preserves the record route option across echos, or the
-l option is given.
Send one datagram per second,
and print one line of output for every
(if there is no response,
no output is produced).
packets, other than ECHO_RESPONSE, that are received.
language-specific message file (see the description of LANG on
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004