- Traceroute to a host and continuously ping all intermediary hops:mtr [host]- Disable IP address and host name mapping:mtr -n [host]- Generate output after pinging each hop 10 times:mtr -w [host]- Force IP IPv4 or IPV6:mtr -4 [host]- Wait for a given time (in seconds) before sending another packet to the same hop:mtr -i [seconds] [host]
mtr [-4|-6] [-F FILENAME] [--report] [--report-wide] [--xml] [--gtk] [--curses] [--displaymode MODE] [--raw] [--csv] [--json] [--split] [--no-dns] [--show-ips] [-o FIELDS] [-y IPINFO] [--aslookup] [-i INTERVAL] [-c COUNT] [-s PACKETSIZE] [-B BITPATTERN] [-G GRACEPERIOD] [-Q TOS] [--mpls] [-a ADDRESS] [-f FIRST-TTL] [-m MAX-TTL] [-U MAX-UNKNOWN] [--udp] [--tcp] [-P PORT] [-L LOCALPORT] [-Z TIMEOUT] [-M MARK] HOSTNAME
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 purposely 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 packet loss or response time is often an indication of a bad (or simply overloaded) link.
The results are usually reported as round-trip-response times in milliseconds and the percentage of packetloss.
h 0 10.1.1.1 p 0 339 h 1 126.96.36.199 p 1 530 h 2 172.31.1.16 p 2 531 h 3 188.8.131.52 p 3 1523 h 5 184.108.40.206 p 5 1603 h 6 220.127.116.11 p 6 1127 h 7 18.104.22.168 d 7 www.isnic.is
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;1;r-76520-PROD.greenqloud.internal;288 MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;2;22.214.171.124;2086 MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;3;172.31.1.16;600 MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;4;126.96.36.199;1163 MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;5;???;0 MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;6;rix-k2-gw.isnic.is;1654 MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;7;www.isnic.is;1036
Example: -o "LSD NBAW X"
It is possible to cycle between these fields at runtime (using the y key).
1. AS??? r-76520-PROD.greenqloud.internal 2. AS51969 188.8.131.52 3. AS??? 172.31.1.16 4. AS30818 184.108.40.206 5. ??? 6. AS??? rix-k2-gw.isnic.is 7. AS1850 www.isnic.is
If set to a negative number, every iteration will use a different, random packet size up to that number.
mtr recognizes a few environment variables.
MTR_OPTIONS=-4 -c 1 mtr -6 localhost
would send one probe (because of -c 1) towards ::1 (because of -6, which overrides the -4 passed in MTR_OPTIONS).
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.
For the latest version, see the mtr web page at http://www.bitwizard.nl/mtr/.
The mtr mailinglist was little used and is no longer active.
For patches, bug reports, or feature requests, please open an issue on GitHub at: https://github.com/traviscross/mtr.
traceroute(8), ping(8), TCP/IP Illustrated (Stevens, ISBN 0201633469).