mtr
$ mtr Community Low Riskmtr combines traceroute and ping into a single network path and packet-loss diagnostic tool. While bare mtr opens an interactive curses TUI, passing -r -c <N> -j (--report --report-cycles --json) outputs finite, machine-readable hop-by-hop latency and loss statistics.
brew install mtr Measures per-hop RTT and packet loss directly from the host network stack (mtr -r -c 10 -j); MCP servers cannot probe network paths locally.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports -r report mode, bounded -c cycles, and -j/--json structured output, though bare mtr defaults to a blocking curses UI.
- Supports
-r -c <N> -jfinite JSON reports - Default invocation opens an interactive TUI
Read-only ICMP/TCP/UDP path probes, though macOS and unconfigured Linux hosts require sudo for raw sockets.
- Read-only network probes; often needs
sudoon macOS
Standard package on Linux and macOS (brew install mtr), though macOS raw socket permissions require sudo.
- Widely available via
brewand Linux repos (mtr-tiny)
Pinpoints exactly which intermediate hop drops packets or spikes jitter with ASN (-z) and min/avg/max/stdev stats.
- Combines continuous ping statistics with hop-by-hop traceroute
Established Unix diagnostic tool (traviscross/mtr) under GPL-2.0.
- Long-lived
traviscross/mtrrepository
Standard mtr(8) man page and mtr --help covering report and JSON flags.
- Man page and
mtr --helpoutput
Security, Auth & Guardrails
No credentials required; uses raw ICMP/UDP/TCP sockets (often requires sudo on macOS).
Free, GPL-2.0 open-source C diagnostic utility.
# mtr Agent Rules - ALWAYS pass `-r -c <N>` (e.g. `-r -n -c 10 -j`); running bare `mtr` launches an infinite interactive TUI. - On macOS, `mtr` requires `sudo` for raw socket access unless setuid is configured; prefer `trip -u` when unprivileged probing is needed.
Agent-Ready Command Recipes
Safe Read-Only Queries
mtr -r -n -c 10 -j example.com
Sends 10 probe cycles (-c 10) without DNS lookups (-n) in report mode (-r) and emits JSON (-j).
mtr -rwzbc 20 -T -P 443 example.com
Probes TCP port 443 (-T -P 443) for 20 cycles with ASN lookup (-z) and IP/host display (-b).
Strengths for Agents
- + Supports
-jJSON,-CCSV, and-xXML outputs in finite-r -creport mode. - + Diagnoses intermediate hop packet loss and jitter far better than plain
pingortraceroute.
Caveats & Pitfalls
- ! Omitting
-rlaunches an interactive TUI that blocks headless shells. - ! Typically requires
sudoon macOS due to raw socket restrictions.