systemadmin.es > Redes > Estadísticas de ping

Estadísticas de ping

Es común dejar un ping continuo aalgún equipo para probar alguna cosa, pero quizá no nos interese tener que parar el ping para poder ver las estadísticas de paquetes perdidos o las medidas de ms y por lo tanto perder las estadísticas globales en favor de parciales

Podemos mandar un SIGQUIT (mediante Control-\) para ver las estadísticas hasta ese momento:

$ ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.059 ms
3/3 packets, 0% loss, min/avg/ewma/max = 0.040/0.052/0.044/0.059 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.059 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.059 ms
5/5 packets, 0% loss, min/avg/ewma/max = 0.040/0.055/0.047/0.059 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.060 ms
64 bytes from localhost (127.0.0.1): icmp_seq=7 ttl=64 time=0.050 ms
7/7 packets, 0% loss, min/avg/ewma/max = 0.040/0.055/0.049/0.060 ms
64 bytes from localhost (127.0.0.1): icmp_seq=8 ttl=64 time=0.038 ms
64 bytes from localhost (127.0.0.1): icmp_seq=9 ttl=64 time=0.025 ms
64 bytes from localhost (127.0.0.1): icmp_seq=10 ttl=64 time=0.059 ms
10/10 packets, 0% loss, min/avg/ewma/max = 0.025/0.050/0.047/0.060 ms
64 bytes from localhost (127.0.0.1): icmp_seq=11 ttl=64 time=0.062 ms
^C
--- localhost ping statistics ---
11 packets transmitted, 11 received, 0% packet loss, time 9997ms
rtt min/avg/max/mdev = 0.025/0.051/0.062/0.014 ms

Dicha característica se indica en el man de ping, pero a simple vista es difícil de ver sin leerlo entero:

       When using ping for fault isolation, it should first be run on the local host, to verify that the local network interface is up  and  run‐
       ning.  Then,  hosts  and gateways further and further away should be ``pinged''. Round-trip times and packet loss statistics are computed.
       If duplicate packets are received, they are not included in the packet loss calculation, although the round trip time of these packets  is
       used  in  calculating  the  minimum/average/maximum  round-trip  time  numbers.   When the specified number of packets have been sent (and
       received) or if the program is terminated with a SIGINT, a brief summary is displayed. Shorter current statistics can be obtained  without
       termination of process with signal SIGQUIT.

Deja un comentario:

XHTML - Tags permitidos:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>