网络检测工具-mtr
2013-03-19 19:48:21 阿炯

Full screen ncurses and X11 traceroute tool,ncurses下的全屏幕路由跟踪工具。

mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool.mtr 是将 'traceroute' 与 'ping' 的功能合二为一的网络诊断工具。

As mtr starts, it investigates the network connection between the host mtr runs on and a user-specified destination host.  After it determines the address of each network hop between the machines,it sends a sequence ICMP ECHO requests to each one to determine the quality of the link to each machine.  As it does this, it prints running statistics about each machine.

mtr启动时,将检查mtr的运行主机与用户指定的目标主机之间的网络连接。在它检测出两台主机间网络阶跃(network hop)各自的地址后,mtr会向每台主机发送 ICMP ECHO 请求以确定其连接质量。当其完成后,mtr会输出每台主机的统计信息。

mtr-tiny 是去掉了X支持的编译版本以节约磁盘空间。
 
MTR probes routers on the route path by limiting the number of hops individual packets may traverse, and listening to responses of their expiry. It will regularly repeat this process, usually once per second, and keep track of the response times of the hops along the path.

MTR relies on ICMP Time Exceeded (type 11, code 0) packets coming back from routers, or ICMP Echo Reply packets when the packets have hit their destination host. MTR also has a UDP mode (invoked with "-u" on the command line or pressing the "u" key in the curses interface) that sends UDP packets, with the Time-To-Live (TTL) field in the IP header increasing by one for each probe sent, toward the destination host. When the UDP mode is used, MTR relies on ICMP port unreachable packets (type 3, code 3) when the destination is reached.

MTR also supports IPv6 and works in a similar manner but instead relies on ICMPv6 messages.

The tool is often used for network troubleshooting. By showing a list of routers traversed, and the average round-trip time as well as packet loss to each router, it allows the user to identify links between two particular routers responsible for certain fractions of the overall latency or packet loss through the network. This can help identify network over utilization problems.

使用说明
参数    说明
-h --help    显示所有选项及参数
-v --version    显示 MTR 版本讯息
-r --report    报告模式,需搭配 -c 参数使用
-c --report-cycles COUNT    配合 -r 模式,设定执行的次数
-p --psize BYTES    设定送出查寻的 Packet 大小
-n --no-dns    节点显示 IP 而不是显示 Hostnames
-i --interval SECONDS 设定查寻的周期时间 (预设为一秒)
-4 仅使用 IPv4
-6 仅使用 IPv6

MTR is licensed under the terms of the GNU General Public License (GPL) and it works under modern Unix-like operating systems. It normally works under the text console, but it also has an optional GTK+-based graphical interface.

最新版本:0.8


项目主页:http://www.bitwizard.nl/mtr/