Using the Ping -f Option to Test for Lost Packets
There is a cool option on some versions of ping. With the -f option, a dot is printed for each ping sent, and a backspace is printed when a ping is received. This gives you an instant visualization of the lost packets. Hit ctrl-c to end the task, and you will then see the latency and loss stats:
[root@srv-1 usr-1]# ping -f server.domain.com
PING server.domain.com (66.27.30.27) 56(84) bytes of data.
....
--- server.domain.com ping statistics ---
571 packets transmitted, 565 received, 1% packet loss, time 8482ms
rtt min/avg/max/mdev = 68.984/73.384/108.986/5.612 ms, pipe 10, ipg/ewma 14.882/71.539 ms
[root@srv-1 usr-1]#
|
Note that you have to do this with the correct rights. Above, we did this as root. If we do this with a more limited account:
[usr-1@srv-1 ~]$ ping -f server.domain.com
PING server.domain.com (66.27.30.27) 56(84) bytes of data.
ping: cannot flood; minimal interval, allowed for user, is 200ms
[usr-1@srv-1 ~]$
|
Also, do be aware that you are creating a bit of traffic with this command, so you probably don't want to run it all of the time.
|
|