If you suspect that a machine might be losing packets even though the machine is running, you can use the s option of ping to try to detect the problem.
On the command line, type the following command.
% ping -s hostname |
ping continually sends packets to hostname until you send an interrupt character or a timeout occurs. The responses on your screen resemble the following:
PING elvis: 56 data bytes 64 bytes from 129.144.50.21: icmp_seq=0. time=80. ms 64 bytes from 129.144.50.21: icmp_seq=1. time=0. ms 64 bytes from 129.144.50.21: icmp_seq=2. time=0. ms 64 bytes from 129.144.50.21: icmp_seq=3. time=0. ms . . . ----elvis PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/20/80 |
The packet-loss statistic indicates whether the host has dropped packets.
If ping fails, check the status of the network that is reported by ifconfig and netstat, as described in ifconfig Command and netstat Command.