mtr – a network diagnostic tool


mtrについてのmanと出力を眺める時間が取れたので、manの内容に沿いつつ、メモを残しておこうかと思います。このツールも検索エンジンで調査しにくいですね。

Name

Wikipediaによると、mtrの名前はMatt’s traceroute (後にMy traceroute)という名前から取られているみたいです。

Name
mtr – a network diagnostic tool

Synopsis

Synopsis
mtr [-hvrctglspniu46] [–help] [–version] [–report] [–report-wide] [–report-cycles COUNT] [–curses] [–split] [–raw] [–no-dns] [–gtk] [–address IP.ADD.RE.SS] [–interval SECONDS] [–psize BYTES | -s BYTES] HOSTNAME [PACKETSIZE]

Description

mtrは、単一のネットワーク診断ツールでのtracerouteとpingプログラムの機能を兼ね備えています。
mtrが開始されると、意図的に低いTTLを持つパケットを送信することで、mtrを実行したホストとHOSTNAMEの間のネットワーク接続を調べます。これは、介在ルータの応答時間に注意して、低いTTLを持つパケットを送信し続けます。これでmtrからHOSTNAMEへのインターネット経路の応答率と応答時間を出力できます。パケットロスまたは応答時間の急激な増加は、多くの場合、不良(または単純な過負荷)リンクを示します。

Description
mtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.

As mtr starts, it investigates the network connection between the host mtr runs on and HOSTNAME. by sending packets with purposly low TTLs. It continues to send packets with low TTL, noting the response time of the intervening routers. This allows mtr to print the response percentage and response times of the internet route to HOSTNAME. A sudden increase in packetloss or response time is often an indication of a bad (or simply overloaded) link.

Options

-h | –help

コマンドライン引数オプションの要約を表示します。

-h
–help

Print the summary of command line argument options.

$ sudo mtr -h
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]
$

-v | –version

インストールされたmtrのバージョンを出力します。

-v
–version

Print the installed version of mtr.
以下出力サンプル。ちなみに、以降すべてCentOS release 6.5 (Final)の標準パッケージで確認しています。

$ sudo mtr -v
mtr 0.75
$

-r | –report

このオプションは、レポートモードにmtrを置きます。このモードにおいて、
mtrは、-cオプションで指定されたサイクル数実行し、統計を出力して終了します。
このモードでは、ネットワーク品質に関する統計情報を生成するために有用です。
mtrの実行中の各インスタンスは、ネットワークトラフィックを大量に生成することに注意してください。
mtrをネットワークの品質計測に利用すると、ネットワークのパフォーマンスの品質がにつながるかもしれません。

-r
–report

This option puts mtr into report mode. When in this mode, mtr will run for the number of cycles specified by the -c option, and then print statistics and exit.

This mode is useful for generating statistics about network quality.Note that each running instance of mtr generates a significant amount of network traffic. Using mtr to measure the quality of your network may result in decreased network performance.

]$ sudo mtr -r log4hc.wordpress.com
HOST: stage01                     Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 192.168.123.1                 0.0%    10    1.0   1.1   0.9   1.5   0.2
  2. local.gateway                 0.0%    10    1.1   1.6   1.1   4.6   1.1
  3. softbank219195111254.bbtec.n  0.0%    10   18.0  13.4  11.5  18.0   2.4
  4. 10.199.6.141                  0.0%    10   12.5  12.5  11.9  14.2   0.6
  5. 10.199.3.137                  0.0%    10   13.2  13.1  12.8  13.3   0.2
  6. 10.199.3.14                   0.0%    10   12.8  14.8  12.3  32.8   6.3
  7. 10.0.131.73                   0.0%    10   12.6  12.9  12.6  13.2   0.2
  8. 10.0.61.149                   0.0%    10   14.3  15.4  13.2  17.9   1.4
  9. 10.0.200.49                   0.0%    10   16.7  16.9  15.5  20.2   1.4
 10. 10.9.195.98                   0.0%    10   18.9  16.3  14.3  18.9   1.2
 11. ae-13.r01.tokyjp01.jp.bb.gin  0.0%    10   16.8  15.0  14.0  16.8   0.8
 12. ae-13.r24.tokyjp05.jp.bb.gin  0.0%    10   14.3  20.8  14.3  41.0   8.9
 13. ae-3.r21.sngpsi05.sg.bb.gin.  0.0%    10   78.8  79.3  78.2  83.2   1.5
 14. ae-13.r00.sngpsi02.sg.bb.gin  0.0%    10   79.6  79.5  79.2  79.6   0.2
 15. 116.51.27.246                 0.0%    10   79.2  81.4  79.1  97.4   5.6
 16. 192.0.78.13                  10.0%    10   87.7  88.2  87.6  89.5   0.8
