The mtr
command combines the functionality of the traceroute
and ping
commands to provide a comprehensive view of the network path to a destination. It helps diagnose network issues by showing the route packets take to reach a specific host, along with the latency and packet loss at each hop.
The basic syntax of the mtr
command is as follows:
mtr [options] [destination]
-r
: Run in report mode, providing a summary of the results.-c <count>
: Specify the number of pings to send.-i <interval>
: Set the interval between pings in seconds.-w
: Use wide output format for better readability.-p
: Show the port number in the output.Here are some practical examples of using the mtr
command:
mtr example.com
mtr -r -c 10 example.com
mtr -i 2 example.com
mtr -w example.com
mtr -p example.com
mtr
with the -r
option for a quick summary if you want to avoid continuous output.-c
option with -r
to limit the number of pings and get a concise report.-i
option to reduce network load.mtr
to identify any persistent latency or packet loss issues in your network.