Ping到localhost系统

时间:2014-06-15 18:50:59

标签: sockets unix tcp ping latency

我有多个服务器具有相同的配置。我试图从每个服务器ping localhost 127.0.0.1。我得到了一个服务器的不同响应。 我主要关注除了一个服务器之外的所有服务器的结果。

--- 127.0.0.1 ping statistics ---
19 packets transmitted, 19 received, 0% packet loss, time 18000ms
rtt min/avg/max/mdev = 0.003/0.004/0.011/0.002 ms

问题是,从服务器之一我得到以下结果。

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.007 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1: icmp_seq=7 ttl=64 time=0.006 ms    
64 bytes from 127.0.0.1: icmp_seq=8 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1: icmp_seq=9 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=10 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=11 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=12 ttl=64 time=0.019 ms
64 bytes from 127.0.0.1: icmp_seq=13 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=14 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=15 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=16 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=17 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=18 ttl=64 time=0.019 ms
64 bytes from 127.0.0.1: icmp_seq=19 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=20 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=21 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=22 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=23 ttl=64 time=0.031 ms
64 bytes from 127.0.0.1: icmp_seq=24 ttl=64 time=0.018 ms
64 bytes from 127.0.0.1: icmp_seq=25 ttl=64 time=0.018 ms

--- 127.0.0.1 ping statistics ---
25 packets transmitted, 25 received, 0% packet loss, time 23999ms
rtt min/avg/max/mdev = 0.006/0.014/0.031/0.008 ms

我的/ etc / hosts文件有以下行     127.0.0.1 localhost.localdomain localhost

你能告诉我这里有什么问题吗?

[更新自纪念:]

我担心每包的平均时间,在第二种情况下太高了。

1 个答案:

答案 0 :(得分:1)

没有错。在这两种情况下,所有数据包仍然可以通过(“0%丢包”)。你只是在第二种情况下获得更详细的输出,每个数据包只有一行(除非你在第一种情况下也得到了它,你只是省略了它。)你的设置或操作只是略有不同系统版本。