trace-a-network-path-with-mtr
Use when latency or loss to a host is intermittent, or a connection is slow from one region and fine from another. Run mtr to see per-hop loss and latency over time and separate a real problem hop from ICMP deprioritisation noise.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- trace-a-network-path-with-mtr
- description
- Use when latency or loss to a host is intermittent, or a connection is slow from one region and fine from another. Run mtr to see per-hop loss and latency over time and separate a real problem hop from ICMP deprioritisation noise.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md355 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Trace a network path with mtr
A single traceroute shows one instant; a bad path is about sustained loss and added latency at a specific hop. mtr samples continuously, so you can tell a genuine problem hop from a router that merely deprioritises ICMP replies.
Procedure
- Run mtr in report mode with enough cycles to be meaningful:
mtr -rwzbc 50 api.example.com-rreport,-wwide,-zASN names,-bboth IP and name,-c 50fifty probes. - Read the loss column carefully:
- Loss at a hop and every hop after it down to the destination is a real problem at that hop.
- Loss at one hop that does not continue to the destination is ICMP rate-limiting noise, not loss.
- Compare the
AvgandStdevcolumns; high stdev means jitter, which breaks real-time traffic even without packet loss. - For a specific hop, query it directly to confirm responsiveness:
ping -c 20 10.20.0.1 - Run TCP-mode traces to bypass ICMP deprioritisation and mirror real application traffic:
mtr -T -P 443 -rwc 50 api.example.com - Compare from a second vantage point (another region or a public looking-glass) to localise the
bad hop to one side of the network:
mtr -rwc 50 10.20.0.1 - Record the hop where the latency first steps up — that is the boundary between two networks and usually the place to raise a ticket.
Pitfalls
- Treating a mid-path loss figure as real when the final hop shows no loss: routers rate-limit ICMP.
- A single traceroute with default 3 probes is statistically meaningless; use
-c 50. - ICMP traces can be filtered entirely while TCP to port 443 works fine — always confirm in TCP mode.
- mtr measures one direction; a problem on the return path will not appear.
- DNS resolution per hop (
-zwithout-n) can slow a long trace; use-nwhen you only need IPs. - A satellite or mobile link shows uniformly high latency with no single bad hop — that is physics, not a fault.
- Running mtr in the foreground of a stuck terminal floods output; always use report mode.
Verification
mtr -rwzbc 50 api.example.com
mtr -T -P 443 -rwc 50 api.example.com
Pass means the destination shows no loss and the latency profile is flat, or you can name the exact hop where loss begins and continues. Report: "loss starts at AS64500 hop 10.20.0.1 and persists to destination; TCP-mode matches, ticket raised with that hop."
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.