安装
[root@MIO-2 ~]# yum install mtr
使用
mtr baidu.com My traceroute [v0.75] MIO-2 (0.0.0.0) Sun Sep 7 16:10:32 2014 Keys: Help Display mode Restart statistics Order of fields quit Packets Pings Host Loss% Snt Last Avg Best Wrst StDev 1. 192.168.1.1 0.0% 8 0.7 0.6 0.4 0.8 0.1 2. 171.223.176.1 0.0% 8 2.2 3.8 2.2 5.1 0.8 3. 125.71.17.13 42.9% 8 3.8 14.3 3.8 22.2 7.7 125.71.17.9 4. 171.208.202.121 0.0% 8 6.1 6.1 4.5 9.0 1.5 171.208.202.113 5. 202.97.70.161 0.0% 7 38.9 329.2 35.7 2073. 769.3 202.97.36.81 6. 202.97.44.66 0.0% 7 40.4 41.4 39.7 47.8 2.9 202.97.48.62 7. 219.158.35.41 0.0% 7 53.5 53.3 49.9 55.1 1.8 8. 219.158.22.229 0.0% 7 50.9 51.8 50.2 52.9 1.0 9. 124.65.194.114 0.0% 7 52.0 53.7 51.8 56.6 1.8 10. 123.126.6.194 0.0% 7 52.3 52.9 51.6 54.7 1.0 11. 123.125.248.46 0.0% 7 58.9 65.1 51.2 80.6 11.4 12. ??? 13. ??? 14. 123.125.114.144 0.0% 7 51.3 50.4 49.4 51.3 0.8
mtr也可以输出成报表格式,一般可以指定其请求的次数和时间间隔
[root@MIO-2 ~]# mtr -r -c 10 -i 2 1v20.com HOST: MIO-2 Loss% Snt Last Avg Best Wrst StDev 1. 192.168.1.1 0.0% 10 0.7 0.6 0.4 0.7 0.1 2. 171.223.176.1 0.0% 10 3.7 3.9 2.3 7.8 2.0 3. 125.71.17.9 20.0% 10 4.3 4.9 2.7 10.0 2.4 4. 171.208.205.97 0.0% 10 8.3 6.3 3.9 8.3 1.4 5. 202.97.36.229 0.0% 10 29.1 27.6 26.2 29.1 0.8 6. 202.97.77.238 0.0% 10 50.4 52.4 50.4 53.8 1.1 7. 158.124.85.222.broad.zz.ha.d 0.0% 10 50.0 60.8 49.0 157.5 34.0 8. 90.123.85.222.broad.zz.ha.dy 0.0% 10 52.3 53.3 51.5 60.3 2.9 9. 219.147.63.218 0.0% 10 51.9 52.7 51.9 53.7 0.7 10. ??? 100.0 10 0.0 0.0 0.0 0.0 0.0