Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

mtr

$ mtr Community Low Risk
BitWizard · Browser & Web · GPL-2.0 · macos / linux

mtr 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.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
brew install mtr
CLI vs MCP Decision CLI Only

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

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

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> -j finite JSON reports
  • Default invocation opens an interactive TUI
Trust & Safety 19 / 25

Read-only ICMP/TCP/UDP path probes, though macOS and unconfigured Linux hosts require sudo for raw sockets.

  • Read-only network probes; often needs sudo on macOS
Setup & Portability 12 / 15

Standard package on Linux and macOS (brew install mtr), though macOS raw socket permissions require sudo.

  • Widely available via brew and Linux repos (mtr-tiny)
Utility & Efficiency 13 / 15

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
Maintenance & Lineage 8 / 10

Established Unix diagnostic tool (traviscross/mtr) under GPL-2.0.

  • Long-lived traviscross/mtr repository
Docs & Verifiability 8 / 10

Standard mtr(8) man page and mtr --help covering report and JSON flags.

  • Man page and mtr --help output

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; uses raw ICMP/UDP/TCP sockets (often requires sudo on macOS).

Side Effects
Read-Only
Cost & Quotas

Free, GPL-2.0 open-source C diagnostic utility.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Run finite hop latency report as JSON
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).

Print wide TCP probe table report
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 -j JSON, -C CSV, and -x XML outputs in finite -r -c report mode.
  • + Diagnoses intermediate hop packet loss and jitter far better than plain ping or traceroute.

Caveats & Pitfalls

  • ! Omitting -r launches an interactive TUI that blocks headless shells.
  • ! Typically requires sudo on macOS due to raw socket restrictions.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI