~2 min read • Updated Jul 20, 2025
1. What Is mtr?
mtr (My Traceroute) is an interactive network diagnostic tool that merges the capabilities of ping and traceroute. It monitors the path to a given host and provides live statistics on response times and packet loss for each hop.
2. Installing mtr on Linux
Use your package manager based on the distribution:
sudo apt install mtr # Ubuntu / Debian
sudo yum install mtr # CentOS / RHEL
sudo pacman -S mtr # Arch Linux3. Basic Usage
To trace a host interactively:
mtr google.com
To use ICMP echo (like ping):
mtr -e google.com4. Understanding mtr Output
- Host: IP or name of each hop
- Loss%: Percentage of packet loss
- Last / Avg / Best / Worst: Response time (ms)
- StDev: Standard deviation
Host Loss% Snt Last Avg Best Wrst StDev
192.168.1.1 0% 10 1.1 1.2 1.1 1.3 0.1
10.0.0.1 0% 10 3.4 3.3 3.1 3.5 0.2
...
5. Key mtr Options
| Option | Description | Example |
|---|---|---|
| -n | Don't resolve hostnames | |
| -r | Run in report mode | |
| -c NUM | Number of ping cycles | |
| -e | Use ICMP echo packets | |
| -b | Show both hostnames and IPs | |
| -o | Customize displayed columns | |
6. Saving mtr Output
Store results in a text file for analysis:
mtr -r -c 15 google.com > mtr_report.txt7. Comparison with ping and traceroute
| Feature | ping | traceroute | mtr |
|---|---|---|---|
| Path discovery | ❌ | ✅ | ✅ |
| Interactive display | ❌ | ❌ | ✅ |
| Packet loss analysis | ✅ | ❌ | ✅ |
| Protocols | ICMP | UDP / ICMP | UDP / ICMP |
8. Security and Limitations
- Some hops may block ICMP or UDP packets
- Root permissions may be needed for
Written & researched by Dr. Shahin Siami