$

-w | –report-wide

このオプションは、ワイドレポートモードにmtrを設定します。このモードにおいては、 mtrはレポート内のホスト名をカットしません。

-w
–report-wide

This option puts mtr into wide report mode. When in this mode, mtr will not cut hostnames in the report.

$ sudo mtr -r -w log4hc.wordpress.com
HOST: stage01                              Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 192.168.123.1                         0.0%    10    0.9   1.0   0.9   1.4   0.1
  2. local.gateway                         0.0%    10    1.2   2.2   1.1   7.3   2.0
  3. softbank219195111254.bbtec.net        0.0%    10   11.4  12.0  11.4  14.7   1.0
  4. 10.199.6.141                          0.0%    10   14.8  13.0  12.0  14.8   1.0
  5. 10.199.3.137                          0.0%    10   12.9  13.1  12.6  14.3   0.5
  6. 10.199.3.14                           0.0%    10   12.7  13.3  12.6  17.3   1.4
  7. 10.0.131.73                           0.0%    10   19.3  14.1  12.5  19.3   2.2
  8. 10.0.61.149                           0.0%    10   15.0  15.7  14.3  17.1   1.2
  9. 10.0.200.49                           0.0%    10   14.3  16.3  14.3  17.8   1.3
 10. 10.9.195.98                           0.0%    10   17.0  15.8  14.1  17.2   1.2
 11. ae-13.r01.tokyjp01.jp.bb.gin.ntt.net  0.0%    10   14.0  14.8  14.0  16.6   0.7
 12. ae-13.r24.tokyjp05.jp.bb.gin.ntt.net  0.0%    10   14.4  17.2  13.9  26.9   4.8
 13. ae-3.r21.sngpsi05.sg.bb.gin.ntt.net   0.0%    10   78.7  80.2  78.3  82.7   1.9
 14. ae-13.r00.sngpsi02.sg.bb.gin.ntt.net  0.0%    10   79.7  80.1  79.4  82.0   0.9
 15. 116.51.27.246                         0.0%    10   79.9  81.1  79.2  91.7   3.8
 16. 192.0.78.13                          10.0%    10   87.5  88.7  87.5  95.0   2.4
$ 

-c COUNT | –report-cycles COUNT

ネットワーク上のマシンとそれらのマシンの信頼性の両方を決定するために送られたpingの数を設定するには、このオプションを使用します。各サイクルは1秒続きます。

-c COUNT
–report-cycles COUNT

Use this option to set the number of pings sent to determine both the machines on the network and the reliability of those machines. Each cycle lasts one second.

$ sudo mtr -r -w -c 5 log4hc.wordpress.com
HOST: stage01                              Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 192.168.123.1                         0.0%     5    1.0   1.0   0.9   1.0   0.0
  2. local.gateway                         0.0%     5    1.1   1.1   1.0   1.4   0.1
  3. softbank219195111254.bbtec.net        0.0%     5   14.2  13.2  11.7  16.1   1.9
  4. 10.199.6.141                          0.0%     5   16.9  15.6  12.4  23.7   4.9
  5. 10.199.3.137                          0.0%     5   12.8  12.8  12.6  13.0   0.1
  6. 10.199.3.14                           0.0%     5   12.8  12.8  12.7  12.9   0.1
  7. 10.0.131.73                           0.0%     5   12.6  13.1  12.6  14.4   0.7
  8. 10.0.61.149                           0.0%     5   14.3  15.3  13.7  16.7   1.2
  9. 10.0.200.49                           0.0%     5   16.5  16.8  14.3  21.4   2.7
 10. 10.9.195.98                           0.0%     5   15.7  15.6  14.9  17.2   1.0
 11. ae-13.r01.tokyjp01.jp.bb.gin.ntt.net  0.0%     5   14.3  14.8  14.3  15.2   0.4
 12. ae-13.r24.tokyjp05.jp.bb.gin.ntt.net  0.0%     5   37.2  39.4  14.2  77.2  23.6
 13. ae-3.r21.sngpsi05.sg.bb.gin.ntt.net   0.0%     5   84.6  81.4  78.3  84.6   3.0
 14. ae-13.r00.sngpsi02.sg.bb.gin.ntt.net  0.0%     5   79.9  79.8  79.3  80.7   0.5
 15. 116.51.27.246                         0.0%     5   81.9  80.1  79.4  81.9   1.0
 16. 192.0.78.13                          20.0%     5   87.8  87.9  87.8  88.1   0.2
