使用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
$

原文链接

转载于:https://blog.51cto.com/smellyman/1891681

使用ping命令查看网络延迟--用Enki学Linux系列(7)相关推荐

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

    使用ping命令查看网络延迟 Using ping To Measure Network Latency ping命令持续发送少量互联网流量到远程地址并报告收到回应的总时间.如果流量因为网络故障或者错 ...

  2. 使用dd命令测试CPU性能--用Enki学Linux系列(16)

    dd命令也可以作为一个简单的CPU性能测试工具来使用!你可以用如下方法运行这个"开箱即用"的功能: $ dd if=/dev/zero bs=1M count=1024 | md5 ...

  3. 使用vmstat命令监视系统内存--用Enki学Linux系列(14)

    vmstat使用户监视如进程,内存,页面,IO块,陷阱,磁盘和CPU活动. 用户可指定监视取样的周期. $ vmstat 1 procs -----------memory---------- --- ...

  4. 使用ping命令定位网络延迟问题

    一.背景 使用ping命令发现局域网内延迟大,且变化较大.需要分析耗时在那一层. 二.分析 上图可以看出,本机ping延时非常低.在本机网络 IO 的过程中,流程会有一些差别.有差异的地方总共有两个, ...

  5. 使用ps命令输出进程列表--用Enki学Linux系列(17)

    ps命令(process status的缩写)用于显示关于当前运行中的进程. 不加参数时,ps显示所有当前用户开启的进程. 比如: console$ psPID TTY TIME CMD 20094 ...

  6. 快速调用编辑器来写一条长,复杂或难的命令--用Enki学Linux系列(5)

    快速调用编辑器来写一条长,复杂或难的命令 Rapidly invoke an editor to write a long, complex, or tricky command 下次当你需要用she ...

  7. linux中选取一行的命令,使用cut选择一行中的部分内容--用Enki学Linux系列(13)

    cut命令使我们"切出"一个文件中每行指定的部分.你既可以直接通过后接文件名来选取,也可以通过管道符选取其他程序的输出. 下面是一些基础的例子 选取字符 -c选项让cut命令从它的 ...

  8. head和tail命令--用Enki学Linux系列(8)

    head和tail命令 head和tail是让你分别选择并显示一个文件或者输出流中的最开始或者最后几行,默认是选10行,但使用-n参数你可以指定其他数目. 比如你可以用tail来选择一个日志文件的最后 ...

  9. 使用touch命令改变文件修改时间--用Enki学Linux系列(11)

    你可以用touch命令改变一个文件的修改时间: $ touch filename 默认情况下,这会将文件的修改时间设为当前时间.然而有很多参数可以用,比如用-d参数设置成其他日期. 举例说明,设置一个 ...

最新文章

  1. DNN和IBatis.Net几乎同时发布新版本
  2. 微软每年豪砸安全研发 10 亿美元,聊聊背后的技术密码
  3. bat 两个文本字符替换_数据人必会的Excel|掌握这些文本函数,让你的工作如鱼得水...
  4. 在request.GET中捕获url参数
  5. Spring初学(一)
  6. ReentrantReadWriteLock可重入读写锁分析
  7. linux fork函数的精辟解说
  8. linux中修改字符编码
  9. Socket选项之SO_RCVTIMEO 和SO_SNDTIMEO
  10. mysql 备份如何使用_如何使用命令来备份和还原MySQL数据库
  11. G - Super Jumping! Jumping! Jumping!(动态规划)
  12. 招聘工作总结(精选多篇)
  13. YUV格式的图片查看工具YUView 2.13
  14. 完美解决桌面右键一直转圈,反应卡顿问题(重点是怎样删除workfolders)
  15. DIY NAS服务器之OMV 5.6入坑指南(一)-openmediavalut 5.6安装
  16. Java岗大厂面试百日冲刺 - 日积月累,每日三题【Day6】 —— 网络编程1
  17. [mybatis] sql语句无错误,但是执行多条sql语句时,抛出java.sql.SQLSyntaxErrorException...
  18. ISIS TLV Cyrus
  19. 广告学本科--现代管理学--[00107]
  20. 微信小程序 使用 wx.downloadFile()方法

热门文章

  1. traceroute和mtr
  2. 数据库:mongodb与关系型数据库相比的优缺点zz
  3. Jquery $ 符号讲解
  4. 8个爽滑如丝的Windows小软件,不好用你拿王思葱砸死我
  5. PyTorch | Tensor、Numpy、Variable之间的转换
  6. php网站调试出现的简单问题,调试php时网站出现502的解决方法
  7. MySQL服务的启动与停止-使用图形界面工具
  8. MySQ软件的卸载-通过控制面板方式
  9. MySQL 数据存储文件
  10. Dubbo仅仅是一个RPC框架?