LightAtom

mtr Command: Traceroute and Ping in One

mtr combines traceroute and ping: it keeps probing every hop and shows loss and latency over time, which makes intermittent problems visible.

brew install mtr

Install mtr with Homebrew (it isn't built into macOS).

intermediate10 minNeeds: Homebrew, Administrator password

When to use it

Use mtr when a connection is unreliable rather than dead: calls that break up, games that lag in spikes. A single traceroute only samples each hop three times; mtr shows which hop starts losing packets over a few minutes.

Steps

  1. Install it

    macOS doesn't ship mtr. Install it with Homebrew.
    brew install mtr
  2. Run it interactively

    mtr needs raw sockets, so run it with sudo. The screen updates continuously; press q to quit.
    sudo mtr apple.com
  3. Produce a report

    -r report mode, -w wide (full host names), -c number of probes.
    sudo mtr -rwc 100 1.1.1.1
  4. Share the result

    Copy the report into a support ticket; ISPs know how to read mtr output.

Output explained

HOST: mac                     Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.1.1            0.0%    50    2.1   2.4   1.8   6.2   0.7
  2.|-- 100.74.95.254          0.0%    50    9.8  10.6   6.0  31.2   4.1
  3.|-- 10.238.55.45          12.0%    50   11.0  12.2   9.1  20.4   2.3
  4.|-- 10.238.55.46           0.0%    50   13.1  12.9  10.2  18.8   1.9
  5.|-- 1.1.1.1                0.0%    50   14.0  14.3  12.0  19.1   1.5
  • Loss% per hop. Loss at one hop that doesn't continue to later hops (hop 3 here) is just that router rate-limiting replies: not a real problem.
  • Loss that starts at a hop and continues to the destination is real packet loss on that link.
  • Avg / Best / Wrst are latencies; a large StDev means jitter.

Options and variations

FlagMeaningExample
-rReport mode: run, then print a summarysudo mtr -r apple.com
-c NProbes per hopsudo mtr -rc 200 apple.com
-wWide report with full host namessudo mtr -rw apple.com
-nNo name lookupssudo mtr -n apple.com
-T -P PORTTCP probes to a portsudo mtr -T -P 443 apple.com

Common errors

ErrorCauseFix
mtr: Failure to open IPv4 sockets: Operation not permittedRun without rootUse sudo mtr.
command not found: mtrNot installed or Homebrew's bin not in PATHbrew install mtr; on Apple silicon Homebrew's sbin is /opt/homebrew/sbin.

Do it in the app

LightAtom's traceroute shows each hop on a world map with its router name and round-trip times, a visual complement to mtr's statistics.

Frequently asked questions

What is mtr?

My Traceroute: a tool that combines traceroute and ping, probing every hop continuously and reporting loss and latency statistics per hop.

How do I install mtr on a Mac?

With Homebrew: brew install mtr. Run it with sudo, because it needs raw sockets for its probes.

How do I read packet loss in mtr?

Only loss that continues through to the final hop matters. Loss at a middle hop that disappears in the next hops is that router deprioritising replies to probes.

LightAtom team

The people who build LightAtom, a network monitor for macOS.