$

-s BYTES | –psize BYTES

これらのオプションまたはコマンドライン上の末尾のPACKETSIZEはプロービングのために使用されるパケットサイズを設定します。
それはIPおよびICMPヘッダに含まれるバイトに入ります。
負の数に設定すると、すべての反復は、その数を最大とした異なるランダムなパケット·サイズを使用します。

s BYTES
–psize BYTES
PACKETSIZE

These options or a trailing PACKETSIZE on the commandline sets the packet size used for probing.
It is in bytes inclusive IP and ICMP headers
If set to a negative number, every iteration will use a different, random packetsize upto that number.

$ sudo mtr -r -s 512 log4hc.wordpress.com
HOST: stage01                     Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 192.168.123.1                 0.0%    10    1.2   1.2   1.1   1.5   0.1
  2. local.gateway                 0.0%    10    1.3   1.3   1.2   1.4   0.1
  3. softbank219195111254.bbtec.n  0.0%    10   14.2  14.1  13.8  14.5   0.2
  4. 10.199.6.141                  0.0%    10  145.3  28.0  14.5 145.3  41.2
  5. 10.199.3.137                  0.0%    10   15.2  15.4  14.8  16.7   0.6
  6. 10.199.3.14                   0.0%    10   15.0  15.6  15.0  16.6   0.5
  7. 10.0.131.73                   0.0%    10   15.6  15.8  15.3  17.8   0.7
  8. 10.0.61.149                   0.0%    10   16.5  17.8  16.1  19.2   1.1
  9. 10.0.200.49                   0.0%    10   24.0  18.3  16.4  24.0   2.2
 10. 10.9.195.98                   0.0%    10   20.0  18.5  16.4  21.3   1.6
 11. ae-13.r01.tokyjp01.jp.bb.gin  0.0%    10   17.0  17.0  16.6  17.3   0.3
 12. ae-13.r24.tokyjp05.jp.bb.gin  0.0%    10   35.6  25.5  16.7  45.6   9.2
 13. ae-3.r21.sngpsi05.sg.bb.gin.  0.0%    10   81.5  85.6  80.9 106.2   7.5
 14. ae-13.r00.sngpsi02.sg.bb.gin  0.0%    10   89.9  83.3  81.8  89.9   2.4
 15. 116.51.27.246                 0.0%    10   82.7  82.5  81.7  84.4   1.0
 16. 192.0.78.13                  10.0%    10   90.9  90.8  90.3  91.2   0.3
$

-t | –curses

(利用可能な場合に)ターミナルをcurses(カーシス)ベースインタフェースを使用するようmtrを強制するためにこのオプションを使用します。

-t
–curses

Use this option to force mtr to use the curses based terminal interface (if available).

“sudo mtr -t log4hc.wordpress.com”実行するとSntがカウントアップするのと連動して出力更新されます。

                                       My traceroute  [v0.75]
stage01 (0.0.0.0)                                                          Wed Feb 11 22:40:06 2015
Resolver error: No error returned but no answers given. of fields   quit
                                                           Packets               Pings
 Host                                                    Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 192.168.123.1                                         0.0%     3    1.1   1.2   1.0   1.6   0.3
 2. local.gateway                                         0.0%     3    1.4   1.4   1.3   1.5   0.1
 3. softbank219195111254.bbtec.net                        0.0%     3   13.7  12.5  11.5  13.7   1.1
 4. 10.199.6.141                                          0.0%     3   12.2  12.3  12.2  12.6   0.2
 5. 10.199.3.137                                          0.0%     3   15.1  13.8  13.1  15.1   1.2
 6. 10.199.3.14                                           0.0%     3   12.8  14.2  12.8  17.0   2.4
 7. 10.0.131.73                                           0.0%     3   13.6  13.3  13.0  13.6   0.3
 8. 10.0.61.149                                           0.0%     3   16.6  15.6  13.8  16.6   1.6
 9. 10.0.200.49                                           0.0%     3   16.1  17.1  15.6  19.5   2.1
