The mtr
command, short for “My Traceroute,” is a network diagnostic tool that combines the functionalities of the ping
and traceroute
commands. It provides real-time analysis of the route packets take to a network host, helping users identify network issues and latency.
The basic syntax of the mtr
command is as follows:
mtr [options] [hostname]
-r
: Run in report mode, which provides a summary of the results.-c <count>
: Set the number of pings to send.-i <interval>
: Specify the interval between pings in seconds.-p
: Show the port number in the output.-n
: Show numerical addresses instead of resolving hostnames.Here are some practical examples of using the mtr
command:
mtr example.com
mtr -r example.com
mtr -c 10 example.com
mtr -i 2 example.com
mtr -n example.com
mtr
with the -r
option for a quick summary of the network path without continuous output.-c
option with -r
to limit the number of pings and get a concise report.-i
option to adjust the interval for more detailed analysis.