How to Use MTR on Linux: Installation, Examples, and Use Cases

MTR, or “My Traceroute”, is a diagnostic tool for Linux, helping users identify connectivity issues throughout the remote host and server. MTR measures lost packets, response time, and latency with extreme precision and accuracy. This provides Linux users with a clear view of where most networking problems originate, helping them manage their servers.
At ServerMania, we deploy high-performance Linux dedicated servers every day, and network reliability is paramount. That’s why this quick guide covers everything from how MTR works to how to install it on your Linux server, how to use it efficiently, and how to understand the output.
Let’s start with the most important…
What Is MTR?
My Traceroute or “MTR”, is a command-line tool. It is available for most Linux distributions and traces network routes between your server and the specified destination. As it is tracing routes, it continuously measures the response time and latency.
MTR sends repeated probes to each hot and updates in real time. This really helps users see how stable and responsive each network segment is.
MTR combines the core functions of ping and traceroute into one utility:
- From traceroute, it maps the path a traffic follows across routers.
- From ping, it measures the latency and packet loss along the way.
The result is a detailed view of network performance across every hop. When you manage a dedicated Linux server, this level of visibility helps you pinpoint issues, congestion, or any loss.
How MTR Works
MTR maps the network path between your server and a target host by sending probe packets with increasing Time To Live values. Each router along the path reduces the TTL by one. When the TTL reaches zero, that router replies. Therefore, when MTR increases the TTL, it can easily check and identify each and every hop to its destination.
The primary difference between MTR and traceroute is that MTR doesn’t stop after finding the entire path. It keeps going and sending probes to each hop so it can collect the data over time. This is what sets it apart and allows users to detect packets lost, latency spikes, and instability.
Here are some of the core mechanisms of MTR:
| Component: | Purpose: | Impact: |
| TTL Incrementing | Sends packets with gradually increasing TTL values | Identifies each router in the network path. |
| Continuous Probing | It keeps sending probes even after reaching the destination. | MTR easily detects all the intermittent issues. |
| Latency Measurement | Records the response time for each packet with precision. | Shows the delay per hop with precision. |
| Packet Loss Tracking | MTR calculates the percentage of lost probes. | Identifies potential unstable network links. |
| Statistical Averaging | Computes avg, best, worst, and standard deviation. | Fully exposes potential jitter and lga spikes. |
| Protocol Options | MTR fully supports ICMP, TCP, and UDP modes. | It can test and trace real application traffic paths. |
All these systems working together allow MTR to identify and narrow down specific networking issues in a matter of seconds.
See Also: How to Automate Server Scripts on Linux Servers
MTR Protocol Behavior
By default, MTR utilizes the ICMP echo requests. This protocol is ideal for general connectivity testing. However, if ICMP traffic is filtered or deprioritized, you can easily switch to TCP mode.
Here’s a quick example:
- Testing port 443 shows the HTTPS path performance
- Testing port 3306 shows database path performance
This flexibility allows you to measure the same protocol your application uses. Therefore, when troubleshooting production workloads on a Linux dedicated server, protocol-specific testing will give you more accurate results.
See Also: How to Find Files on Linux with Find and Locate
Installing MTR on Linux

