根据答案ping统计时间含义
该
time
统计数据是发送和接收回显数据包所花费的总时间,包括每个数据包之间的延迟
然而,我的time
结果要短得多。是什么赋予了?
$ ping 8.8.8.8 -c 10
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=31.10 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=32.7 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=33.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=53 time=36.8 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=53 time=40.5 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=53 time=50.3 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=53 time=34.4 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=53 time=146 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=53 time=30.9 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=53 time=123 ms
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 21ms
rtt min/avg/max/mdev = 30.910/55.950/146.332/39.970 ms
为什么最后显示21ms?
答案1
这是当前实现中的一个错误
iputils-ping
。 (通过)