Scroll to navigation

MTR(8) System Administration MTR(8)


mtr - a network diagnostic tool


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] [-I NAME] [-a ADDRESS] [-f FIRST-TTL] [-m MAX-TTL] [-U MAX-UNKNOWN] [--udp] [--tcp] [--sctp] [-P PORT] [-L LOCALPORT] [-Z TIMEOUT] [-M MARK] HOSTNAME


This version was compiled without GTK. Therefore corresponding options don't work. You can use xmtr for working with the GTK interface.

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 packet loss.


Print the summary of command line argument options.
Print the installed version of mtr.
Use IPv4 only.
Use IPv6 only. (IPV4 may be used for DNS lookups.)
Reads the list of hostnames from the specified file.
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.
This option puts mtr into wide report mode. When in this mode, mtr will not cut hostnames in the report.
Use this option to tell mtr to use the xml output format. This format is better suited for automated processing of the measurement results.
Use this option to force mtr to use the curses based terminal interface (if available). In case the list of hops exceeds the height of your terminal, you can use the + and - keys to scroll up and down half a page.

Ctrl-L clears spurious error messages that may overwrite other parts of the display.

Use this option to select the initial display mode: 0 (default) selects statistics, 1 selects the stripchart without latency information, and 2 selects the stripchart with latency information.
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 for more information about GTK+.
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.
Example of the raw output format:
h 0
p 0 339
h 1
p 1 530
h 2
p 2 531
h 3
p 3 1523
h 5
p 5 1603
h 6
p 6 1127
h 7
d 7
Use the Comma-Separated-Value (CSV) output format. (Note: The separator is actually a semi-colon ';'.)
Example of the CSV output format:
Use this option to tell mtr to use the JSON output format. This format is better suited for automated processing of the measurement results. Jansson library must have been available on the system when mtr was built for this to work.
Use this option to set mtr to spit out a format that is suitable for a split-user interface.
Use this option to force mtr to display numeric IP numbers and not try to resolve the host names.
Use this option to tell mtr to display both the host names and numeric IP numbers. In split mode this adds an extra field to the output. In report mode, there is usually too little space to add the IPs, and they will be truncated. Use the wide report (-w) mode to see the IPs in report mode.
Use this option to specify which fields to display and in which order. You may use one or more space characters to separate fields.
Available fields:
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

Example: -o "LSD NBAW X"

Displays information about each IP hop. Valid values for n are:
0 Display AS number (equivalent to -z)
1 Display IP prefix
2 Display country code of the origin AS
3 Display RIR (ripencc, arin, ...)
4 Display the allocation date of the IP prefix

It is possible to cycle between these fields at runtime (using the y key).

Displays the Autonomous System (AS) number alongside each hop. Equivalent to --ipinfo 0.
Example (columns to the right not shown for clarity):
1. AS???   r-76520-PROD.greenqloud.internal
2. AS51969
3. AS???
4. AS30818
5. ???
6. AS???
7. AS1850
Use this option to specify the positive number of seconds between ICMP ECHO requests. The default value for this parameter is one second. The root user may choose values between zero and one.
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.
This option 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 packet size up to that number.

Specifies bit pattern to use in payload. Should be within range 0 - 255. If NUM is greater than 255, a random pattern is used.
Use this option to specify the positive number of seconds to wait for responses after the final request. The default value is five seconds.
Specifies value for type of service field in IP header. Should be within range 0 - 255.
Use this option to tell mtr to display information from ICMP extensions for MPLS (RFC 4950) that are encoded in the response packets.
Use the network interface with a specific name for sending network probes. This can be useful when you have multiple network interfaces with routes to your destination, for example both wired Ethernet and WiFi, and wish to test a particular interface.
Use this option to bind the outgoing socket to ADDRESS, so that all packets will be sent with ADDRESS as source address. NOTE that this option doesn't apply to DNS requests (which could be and could not be what you want).
Specifies with what TTL to start. Defaults to 1.
Specifies the maximum number of hops (max time-to-live value) traceroute will probe. Default is 30.
Specifies the maximum unknown host. Default is 5.
Use UDP datagrams instead of ICMP ECHO.
Use TCP SYN packets instead of ICMP ECHO. PACKETSIZE is ignored, since SYN packets can not contain data.
Use Stream Control Transmission Protocol packets instead of ICMP ECHO.
The target port number for TCP/SCTP/UDP traces.
The source port number for UDP traces.
The number of seconds to keep probe sockets open before giving up on the connection. Using large values for this, especially combined with a short interval, will use up a lot of file descriptors.
Set the mark for each packet sent through this socket similar to the netfilter MARK target but socket-based. MARK is 32 unsigned integer. See socket(7) for full description of this socket option.


mtr recognizes a few environment variables.

This environment variable allows one to specify options, as if they were passed on the command line. It is parsed before reading the actual command line options, so that options specified in MTR_OPTIONS are overridden by command-line options.


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).

A path to the mtr-packet executable, to be used for sending and receiving network probes. If MTR_PACKET is unset, the PATH will be used to search for an mtr-packet executable.
Specifies an X11 server for the GTK+ frontend.


mtr can be controlled while it is running with the following keys:
?|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
q exit


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

For patches, bug reports, or feature requests, please open an issue on GitHub at:


mtr-packet(8), traceroute(8), ping(8), socket(7), TCP/IP Illustrated (Stevens, ISBN 0201633469).

0.95 mtr