Most Linux distributions include MTR in their default package repositories. This means that MTR comes pre-installed. However, if not, the installation takes less than a minute using the system’s package manager. You would need complete root or sudo privileges to complete the installation.
Here’s how the installation goes on different Linux distributions:
Ubuntu and Debian:
On Ubuntu or Debian-based systems, update your package index and install MTR with:
sudo apt update
sudo apt install mtrThis installs the standard ICMP version of MTR.
CentOS, AlmaLinux, Rocky Linux:
On RHEL-based distributions such as CentOS, AlmaLinux, or Rocky Linux, use:
sudo yum install mtrOn newer releases that use DNF:
sudo dnf install mtrNote: If the package is not found, enable the EPEL repository first.
Arch Linux:
On Arch Linux, install MTR with:
sudo pacman -S mtrThe package installs immediately from the official repositories.
Verify Installation
When you’re ready with the installation, don’t forget to verify whether the tool has been installed properly on your system by running the following command:
mtr --versionIf the command returns a version number, the installation has been successful, and you will be ready to begin network diagnostics. In case you don’t see the version number, please ensure that you have root and sudo privileges and go through the installation again.
See Also: How to Rename a Directory in Linux: Command Guide with Examples
Types of MTR Modes: Basic Usage
Once installed, MTR is simple to run from the command line. You choose between real-time monitoring and generating a summarized report. The mode you use depends on whether you want live feedback or structured output for analysis.
Interactive Mode
The interactive mode displays live results that update continuously. This is useful when you want to watch latency and packet loss change in real time.
Quick Example: mtr servermania.com
This command begins tracing the route to servermania.com and refreshes the statistics every second. You see each hop, along with packet loss percentage, average latency, and response time variation. Press q to exit.
Note: Use interactive mode when you are actively diagnosing instability or testing changes as they happen.
Report Mode
Report mode runs for a fixed number of probe cycles and then outputs a summary. This is ideal for saving results or sharing them with a support team.
Quick Example: mtr –report servermania.com
By default, this will send only 10 packets to each hop and print a final report. If you need more accurate data, increase the cycle count:
mtr --report --report-cycles 100 servermania.comNote: Higher cycle counts provide more reliable averages and expose intermittent packet loss more clearly.
Understanding MTR Output
MTR outputs a summary (statistical) for each and every hop between your source, in your case Linux server, and the destination. To understand each value from the output, we’ve designed a table where each column represents a different metric.
We’ve included packet loss, latency spikes, routing instability, and more!
| Metric: | Meaning: | Potential Issues: |
| Host | The hostname or the IP address of each hop. | Unexpected private IPs or unknown transit providers. |
| Loss% | A percentage of packets that were lost at that hop. | A consistent loss that continues to deploy more and more hops. |
| Snt | The number of packets that have been sent. | Low counts mean potential delays in the previous hops. |
| Last | The response time of the most recent probe. | Sudden spikes compared to the average response time. |
| Avg | An average latency across all the MTR probes. | A gradual increase/decrease across hops is normal. |
| Best | The fastest recorded response time that was measured. | A large gap between the best and avarage shows instability. |
| Wrst | The slowest recorded response time that was measured. | Large spikes indicate high network congestion. |
| StDev | A standard deviation of the latency that has been recorded. | High values indicate jitter or unstable routing. |
When packet loss appears at one hop but not at the next, the issue is often ICMP rate limiting. When loss begins at a hop and continues through all following hops, the problem likely starts at that point in the route.
See Also: How to Unzip Files in Linux
Saving and Sharing MTR Reports
When using MTR and troubleshooting on servers in production, the terminal output might not be enough to solve each case. You will need a bit more structured data when you’re dealing with a larger network pool to help you review the findings better.
MTR allows you to generate reports and save them locally so they can be sent to the support team for analytics and documentation. Here’s how it goes:
Output to a Text File
The simplest method is redirecting report output to a file:
mtr --report --report-cycles 100 example.com > lagreport.txtNote: This command will run 100 probe cycles and save the full summary to lagreport.txt.
Generate JSON Output
If you need more structured information for automation purposes:
mtr --report --json example.com > mtr-report.jsonNote: This format allows deeper analysis without manual interpretation.
An App-Specific Testing
If your workload depends on a specific port, combine report mode with TCP:
mtr --tcp --port 443 --report --report-cycles 100 example.com > https-path.txtThis tests the HTTPS route directly. Hence, for the database connectivity test, use port 3306. For custom services, test the relevant port. This will ensure the report reflects real application traffic instead of basic ICMP responses.
When to Use MTR
Use MTR when performance issues affect real traffic, not only basic reachability. It helps you identify where latency increases or packet loss begins along a network path. Run it during active incidents, not days later when conditions have changed.
Gaming Servers
Online games depend on low latency and stable routing. Even 1% to 2% packet loss causes rubber banding and disconnects. Use MTR to identify whether lag originates inside your data center, at an upstream provider, or near the player’s ISP.
Communications
Voice traffic breaks quickly under packet loss or jitter. High standard deviation values indicate unstable latency, which leads to call distortion. So, MTR helps you trace where voice quality degrades along the path.
SaaS Platforms
APIs and web applications rely on consistent response times. A sudden 80 to 100 ms latency jump between two hops often signals congestion. MTR reveals whether the slowdown occurs within your hosting environment or across a transit provider.
Financial Trading
Trading platforms require predictable execution times and low latency. Small latency variations affect order timing, which can cause great financial difficulties. Use MTR to verify route stability between your server and exchange endpoints to find the cause.
Media Streaming
Video streaming requires steady throughput to prevent lag at the destination. Packet loss forces buffering and quality drops, which affect user experience. MTR can highlight unstable hops that interrupt media delivery performance, allowing you to identify them.
That’s not everything, of course. There are many more MTR applications, but the ones we have reviewed are among the most common uses.
See Also: How to Check Disk Space and Usage in Linux
MTR vs. Ping vs. Traceroute
Ping, traceroute, and MTR all test network connectivity, but they solve distinct problems. So, choosing the right tool depends on whether you need reachability, path visibility, or analysis.
To help you understand the differences, here’s a side-by-side comparison:
| Feature: | Ping: | Traceroute: | MTR: |
| Main Purpose | Test reachability and basic latency. | Map the network path. | Analyze path and performance over time. |
| Network Hops | No | Yes | Yes |
| Packet Loss | Limited, end host only. | No | Yes, per hop. |
| Latency Tests | Yes, end host only. | Yes, one response per hop. | Yes, averages per hop. |
| Ongoing Testing | Yes | No | Yes |
| Best Use Case | Confirm the server responds. | Identify the routing path. | Diagnose packet loss and instability. |
In short:
- Ping shows whether your destination is reachable.
- Traceroute shows where exactly the traffic travels.
- MTR shows where the performance breaks down.
The bottom line is that different needs require different tools. We recommend having all three installed, ready to be fired up at any moment.
See Also: How to Perform a Trace Route in Linux
Need Help Troubleshooting?
If you’re looking for a Linux system with all the tools and optimizations a business requires, here at ServerMania, we offer high-performance Linux dedicated servers. Our resources experts will help you along the way, and our resources will teach you how to optimize your server effectively.
If you’re not sure where to start, get in touch with ServerMania’s 24/7 customer support or feel free to book a free consultation with a Linux expert.
💬 Our experts are available right now!
Was this page helpful?
