1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| Options: -4 使用IPv4 -6 使用IPv6 -r,--report 启用repot模式,即直接显示统计信息而非交互式,通常配合-c选项一起使用 -w,--report-wide 启用wide report模式,即不会自动裁减显示主机名,适用于主机名较长的情况 -c,--report-cycles 指定发送的ping请求的数量 -s,--psize 指定发送的数据包的大小,单位字节bytes,包括IP和ICMP头部 -n,--no-dns 显示IP地址而不显示主机名 -b,--show-ips 同时显示主机名和IP地址 -o,--order 显示指定的列表字段,可选字段说明如下,例如-o "LSD NBAW" -p,--split 显示简洁格式,空格分隔 -l,--raw 显示原始格式 -x,--xml 显示xml格式 -a,--address 指定出接口的IP地址 -i,--interval 指定ICMP ECHO requests请求的时间间隔,默认为1s -m,--max-ttl 指定TTL值,即跟踪路由的最大跳数,默认为30 -f,--first-ttl 指定初始的TTL值,默认为1 -Q,--tos 指定ToS字段的值,取值范围0-255 -u,--udp 使用UDP数据包而不是ICMP ECHO -T,--tcp 使用TCP SYN数据包 -P,--port 指定TCP跟踪的目标端口号 --timeout 指定超时时间
-o 可选字段列表说明 ┌──┬─────────────────────┐ │L │ Loss ratio │ ├──┼─────────────────────┤ │D │ Dropped packets │ ├──┼─────────────────────┤ │R │ Received packets │ ├──┼─────────────────────┤ │S │ Sent Packets │ ├──┼─────────────────────┤ │N │ Newest RTT(ms) │ ├──┼─────────────────────┤ │B │ Min/Best RTT(ms) │ ├──┼─────────────────────┤ │A │ Average RTT(ms) │ ├──┼─────────────────────┤ │W │ Max/Worst RTT(ms) │ ├──┼─────────────────────┤ │V │ Standard Deviation │ ├──┼─────────────────────┤ │G │ Geometric Mean │ ├──┼─────────────────────┤ │J │ Current Jitter │ ├──┼─────────────────────┤ │M │ Jitter Mean/Avg. │ ├──┼─────────────────────┤ │X │ Worst Jitter │ ├──┼─────────────────────┤ │I │ Interarrival Jitter │ └──┴─────────────────────┘
# mtr支持的交互式命令 $ mtr -n www.baidu.com Command: ?|h help p pause (SPACE to resume) d switching display mode e toggle MPLS information on/off n toggle DNS on/off r reset all counters o str set the columns to display, default str='LRS N BAWV' j toggle latency(LS NABWV)/jitter(DR AGJMXI) stats c <n> report cycle n, default n=infinite i <n> set the ping interval to n seconds, default n=1 f <n> set the initial time-to-live(ttl), default n=1 m <n> set the max time-to-live, default n= # of hops s <n> set the packet size to n or random(n<0) b <c> set ping bit pattern to c(0..255) or random(c<0) Q <t> set ping packet's TOS to t u switch between ICMP ECHO and UDP datagrams y switching IP info z toggle ASN info on/off press any key to go back...
|