Network diagnostic with mtr

MTR is a network diagnostic tool which combine the best from Ping and Traceroute. It helps software tester to diagnose network performance and create helpful reports. By mtr, you could also monitor the network. It sends ICMP ECHO requests to a destination and listens for the answers. Mtr works on both command-line and GUI (depending to installation method).


# Debian/Ubuntu (text-version only)
$ apt-get install mtr-tiny

# Debian/Ubuntu (gui and text-version)
$ apt-get install mtr

# RedHat/CentOS/Fedora (text-version only)
$ yum install mtr-tiny

# RedHat/CentOS/Fedora (gui and text-version)
$ yum install mtr

# Mac OS X (Homebrew)
$ brew install mtr

# Mac OS X (MacPorts)
$ port install mtr

The mtr project is on GitHub. If you like to compile mtr by your self.

Command-line examples

# basic syntax
$ mtr [options] [target]

# example host
$ mtr

# example IP
$ mtr

# force text-mode (-t | --curses)
$ mtr -t

# do not resolve host names (-n | --no-dns)
$ mtr -n

# limit to 5 (-c | --report-cycles)
$ mtr -c 5

# report mode (-r | --report)
$ mtr -r -c 5

# do not cut long names (-w | --report-wide)
$ mtr -r -w -c 5

Note: Read the man page for more options!

Report analysis

  • Loss% – Shows packets loss at each hop
  • Snt – Number of packets being sent
  • Last – Latency of the last packet
  • Avg – Average latency of all packets
  • Best – Best round trip time
  • Wrst – Worst round trip time
  • StDev – Standard deviation of the latencies to each host