10. 10.9.195.98                                           0.0%     3   14.2  16.0  14.2  17.3   1.6
11. ae-13.r01.tokyjp01.jp.bb.gin.ntt.net                  0.0%     3   14.5  14.5  14.4  14.6   0.1
12. ae-13.r24.tokyjp05.jp.bb.gin.ntt.net                  0.0%     3   16.7  15.2  14.4  16.7   1.3
13. ae-3.r21.sngpsi05.sg.bb.gin.ntt.net                   0.0%     3   79.1  79.1  79.0  79.3   0.2
14. ae-13.r00.sngpsi02.sg.bb.gin.ntt.net                  0.0%     3   79.4  79.5  79.4  79.7   0.1
15. 116.51.27.246                                         0.0%     3   80.3  80.1  79.2  80.9   0.9
16. 192.0.78.13                                           0.0%     3   87.8  87.7  87.7  87.8   0.1

-n | –no-dns

mtrが数字でのIP番号を表示するよう強制し、ホスト名を解決しないようこのオプションを使用します。

-n
–no-dns

Use this option to force mtr to display numeric IP numbers and not try to resolve the host names.

確認したところ、curses(カーシス)ベースでも利用可能なようです。

$ sudo mtr -n -r log4hc.wordpress.com
HOST: stage01                     Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 192.168.123.1                 0.0%    10    1.1   1.5   0.9   3.6   1.1
  2. 192.168.3.1                   0.0%    10    1.1   1.3   1.1   2.9   0.6
  3. 219.195.111.254               0.0%    10   14.1  35.3  11.5 244.7  73.6
  4. 10.199.6.141                  0.0%    10   12.4  12.8  12.3  14.7   0.9
  5. 10.199.3.137                  0.0%    10   13.1  13.5  12.5  19.1   2.0
  6. 10.199.3.14                   0.0%    10   15.0  15.3  12.8  26.9   4.4
  7. 10.0.131.73                   0.0%    10   12.8  12.9  12.6  13.3   0.2
  8. 10.0.61.149                   0.0%    10   17.4  15.1  13.3  17.4   1.4
  9. 10.0.200.49                   0.0%    10   18.4  17.0  14.1  24.3   2.9
 10. 10.9.195.98                   0.0%    10   17.0  16.3  15.1  17.9   1.0
 11. 203.105.72.85                 0.0%    10   18.5  15.1  14.3  18.5   1.2
 12. 129.250.3.240                 0.0%    10   13.9  15.2  13.9  18.6   1.8
 13. 129.250.7.35                  0.0%    10   80.5  79.8  78.2  83.4   1.8
 14. 129.250.4.74                  0.0%    10   79.4  79.7  79.2  80.9   0.5
 15. 116.51.27.246                 0.0%    10   79.4  79.7  79.2  80.2   0.4
 16. 192.0.78.13                  10.0%    10   87.9  87.8  87.4  88.2   0.2
$

-o fields order | –order fields order

mtrのロードをした際にフィールドとその順序を指定するには、このオプションを使用します。

-o fields order
–order fields order

Use this option to specify the fields and their order when loading mtr.
Example: -o “LSD NBAW”

ソースをざっと見ると、どうやら以下のようなdisplay fieldが使えるようです。標準では”LS NABWV”のようです。

key Remark Header Format Width
‘ ‘ : Space between fields 1
L L: Loss Ratio Loss% ” %4.1f%%” 6
D D: Dropped Packets Drop ” %4d” 5
R R: Received Packets Rcv ” %5d” 6
S S: Sent Packets Snt ” %5d” 6
N N: Newest RTT(ms) Last ” %5.1f” 6
B B: Min/Best RTT(ms) Best ” %5.1f” 6
A A: Average RTT(ms) Avg ” %5.1f” 6
W W: Max/Worst RTT(ms) Wrst ” %5.1f” 6
V V: Standard Deviation StDev ” %5.1f” 6
G G: Geometric Mean Gmean ” %5.1f” 6
J J: Current Jitter Jttr ” %4.1f” 5
M M: Jitter Mean/Avg. Javg ” %4.1f” 5
X X: Worst Jitter Jmax ” %4.1f” 5
I I: Interarrival Jitter Jint ” %4.1f” 5

