home / networking / mtr

mtr

3.1k

Network path diagnostic CLI that combines ping and traceroute to measure loss and latency hop by hop.

$brew install mtr
Language
C
Stars
3,149
Category
Networking
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

mtr is a network path diagnostic CLI that continuously probes the route between your machine and a destination host. It combines traceroute-style hop discovery with ping-style latency and loss measurement so you can see where path quality degrades.

What It Enables
  • Inspect packet loss, latency, jitter, and hop-by-hop path behavior while troubleshooting slow or unreliable network routes.
  • Run one-shot reports or emit JSON, CSV, XML, raw, or split output for scripts, logging, incident notes, or post-change verification.
  • Test different probe protocols and path assumptions by choosing ICMP, UDP, TCP, or SCTP plus interface, source address, TTL, MPLS, and AS lookup options.
Agent Fit
  • Report mode and structured output give agents a workable inspect surface for path diagnostics, especially when they need per-hop numbers rather than a simple reachability answer.
  • JSON support is real, but it depends on builds that include Jansson, and the default experience is still a live curses UI rather than a pure batch-first command.
  • Best for network investigation and verification loops; it observes path health but does not remediate the network state it uncovers.
Caveats
  • Raw packet access requires capabilities, root, or a setuid helper, so permissions and local security policy can block or complicate automation.
  • Because mtr actively sends repeated probes, it is better for targeted diagnostics than for broad unattended monitoring against many destinations.