Blame man/mtr.8.in

Packit b802ec
.TH MTR 8 "@VERSION@" "mtr" "System Administration"
Packit b802ec
.SH NAME
Packit b802ec
mtr \- a network diagnostic tool
Packit b802ec
.SH SYNOPSIS
Packit b802ec
.B mtr
Packit b802ec
[\c
Packit b802ec
.BR \-4 |\c
Packit b802ec
.B \-6\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-F \ FILENAME\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-report\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-report-wide\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-xml\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-gtk\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-curses\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \--displaymode \ MODE\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-raw\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-csv\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-json\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-split\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-no-dns\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-show-ips\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-o \ FIELDS\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-y \ IPINFO\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-aslookup\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-i \ INTERVAL\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-c \ COUNT\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-s \ PACKETSIZE\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-B \ BITPATTERN\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-G \ GRACEPERIOD\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-Q \ TOS\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-mpls\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-a \ ADDRESS\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-f \ FIRST\-TTL\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-m \ MAX\-TTL\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-U \ MAX\-UNKNOWN\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-udp\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.B \-\-tcp\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-\-sctp\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-P \ PORT\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-L \ LOCALPORT\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-Z \ TIMEOUT\c
Packit b802ec
]
Packit b802ec
[\c
Packit b802ec
.BI \-M \ MARK\c
Packit b802ec
]
Packit b802ec
.I HOSTNAME
Packit b802ec
.SH DESCRIPTION
Packit b802ec
.B mtr 
Packit b802ec
combines the functionality of the 
Packit b802ec
.B traceroute
Packit b802ec
and 
Packit b802ec
.B ping
Packit b802ec
programs in a single network diagnostic tool.
Packit b802ec
.PP
Packit b802ec
As 
Packit b802ec
.B mtr 
Packit b802ec
starts, it investigates the network connection between the host 
Packit b802ec
.B mtr
Packit b802ec
runs on and 
Packit b802ec
.BR HOSTNAME
Packit b802ec
by sending packets with purposely low TTLs.  It continues to send
Packit b802ec
packets with low TTL, noting the response time of the intervening
Packit b802ec
routers.  This allows 
Packit b802ec
.B mtr 
Packit b802ec
to print the response percentage and response times of the internet
Packit b802ec
route to 
Packit b802ec
.BR HOSTNAME . 
Packit b802ec
A sudden increase in packet loss or response time is often an indication
Packit b802ec
of a bad (or simply overloaded) link. 
Packit b802ec
.PP
Packit b802ec
The results are usually reported as round-trip-response times in milliseconds
Packit b802ec
and the percentage of packetloss. 
Packit b802ec
.SH OPTIONS
Packit b802ec
.TP
Packit b802ec
.B \-h\fR, \fB\-\-help
Packit b802ec
Print the summary of command line argument options.
Packit b802ec
.TP
Packit b802ec
.B \-v\fR, \fB\-\-version
Packit b802ec
Print the installed version of mtr.  
Packit b802ec
.TP
Packit b802ec
.B \-4
Packit b802ec
Use IPv4 only.
Packit b802ec
.TP
Packit b802ec
.B \-6
Packit b802ec
Use IPv6 only.  (IPV4 may be used for DNS lookups.)
Packit b802ec
.TP
Packit b802ec
.B \-F \fIFILENAME\fR, \fB\-\-filename \fIFILENAME
Packit b802ec
Reads the list of hostnames from the specified file.
Packit b802ec
.TP
Packit b802ec
.B \-r\fR, \fB\-\-report
Packit b802ec
This option puts 
Packit b802ec
.B mtr
Packit b802ec
into 
Packit b802ec
.B report
Packit b802ec
mode.  When in this mode,
Packit b802ec
.B mtr
Packit b802ec
will run for the number of cycles specified by the 
Packit b802ec
.B \-c
Packit b802ec
option, and then print statistics and exit.  
Packit b802ec
.TP
Packit b802ec
\c
Packit b802ec
This mode is useful for generating statistics about network quality.  
Packit b802ec
Note that each running instance of 
Packit b802ec
.B mtr
Packit b802ec
generates a significant amount of network traffic.  Using 
Packit b802ec
.B mtr
Packit b802ec
to measure the quality of your network may result in decreased
Packit b802ec
network performance.  
Packit b802ec
.TP
Packit b802ec
.B \-w\fR, \fB\-\-report\-wide
Packit b802ec
This option puts 
Packit b802ec
.B mtr
Packit b802ec
into 
Packit b802ec
.B wide report
Packit b802ec
mode.  When in this mode,
Packit b802ec
.B mtr
Packit b802ec
will not cut hostnames in the report. 
Packit b802ec
.TP
Packit b802ec
.B \-x\fR, \fB\-\-xml
Packit b802ec
Use this option to tell
Packit b802ec
.B mtr
Packit b802ec
to use the xml output format.  This format is better suited for
Packit b802ec
automated processing of the measurement results.
Packit b802ec
.TP
Packit b802ec
.B \-t\fR, \fB\-\-curses
Packit b802ec
Use this option to force 
Packit b802ec
.B mtr 
Packit b802ec
to use the curses based terminal
Packit b802ec
interface (if available).
Packit b802ec
In case the list of hops exceeds the 
Packit b802ec
height of your terminal, you can use the 
Packit b802ec
.B +
Packit b802ec
and
Packit b802ec
.B -
Packit b802ec
keys to scroll up and down half a page.
Packit b802ec
Packit b802ec
.B Ctrl\fR-\fPL
Packit b802ec
clears spurious error messages that may overwrite other parts of the display.
Packit b802ec
Packit b802ec
.TP
Packit b802ec
.B -\-displaymode \fIMODE
Packit b802ec
Use this option to select the initial display mode: 0 (default)
Packit b802ec
selects statistics, 1 selects the stripchart without latency
Packit b802ec
information, and 2 selects the stripchart with latency
Packit b802ec
information.
Packit b802ec
.TP
Packit b802ec
.B \-g\fR, \fB\-\-gtk
Packit b802ec
Use this option to force
Packit b802ec
.B mtr 
Packit b802ec
to use the GTK+ based X11 window interface (if available).  
Packit b802ec
GTK+ must have been available on the system when 
Packit b802ec
.B mtr 
Packit b802ec
was built for this to work.  See the GTK+ web page at 
Packit b802ec
.UR http://\:www.\:gtk.\:org/
Packit b802ec
.UE
Packit b802ec
for more information about GTK+.
Packit b802ec
.TP
Packit b802ec
.B \-l\fR, \fB\-\-raw
Packit b802ec
Use the raw output format.  This format is better suited for
Packit b802ec
archival of the measurement results.  It could be parsed to 
Packit b802ec
be presented into any of the other display methods. 
Packit b802ec
.IP
Packit b802ec
Example of the raw output format:
Packit b802ec
.nf
Packit b802ec
h 0 10.1.1.1
Packit b802ec
p 0 339
Packit b802ec
h 1 46.149.16.4
Packit b802ec
p 1 530
Packit b802ec
h 2 172.31.1.16
Packit b802ec
p 2 531
Packit b802ec
h 3 82.221.168.236
Packit b802ec
p 3 1523
Packit b802ec
h 5 195.130.211.8
Packit b802ec
p 5 1603
Packit b802ec
h 6 193.4.58.17
Packit b802ec
p 6 1127
Packit b802ec
h 7 193.4.58.17
Packit b802ec
d 7 www.isnic.is
Packit b802ec
.fi
Packit b802ec
.TP
Packit b802ec
.B \-C\fR, \fB\-\-csv
Packit b802ec
Use the Comma-Separated-Value (CSV) output format.
Packit b802ec
(Note: The separator is actually a semi-colon ';'.)
Packit b802ec
.IP
Packit b802ec
Example of the CSV output format:
Packit b802ec
.nf
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;1;r-76520-PROD.greenqloud.internal;288
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;2;46.149.16.4;2086
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;3;172.31.1.16;600
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;4;82.221.168.236;1163
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;5;???;0
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;6;rix-k2-gw.isnic.is;1654
Packit b802ec
MTR.0.86+git:16e39fc0;1435562787;OK;nic.is;7;www.isnic.is;1036
Packit b802ec
.fi
Packit b802ec
.TP
Packit b802ec
.B \-j\fR, \fB\-\-json
Packit b802ec
Use this option to tell
Packit b802ec
.B mtr
Packit b802ec
to use the JSON output format.  This format is better suited for
Packit b802ec
automated processing of the measurement results.
Packit b802ec
.TP
Packit b802ec
.B \-p\fR, \fB\-\-split
Packit b802ec
Use this option to set
Packit b802ec
.B mtr 
Packit b802ec
to spit out a format that is suitable for a split-user interface.
Packit b802ec
.TP
Packit b802ec
.B \-n\fR, \fB\-\-no\-dns
Packit b802ec
Use this option to force 
Packit b802ec
.B mtr 
Packit b802ec
to display numeric IP numbers and not try to resolve the
Packit b802ec
host names. 
Packit b802ec
.TP
Packit b802ec
.B \-b\fR, \fB\-\-show\-ips
Packit b802ec
Use this option to tell
Packit b802ec
.B mtr
Packit b802ec
to display both the host names and numeric IP numbers.  In split mode
Packit b802ec
this adds an extra field to the output.  In report mode, there is usually
Packit b802ec
too little space to add the IPs, and they will be truncated.  Use the
Packit b802ec
wide report (-w) mode to see the IPs in report mode. 
Packit b802ec
.TP
Packit b802ec
.B \-o \fIFIELDS\fR, \fB\-\-order \fIFIELDS
Packit b802ec
Use this option to specify which fields to display and in which order.
Packit b802ec
You may use one or more space characters to separate fields.
Packit b802ec
.br
Packit b802ec
Available fields:
Packit b802ec
.TS
Packit b802ec
center allbox tab(%);
Packit b802ec
ll.
Packit b802ec
L%Loss ratio
Packit b802ec
D%Dropped packets
Packit b802ec
R%Received packets
Packit b802ec
S%Sent Packets
Packit b802ec
N%Newest RTT(ms)
Packit b802ec
B%Min/Best RTT(ms)
Packit b802ec
A%Average RTT(ms)
Packit b802ec
W%Max/Worst RTT(ms)
Packit b802ec
V%Standard Deviation
Packit b802ec
G%Geometric Mean
Packit b802ec
J%Current Jitter
Packit b802ec
M%Jitter Mean/Avg.
Packit b802ec
X%Worst Jitter
Packit b802ec
I%Interarrival Jitter
Packit b802ec
.TE
Packit b802ec
.br
Packit b802ec
Packit b802ec
Example:
Packit b802ec
-o "LSD NBAW  X"
Packit b802ec
.TP
Packit b802ec
.B \-y \fIn\fR, \fB\-\-ipinfo \fIn
Packit b802ec
Displays information about each IP hop.  Valid values for \fIn\fR are:
Packit b802ec
.TS
Packit b802ec
tab(%);
Packit b802ec
ll.
Packit b802ec
0%Display AS number (equivalent to \fB-z\fR)
Packit b802ec
1%Display IP prefix
Packit b802ec
2%Display country code of the origin AS
Packit b802ec
3%Display RIR (ripencc, arin, ...)
Packit b802ec
4%Display the allocation date of the IP prefix
Packit b802ec
.TE
Packit b802ec
.br
Packit b802ec
Packit b802ec
It is possible to cycle between these fields at runtime (using the \fBy\fR key).
Packit b802ec
.TP
Packit b802ec
.B \-z\fR, \fB\-\-aslookup
Packit b802ec
Displays the Autonomous System (AS) number alongside each hop.  Equivalent to \fB\-\-ipinfo 0\fR.
Packit b802ec
.IP
Packit b802ec
Example (columns to the right not shown for clarity):
Packit b802ec
.nf
Packit b802ec
1. AS???   r-76520-PROD.greenqloud.internal
Packit b802ec
2. AS51969 46.149.16.4
Packit b802ec
3. AS???   172.31.1.16
Packit b802ec
4. AS30818 82.221.168.236
Packit b802ec
5. ???
Packit b802ec
6. AS???   rix-k2-gw.isnic.is
Packit b802ec
7. AS1850  www.isnic.is
Packit b802ec
.fi
Packit b802ec
.TP
Packit b802ec
.B \-i \fISECONDS\fR, \fB\-\-interval \fISECONDS
Packit b802ec
Use this option to specify the positive number of seconds between ICMP
Packit b802ec
ECHO requests.  The default value for this parameter is one second.  The
Packit b802ec
root user may choose values between zero and one.
Packit b802ec
.TP
Packit b802ec
.B \-c \fICOUNT\fR, \fB\-\-report\-cycles \fICOUNT
Packit b802ec
Use this option to set the number of pings sent to determine
Packit b802ec
both the machines on the network and the reliability of 
Packit b802ec
those machines.  Each cycle lasts one second.
Packit b802ec
.TP
Packit b802ec
.B \-s \fIPACKETSIZE\fR, \fB\-\-psize \fIPACKETSIZE
Packit b802ec
This option sets the packet size used for probing.  It is in bytes,
Packit b802ec
inclusive IP and ICMP headers.
Packit b802ec
Packit b802ec
If set to a negative number, every iteration will use a different, random
Packit b802ec
packet size up to that number.
Packit b802ec
.TP
Packit b802ec
.B \-B \fINUM\fR, \fB\-\-bitpattern \fINUM
Packit b802ec
Specifies bit pattern to use in payload.  Should be within range 0 - 255.  If
Packit b802ec
.I NUM
Packit b802ec
is greater than 255, a random pattern is used.
Packit b802ec
.TP
Packit b802ec
.B \-G \fISECONDS\fR, \fB\-\-gracetime \fISECONDS
Packit b802ec
Use this option to specify the positive number of seconds to wait for responses
Packit b802ec
after the final request. The default value is five seconds.
Packit b802ec
.TP
Packit b802ec
.B \-Q \fINUM\fR, \fB\-\-tos \fINUM
Packit b802ec
Specifies value for type of service field in IP header.  Should be within range 0
Packit b802ec
- 255.
Packit b802ec
.TP
Packit b802ec
.B \-e\fR, \fB\-\-mpls
Packit b802ec
Use this option to tell 
Packit b802ec
.B mtr 
Packit b802ec
to display information from ICMP extensions for MPLS (RFC 4950)
Packit b802ec
that are encoded in the response packets.
Packit b802ec
.TP
Packit b802ec
.B \-a \fIADDRESS\fR, \fB\-\-address \fIADDRESS
Packit b802ec
Use this option to bind the outgoing socket to
Packit b802ec
.IR ADDRESS ,
Packit b802ec
so that all packets will be sent with
Packit b802ec
.I ADDRESS
Packit b802ec
as source address.  NOTE that this option doesn't apply to DNS requests
Packit b802ec
(which could be and could not be what you want).
Packit b802ec
.TP
Packit b802ec
.B \-f \fINUM\fR, \fB\-\-first-ttl \fINUM
Packit b802ec
Specifies with what TTL to start.  Defaults to 1.
Packit b802ec
.TP
Packit b802ec
.B \-m \fINUM\fR, \fB\-\-max-ttl \fINUM
Packit b802ec
Specifies the maximum number of hops (max time-to-live value) traceroute will
Packit b802ec
probe.  Default is 30.
Packit b802ec
.TP
Packit b802ec
.B \-U \fINUM\fR, \fB\-\-max-unknown \fINUM
Packit b802ec
Specifies the maximum unknown host. Default is 5.
Packit b802ec
.TP
Packit b802ec
.B \-u\fR, \fB\-\-udp
Packit b802ec
Use UDP datagrams instead of ICMP ECHO.
Packit b802ec
.TP
Packit b802ec
.B \-T\fR, \fB\-\-tcp
Packit b802ec
Use TCP SYN packets instead of ICMP ECHO.
Packit b802ec
.I PACKETSIZE
Packit b802ec
is ignored, since SYN packets can not contain data.
Packit b802ec
.TP
Packit b802ec
.B \-S\fR, \fB\-\-sctp
Packit b802ec
Use Stream Control Transmission Protocol packets instead of ICMP ECHO.
Packit b802ec
.TP
Packit b802ec
.B \-P \fIPORT\fR, \fB\-\-port \fIPORT
Packit b802ec
The target port number for TCP/SCTP/UDP traces.
Packit b802ec
.TP
Packit b802ec
.B \-L \fILOCALPORT\fR, \fB\-\-localport \fILOCALPORT
Packit b802ec
The source port number for UDP traces.
Packit b802ec
.TP
Packit b802ec
.B \-Z \fISECONDS\fR, \fB\-\-timeout \fISECONDS
Packit b802ec
The number of seconds to keep probe sockets open before giving up on
Packit b802ec
the connection.  Using large values for this, especially combined with
Packit b802ec
a short interval, will use up a lot of file descriptors.
Packit b802ec
.TP
Packit b802ec
.B \-M \fIMARK\fR, \fB\-\-mark \fIMARK
Packit b802ec
Set the mark for each packet sent through this socket similar to the
Packit b802ec
netfilter MARK target but socket-based.
Packit b802ec
.I MARK
Packit b802ec
is 32 unsigned integer.  See
Packit b802ec
.BR socket (7)
Packit b802ec
for full description of this socket option.
Packit b802ec
.SH ENVIRONMENT
Packit b802ec
.B mtr
Packit b802ec
recognizes a few environment variables.
Packit b802ec
.TP
Packit b802ec
.B MTR_OPTIONS
Packit b802ec
This environment variable allows to specify options, as if they were
Packit b802ec
passed on the command line.  It is parsed before reading the actual
Packit b802ec
command line options, so that options specified in
Packit b802ec
.B MTR_OPTIONS
Packit b802ec
are overridden by command-line options.
Packit b802ec
Packit b802ec
Example:
Packit b802ec
Packit b802ec
.BI MTR_OPTIONS ="-4\ -c\ 1"
Packit b802ec
.B mtr
Packit b802ec
.I \-6\ localhost
Packit b802ec
Packit b802ec
would send one probe (because of
Packit b802ec
.I -c\ 1\c
Packit b802ec
) towards
Packit b802ec
.B ::1
Packit b802ec
(because of
Packit b802ec
.IR -6 ,
Packit b802ec
which overrides the
Packit b802ec
.I -4
Packit b802ec
passed in
Packit b802ec
.B MTR_OPTIONS\c
Packit b802ec
).
Packit b802ec
.TP
Packit b802ec
.B MTR_PACKET
Packit b802ec
A path to the
Packit b802ec
.I mtr-packet
Packit b802ec
executable, to be used for sending and receiving network probes.  If
Packit b802ec
.B MTR_PACKET
Packit b802ec
is unset, the
Packit b802ec
.B PATH
Packit b802ec
will be used to search for an
Packit b802ec
.I mtr-packet
Packit b802ec
executable.
Packit b802ec
.TP
Packit b802ec
.B DISPLAY
Packit b802ec
Specifies an X11 server for the GTK+ frontend.
Packit b802ec
.SH BUGS
Packit b802ec
Some modern routers give a lower priority to ICMP ECHO packets than 
Packit b802ec
to other network traffic.  Consequently, the reliability of these
Packit b802ec
routers reported by 
Packit b802ec
.B mtr
Packit b802ec
will be significantly lower than the actual reliability of 
Packit b802ec
these routers.  
Packit b802ec
.SH CONTACT INFORMATION
Packit b802ec
.PP
Packit b802ec
For the latest version, see the mtr web page at 
Packit b802ec
.UR http://\:www.\:bitwizard.\:nl/\:mtr/
Packit b802ec
.UE
Packit b802ec
.PP
Packit b802ec
For patches, bug reports, or feature requests, please open an issue on
Packit b802ec
GitHub at:
Packit b802ec
.UR https://\:github\:.com/\:traviscross/\:mtr
Packit b802ec
.UE .
Packit b802ec
.SH "SEE ALSO"
Packit b802ec
.BR mtr-packet (8),
Packit b802ec
.BR traceroute (8),
Packit b802ec
.BR ping (8),
Packit b802ec
.BR socket (7),
Packit b802ec
TCP/IP Illustrated (Stevens, ISBN 0201633469).