とりあえず片っ端から並べてみました。こちらもcurses(カーシス)ベースで利用可能でした。

$ sudo mtr -r log4hc.wordpress.com -o "LDRSNBAWVGJMXI"
HOST: stage01                     Loss% Drop   Rcv   Snt  Last  Best   Avg  Wrst StDev Gmean Jttr Javg Jmax Jint
  1. 192.168.123.1                 0.0%    0    10    10   1.3   0.9   1.0   1.3   0.1   1.0  0.3  0.1  0.3  0.9
  2. local.gateway                 0.0%    0    10    10   1.2   1.1   1.1   1.3   0.1   1.1  0.1  0.1  0.1  0.4
  3. softbank219195111254.bbtec.n  0.0%    0    10    10  12.1  11.5  14.7  41.0   9.3  13.3  0.5  3.2 29.4 19.5
  4. 10.199.6.141                  0.0%    0    10    10  12.4  12.4  12.7  14.3   0.6  12.7  0.0  0.4  1.7  2.8
  5. 10.199.3.137                  0.0%    0    10    10  12.8  12.5  13.6  17.7   1.6  13.5  0.3  1.5  5.2 12.4
  6. 10.199.3.14                   0.0%    0    10    10  12.6  12.6  14.1  19.0   2.5  13.9  0.7  2.5  6.0 20.5
  7. 10.0.131.73                   0.0%    0    10    10  16.6  12.5  14.5  22.5   3.1  14.2  3.7  2.9  9.6 25.8
  8. 10.0.61.149                   0.0%    0    10    10  15.6  13.2  14.8  17.8   1.5  14.8  2.4  1.5  2.7 12.6
  9. 10.0.200.49                   0.0%    0    10    10  17.5  14.8  15.9  17.8   1.2  15.9  2.3  1.2  2.3 10.4
 10. 10.9.195.98                   0.0%    0    10    10  15.1  14.0  15.9  18.2   1.4  15.8  1.7  1.6  3.2 11.7
 11. ae-13.r01.tokyjp01.jp.bb.gin  0.0%    0    10    10  14.1  14.0  14.4  14.9   0.3  14.4  0.0  0.2  0.6  1.6
 12. ae-13.r24.tokyjp05.jp.bb.gin  0.0%    0    10    10  14.6  13.9  19.2  42.2   8.8  18.0  2.2  9.0 27.4 68.0
 13. ae-3.r21.sngpsi05.sg.bb.gin.  0.0%    0    10    10  78.4  78.2  79.4  82.6   1.4  79.4  0.0  1.2  4.3  9.7
 14. ae-13.r00.sngpsi02.sg.bb.gin  0.0%    0    10    10  79.2  79.2  79.7  80.9   0.5  79.7  0.2  0.4  1.1  2.9
 15. 116.51.27.246                 0.0%    0    10    10  79.5  79.3  80.0  82.0   0.9  80.0  0.2  0.8  2.5  6.2
 16. 192.0.78.13                  10.0%    1     9    10  87.8  87.5  87.7  87.8   0.1  87.7  0.2  0.2  0.3  1.2
$

-g | –gtk

-g
–gtk

Use this option to force mtr to use the GTK+ based X11 window interface (if available). GTK+ must have been available on the system when mtr was built for this to work. See the GTK+ web page at http://www.gimp.org/gtk/ for more information about GTK+.

-p | –split

スプリット·ユーザー·インターフェースに適した形式を吐き出すように、mtrを設定するには、このオプションを使用します。

-p
–split

Use this option to set mtr to spit out a format that is suitable for a split-user interface.

出力の定義は調べてません。

