Linux - MTR (Real-Time Traceroute + Ping)
What is MTR?
MTR (My Traceroute) is a network diagnostic tool that combines:
-
Ping (latency & packet loss)
-
Traceroute (path/hops)
into a single, real-time, continuously updating tool.
It shows:
-
All routers between you and a destination
-
Latency at each hop
-
Packet loss percentage
-
Real-time network fluctuation
How to install MTR
Debian/Ubuntu
CentOS/RHEL
Mac (Homebrew)
How to use MTR
Basic usage
This opens a live, updating interface showing hops, latency, and packet loss.
Run MTR in report mode (useful for logs or support teams)
-
-r→ report mode -
-c 10→ send 10 pings to each hop
Use ICMP instead of UDP (more accurate on many networks)
Use TCP mode (useful when ICMP/UDP is blocked)
How to read an MTR output
Example:
Key indicators
| Column | Meaning |
|---|---|
| Loss% | Packet loss at each hop |
| Avg | Average latency to that hop |
| Wrst | Worst latency (spikes) |
| StDev | Stability of ping times |
How to analyze
-
Packet loss at first hop → your router is the issue
-
Packet loss in the middle hops → ISP routing issue
-
High latency only at last hop → destination server is slow
-
Loss at an intermediate hop but not the last hop
→ ignore it (router deprioritizes ICMP but passes traffic normally)
Why MTR is better than ping or traceroute alone
| Feature | ping | traceroute | mtr |
|---|---|---|---|
| Latency | ✔ | ✔ | ✔ (live) |
| Packet loss | ✔ | Limited | ✔ (per hop) |
| Shows path | ✖ | ✔ | ✔ |
| Real-time updates | ✖ | ✖ | ✔ |
| Best for diagnosing | Basic issues | Routing issues | Everything |
Network engineers prefer MTR because it gives a full picture in seconds.