linux网络延迟命令,使用ping命令查看网络延迟--用Enki学Linux系列(7)

使用ping命令查看网络延迟

Using ping To Measure Network Latency

ping命令持续发送少量互联网流量到远程地址并报告收到回应的总时间。如果流量因为网络故障或者错误配置而被丢弃,它也会报告。ping命令是最基本和初级的诊断网络问题的工具之一。

The ping command will continuously send a tiny bit of internet traffic to a remote address and report the amount of time it took to receive a response. It will also report if the traffic was dropped, which is indicative of a bad network connection or a misconfigured network. The ping command one of the most basic and essential tools for diagnosing network problems.

下面是个例子:

Here is an example:$ ping google.com

PING google.com (172.217.0.238)

56(84) bytes of data.

64 bytes from 172.217.0.238:

icmp_seq=1 ttl=56 time=0.849 ms

64 bytes from 172.217.0.238:

icmp_seq=2 ttl=56 time=0.822 ms

64 bytes from 172.217.0.238:

icmp_seq=3 ttl=56 time=0.905 ms

64 bytes from 172.217.0.238:

icmp_seq=4 ttl=56 time=0.894 ms

64 bytes from 172.217.0.238:

icmp_seq=5 ttl=56 time=0.888 ms

--- google.com ping statistics ---

5 packets transmitted, 5 received,

0% packet loss, time 4001ms

rtt min/avg/max/mdev =

0.822/0.871/0.905/0.044 ms

$

ping会持续工作直到你把他停掉。“time=”这段是最重要的。这台特殊机器大概1毫秒就从google.com得到了回应,这非常快了。ping也会给出包括发送的ping包数,丢包率,关于往返时延的变化数据等信息的“ping会话”整体汇总。

The ping command will continue to do this until it is stopped. The time= field is the most important. This particular machine is getting a response back from google.com in about 1 millisecond, which is very fast. ping will also give an overall summary of the "ping session", which includes the number of ping packets sent, the percentage of packets lost, and various statistics about the round trip time (rtt).

记住延迟与链路质量和发ping机器到被ping机器直接的物理距离有关。

Keep in mind that latency has to do with both the quality of your connection and the physical distance between the machine on which you issue the ping command and the machine being pinged.$ ping duma.ru

PING duma.ru (212.11.128.31)

56(84) bytes of data.

64 bytes from duma.ru (212.11.128.31):

icmp_seq=1 ttl=113 time=149 ms

64 bytes from duma.ru (212.11.128.31):

icmp_seq=2 ttl=113 time=149 ms

64 bytes from duma.ru (212.11.128.31):

icmp_seq=3 ttl=113 time=149 ms

64 bytes from duma.ru (212.11.128.31):

icmp_seq=4 ttl=113 time=149 ms

--- duma.ru ping statistics ---

5 packets transmitted, 4 received,

20% packet loss, time 4005ms

rtt min/avg/max/mdev =

149.660/149.811/149.946/0.484 ms

$

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值