Using Traceroute to Debug Slowness and Downtime

By: Morpheus Data

When your web site or app is down or running particularly slowly, it sometimes helps to know if there is a bottleneck along the path from your device to the server where the site or app resides. This can be done pretty quickly on many operating systems, such as Linux and Windows, using the traceroute command from a terminal console on the operating system.

What does traceroute do?

The traceroute command can be run on a source device such as a computer or a host.  Once run, traceroute will send IP (Internet Protocol) packets toward the specified destination host. These packets will contain TTL (Time To Live) values. These start at 1 and increment up, unless a router in the path decrements it.

When a route in the path finds that the TTL value in the packet is 1, it will send a response with a “time exceeded” message. If traceroute receives a “time exceeded” message, it knows that this router is in the middle of the path to the destination host, and thus this router is passed through as a “hop” on the way to the specified destination.

The goal is to eventually find a router that continues to increment the TTL value, which will finally result in an attempt to access an invalid port on the destination host. When this happens, traceroute will receive “port unreachable” messages, which indicate that the destination has been reached.

As traceroute moves along each hop, it records the address of each router and the time it took to traverse the hop.  If one of these hops is really slow or fails to respond, you can determine that the bottleneck is located at the slow or down hop, which means the destination host is most likely operating as expected. This can be helpful in determining how you need to respond to such an incident, as there may actually be no problems with your site or app directly.

How to use traceroute

The command can vary between operating systems, so you may need to check your OS to be sure what command to type. For example, Linux systems use traceroute, while Windows uses a shorter version, tracert.

To use the command, you simply open a terminal in the operating system you are using, such as a Windows Command Window. Once open, you type the traceroute command followed by the address of the host you are trying to reach. The command will then go through each hop, displaying the key host address and amount of time taken as it goes through each hop.

As an example, here is an example of what this might look like if the command is run on a Windows system:


Tracing route to [] over a maximum of 30 hops:

1   324 ms     3 ms     3 ms
2    54 ms    43 ms    35 ms
3    67 ms    39 ms    36 ms
4    66 ms    40 ms     *
5    77 ms    33 ms    33 ms
6    81 ms    26 ms    40 ms
7    83 ms    28 ms    48 ms []
8    67 ms    35 ms    40 ms []
9   102 ms    46 ms    56 ms []
10    84 ms    59 ms     * []
11    51 ms    55 ms    62 ms []
12    72 ms    39 ms    61 ms []
13    81 ms    59 ms    60 ms []
14   103 ms    59 ms    58 ms []

Trace complete.

Monitoring with Morpheus

Do you want to be notified when your site or app is having issues? If you are looking for a monitoring system with excellent data logging and analysis reports, you should give Morpheus a try. With Morpheus, data logging is automatic as you provision servers and apps. Using the available tools, you can monitor the various parts of your system to keep track of uptime, response time, and to be alerted if an issue does arise.

The Morpheus interface is clean and easy to use. Source: Morpheus.

Morpheus allows you to provision apps in a single click, and provides ease of use for developers with APIs and a CLI. In addition, backups are also automatic, and you can have redundancy as needed to avoid potentially long waits for disaster recovery to take place. So, why not register an account or try out Morpheus for free today?