MTR把ping和traceroute整合在了一起更加方便查看网络路由.
Linux上可以用yum和apt直接安装,windows下叫winmtr.
#yum install mtr -y
#apt install mtr -y
[root@localhost ~]# mtr --help
usage: mtr [-hvrwctglspniu46] [--help] [--version] [--report]
[--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]
[--raw] [--split] [--no-dns] [--address interface]
[--psize=bytes/-s bytes]
[--interval=SECONDS] HOSTNAME [PACKETSIZE]
一般常用直接mtr zbuse.com运行如果中间路由有ptr看不到IP可以带一个-n的参数,
如果需要调用或者记录结果可以这么用mtr --report -c 1 -n zbuse.com
~$ mtr --report -c 1 -n kernel.org HOST: localhost.localdomain Loss% Snt Last Avg Best Wrst StDev 1.|-- 106.3.46.33 0.0% 1 2.1 2.1 2.1 2.1 0.0 2.|-- 172.28.0.17 0.0% 1 1.4 1.4 1.4 1.4 0.0 3.|-- 123.125.128.177 0.0% 1 62.3 62.3 62.3 62.3 0.0 4.|-- 123.126.6.77 0.0% 1 2.6 2.6 2.6 2.6 0.0 5.|-- 124.65.57.65 0.0% 1 4.3 4.3 4.3 4.3 0.0 6.|-- 123.126.0.85 0.0% 1 2.4 2.4 2.4 2.4 0.0 7.|-- 219.158.101.38 0.0% 1 5.0 5.0 5.0 5.0 0.0 8.|-- 219.158.101.70 0.0% 1 3.7 3.7 3.7 3.7 0.0 9.|-- 219.158.102.126 0.0% 1 185.4 185.4 185.4 185.4 0.0 10.|-- 64.71.137.1 0.0% 1 172.1 172.1 172.1 172.1 0.0 11.|-- 184.105.213.6 0.0% 1 189.6 189.6 189.6 189.6 0.0 12.|-- 72.52.92.69 0.0% 1 183.7 183.7 183.7 183.7 0.0 13.|-- 184.105.222.26 0.0% 1 201.4 201.4 201.4 201.4 0.0 14.|-- 64.71.165.18 0.0% 1 198.2 198.2 198.2 198.2 0.0 15.|-- 198.145.240.166 0.0% 1 253.5 253.5 253.5 253.5 0.0 16.|-- 198.145.182.94 0.0% 1 196.2 196.2 196.2 196.2 0.0 17.|-- 198.145.20.140 0.0% 1 196.9 196.9 196.9 196.9 0.0
评论 (0)