$ sudo mtr log4hc.wordpress.com -p -c 3
1 192.168.123.1 0 1 1 1 1 1
2 192.168.3.1 0 1 1 1 1 1
2 local.gateway 0 1 1 1 1 1
3 219.195.111.254 0 1 1 11 11 11
3 softbank219195111254.bbtec.net 0 1 1 11 11 11
4 10.199.6.141 0 1 1 12 12 12
5 10.199.3.137 0 1 1 13 13 13
6 10.199.3.14 0 1 1 13 13 13
7 10.0.131.73 0 1 1 14 14 14
8 10.0.61.149 0 1 1 16 16 16
9 10.0.200.49 0 1 1 16 16 16
10 10.9.195.98 0 1 1 16 16 16
11 203.105.72.85 0 1 1 15 15 15
11 ae-13.r01.tokyjp01.jp.bb.gin.ntt.net 0 1 1 15 15 15
12 129.250.3.240 0 1 1 14 14 14
12 ae-13.r24.tokyjp05.jp.bb.gin.ntt.net 0 1 1 14 14 14
13 129.250.7.35 0 1 1 79 79 79
13 ae-3.r21.sngpsi05.sg.bb.gin.ntt.net 0 1 1 79 79 79
14 129.250.4.74 0 1 1 79 79 79
14 ae-13.r00.sngpsi02.sg.bb.gin.ntt.net 0 1 1 79 79 79
15 116.51.27.246 0 1 1 79 79 79
16 192.0.78.13 0 1 1 90 90 90
1 192.168.123.1 0 2 2 1 1 1
2 local.gateway 0 2 2 1 2 3turned but no answers given.
3 softbank219195111254.bbtec.net 0 2 2 11 11 11
4 10.199.6.141 0 2 2 12 12 12
5 10.199.3.137 0 2 2 13 13 14
6 10.199.3.14 0 2 2 13 17 22
7 10.0.131.73 0 2 2 13 13 14
8 10.0.61.149 0 2 2 15 16 16
9 10.0.200.49 0 2 2 16 16 17
10 10.9.195.98 0 2 2 13 15 16
11 ae-13.r01.tokyjp01.jp.bb.gin.ntt.net 0 2 2 14 14 15
12 ae-13.r24.tokyjp05.jp.bb.gin.ntt.net 0 2 2 13 14 14
13 ae-3.r21.sngpsi05.sg.bb.gin.ntt.net 0 1 2 79 79 79
13 ae-3.r21.sngpsi05.sg.bb.gin.ntt.net 0 2 2 78 78 79
14 ae-13.r00.sngpsi02.sg.bb.gin.ntt.net 0 1 2 79 79 79
14 ae-13.r00.sngpsi02.sg.bb.gin.ntt.net 0 2 2 79 79 79
15 116.51.27.246 0 1 2 79 79 79
15 116.51.27.246 0 2 2 79 79 79
16 192.0.78.13 0 1 2 90 90 90
1 192.168.123.1 0 3 3 1 1 1
16 192.0.78.13 0 2 2 89 89 90
2 local.gateway 0 3 3 1 1 3
3 softbank219195111254.bbtec.net 0 3 3 11 11 11
4 10.199.6.141 0 3 3 12 12 12
5 10.199.3.137 0 3 3 13 13 14
6 10.199.3.14 0 3 3 13 17 22
7 10.0.131.73 0 3 3 13 13 14
8 10.0.61.149 0 3 3 15 16 16
9 10.0.200.49 0 3 3 16 17 19
10 10.9.195.98 0 3 3 13 16 17
11 ae-13.r01.tokyjp01.jp.bb.gin.ntt.net 0 3 3 14 14 15
12 ae-13.r24.tokyjp05.jp.bb.gin.ntt.net 0 3 3 13 14 14
13 ae-3.r21.sngpsi05.sg.bb.gin.ntt.net 0 2 3 78 78 79
13 ae-3.r21.sngpsi05.sg.bb.gin.ntt.net 0 3 3 78 79 80
14 ae-13.r00.sngpsi02.sg.bb.gin.ntt.net 0 2 3 79 79 79
14 ae-13.r00.sngpsi02.sg.bb.gin.ntt.net 0 3 3 79 79 79
15 116.51.27.246 0 2 3 79 79 79
15 116.51.27.246 0 3 3 79 80 82
16 192.0.78.13 0 2 3 89 89 90
$ 

-l | –raw

raw出力フォーマットを使用するようにmtrに伝えるために、このオプションを使用します。この形式は、測定結果の保存に適しています。これは、他の表示方法のうちのいずれかに提示するために解析することができる。

-l
–raw

Use this option to tell mtr to use the raw output format. This format is better suited for archival of the measurement results. It could be parsed to be presented into any of the other display methods.

