Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mtr 网络诊断工具 #166

Open
Qingquan-Li opened this issue Apr 17, 2021 · 0 comments
Open

mtr 网络诊断工具 #166

Qingquan-Li opened this issue Apr 17, 2021 · 0 comments
Labels

Comments

@Qingquan-Li
Copy link
Owner

Qingquan-Li commented Apr 17, 2021

常用的 ping,tracert,nslookup 一般用来判断主机的网络连通性,其实 Linux 下有一个更好用的网络联通性判断工具,它可以结合ping nslookup tracert 来判断网络的相关特性,这个命令就是 mtr。mtr 全称 my traceroute,是一个把 ping 和 traceroute 合并到一个程序的网络诊断工具。

traceroute默认使用UDP数据包探测,而mtr默认使用ICMP报文探测,ICMP在某些路由节点的优先级要比其他数据包低,所以测试得到的数据可能低于实际情况。

参考:


一、Ubuntu 安装和使用 mtr

1⃣️ 安装 mtr:

$ sudo apt update
$ sudo apt install mtr

2⃣️ 使用 mrt:

$ mrt + ip/domain

二、mtr google.com 效果图(macOS系统)

mtr-google-com

输出参数解释:

  1. Host IP地址
  2. Loss 丢包率
  3. Snt 已发送的包数
  4. Last 最后一个包的延时
  5. Avg 平均延时
  6. Best 最低延时
  7. Wrst 最差延时
  8. StDev 方差(稳定性)

三、macOS 配置 mtr

mtr-macos-zsh

1⃣️ $ vim .zshrc

export PATH="/usr/local/sbin/:${PATH}"

2⃣️ $ source .zshrc # 使配置生效

@Qingquan-Li Qingquan-Li changed the title macOS 安装 mtr mtr 网络诊断工具 Apr 17, 2021
@Qingquan-Li Qingquan-Li added Network and removed Linux labels Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant