![mtr网络诊断](https://img-blog.csdnimg.cn/img_convert/064a8bb8481ee3a651e0d9c49b53f5b7.png)
mtr网络诊断
Linux mtr
command provides both functionality of traceroute
and ping
commands. mtr
can provide reports and xml, json, csv output. There is also Gtk interface provided for mtr
.
Linux mtr
命令同时提供了traceroute
和ping
命令的功能。 mtr
可以提供报告以及xml,json,csv输出。 还为mtr
提供了Gtk接口。
交互式Traceroute (Interactive Traceroute)
One of the simple use case for mtr
is providing the remote hostname or IP address we want to traceroute. This will open a new interactive window which shows each intermediate hop. This will also send continuous ICMP packets to get new time and related metrics and show in the screen.
mtr
的简单用例之一就是提供我们要跟踪路由的远程主机名或IP地址。 这将打开一个新的交互式窗口,其中显示每个中间跃点。 这还将发送连续的ICMP数据包以获取新的时间和相关指标并显示在屏幕中。
$ mtr google.com
![](https://img-blog.csdnimg.cn/img_convert/ed2a4a0788b59b9fd684442e6598f848.png)
We can exit from this screen with CTRL+C
我们可以使用CTRL + C从此屏幕退出
显示Gtk界面(Show Gtk Interface)
mtr
command can be used with GUI interface. We will provide –g
in order to start with Gtk interface.
mtr
命令可与GUI界面一起使用。 我们将提供– g
,以便从Gtk界面开始。
$ mtr -g google.com
CSV输出 (CSV Output)
We can create CSV type output. CSV type output will delimit the columns with ,
. We will provide --csv
option with the remote hostname.
我们可以创建CSV类型的输出。 CSV类型的输出将与分隔列,
。 我们将为--csv
选项提供远程主机名。
$ mtr --csv google.com
![CSV Output](https://img-blog.csdnimg.cn/img_convert/a49c94b1e04a7cad037f6f8bf799e203.png)