出力の形式はソースにありましたが、以下のように定義されているみたいです。

type The split format note
hostline “h <pos> <host IP>”
pingline “p <pos> <pingtime (ms)>”
dnsline “d <pos> <hostname>”
timestampline “t <pos> <pingtime> <timestamp>” Timestampline is not yet implemented.
$ sudo mtr log4hc.wordpress.com -l -c 3
h 0 192.168.123.1
p 0 1051
h 1 192.168.3.1
p 1 1139
h 2 219.195.111.254
p 2 12027
h 3 10.199.6.141
p 3 12562
h 4 10.199.3.137
p 4 13053
h 5 10.199.3.14
p 5 14771
h 6 10.0.131.73
p 6 12917
h 7 10.0.61.149
p 7 17107
h 8 10.0.200.49
p 8 14779
h 9 10.9.195.98
p 9 17033
h 10 203.105.72.85
p 10 14498
h 11 129.250.3.240
p 11 16110
h 12 129.250.7.35
p 12 84764
h 13 129.250.4.74
p 13 79343
h 14 116.51.27.246
p 14 81380
h 15 192.0.78.13
p 15 88248
h 16 192.0.78.13
p 16 88143
p 0 916
d 1 local.gatewayo error returned but no answers given.
p 1 1074
d 2 softbank219195111254.bbtec.net
p 2 12033
p 3 24314
p 4 12875
p 5 12871
p 6 13434
p 7 16033
p 8 17750
p 9 17621
d 10 ae-13.r01.tokyjp01.jp.bb.gin.ntt.net
p 10 14837
d 11 ae-13.r24.tokyjp05.jp.bb.gin.ntt.net
p 11 15397
d 12 ae-3.r21.sngpsi05.sg.bb.gin.ntt.net
p 12 83892
d 13 ae-13.r00.sngpsi02.sg.bb.gin.ntt.net
p 13 79443
p 14 79395
p 0 1078
p 15 87736
p 1 1106
p 2 11601
p 3 12575
p 4 13059
p 5 12560
p 6 13331
p 7 15405
p 8 13845
p 9 13813
p 10 14881
p 11 27095
p 12 79557
p 13 79287
p 14 79288
$ 

-a IP.ADD.RE.SS | –address IP.ADD.RE.SS

すべてのパケットがこのインタフェースを介して送信されるように、特定のインターフェイスに発信パケット」ソケットをバインドするには、このオプションを使用します。
このオプションは、DNS要求には適用されないことに注意してください。 (望もうと望まざると)

-a IP.ADD.RE.SS
–address IP.ADD.RE.SS

Use this option to bind outgoing packets’ socket to specific interface, so that any packet will be sent through this interface. N
OTE that this option doesn’t apply to DNS requests (which could be and could not be what you want).

-i SECONDS | –interval SECONDS

ICMPエコー要求間の秒の正の数を指定するには、このオプションを使用します。このパラメータのデフォルト値は1秒である。

-i SECONDS
–interval SECONDS

Use this option to specify the positive number of seconds between ICMP ECHO requests. The default value for this parameter is one second.

細かな仕様は把握できていませんが、-tオプションと組み合わせて表示ペースの差異を見てみると確かに違いが出ます。

-u

ICMP ECHOの代わりにUDPデータグラムを使用します。

-u
Use UDP datagrams instead of ICMP ECHO.

-4

IPv4 のみ利用します。

-4
Use IPv4 only.

-6

IPv6 のみ利用します。

-6
Use IPv6 only.

番外:-x

manにはありませんでしたが、-xオプションでDisplayXMLモードで出力されました。

Bugs

最近のルータのいくつかは、他のネットワークトラフィックよりもICMP ECHOパケットに低い優先順位を与えます。
したがって、mtrによってレポートされるこれらのルータの信頼性は、実際の信頼性よりもかなり低くなります。

Some modern routers give a lower priority to ICMP ECHO packets than to other network traffic.
Consequently, the reliability of these routers reported by mtr will be significantly lower than the actual reliability of these routers.

参考

mtr, a network diagnostic tool
http://www.bitwizard.nl/mtr/
Official repository for mtr, a network diagnostic tool
https://github.com/traviscross/mtr
MTR (software) – Wikipedia
http://en.wikipedia.org/wiki/MTR_%28software%29

コメントを残す