tcprtt(8)
Welcome to the System Manager's Manual page for tcprtt(8) πβ¨
πΈ NAME πΈ
okay so tcprtt is the tool that traces the RTT (round-trip time) of TCP connections that are already established π¦ It's built on Linux eBPF/bcc, so it's giving low-level and I'm obsessed π₯
π§ SYNOPSIS π§
tcprtt [-h] [-T] [-D] [-m] [-p LPORT] [-P RPORT] [-a LADDR] [-A RADDR]
[-i INTERVAL] [-d DURATION] [-b] [-B] [-e] [-4 | -6]
π DESCRIPTION π
bestie, this tool watches the RTT of established connections so you can figure out how healthy the network is π«Ά It's super useful for troubleshooting, because it helps you tell whether the latency is coming from a user process or from the physical network. Main character energy π
Since this uses BPF, only the root user can use this tool. Not you, not me, only root π
π REQUIREMENTS π
You need CONFIG_BPF and bcc. No cap, those are the must-haves π
β¨ OPTIONS β¨
-hβ Prints the usage message π-Tβ Adds a time column to the output, formatted asHH:MM:SSβ°-Dβ Shows debug information for the bpf text π-mβ Outputs the histogram in milliseconds π-i INTERVALβ Prints output every INTERVAL seconds β¨-d DURATIONβ The total duration of the trace, in seconds β-p LPORTβ Filters for a local port π¦-P RPORTβ Filters for a remote port π¦-a LADDRβ Filters for a local address π-A RADDRβ Filters for a remote address π-bβ Shows the sockets histogram by local address π«Ά-Bβ Shows the sockets histogram by remote address π«Ά-eβ Shows the extension summary, as an average π₯-4β Traces the IPv4 family only π-6β Traces the IPv6 family only π
π EXAMPLES π
Trace TCP RTT and print 1 second summaries, 10 times:
# tcprtt -i 1 -d 10
Summarize in milliseconds, with timestamps:
# tcprtt -m -T
Only trace TCP RTT for remote address 192.168.1.100 and remote port 80:
# tcprtt -i 1 -d 10 -A 192.168.1.100 -P 80
Trace a local port and show a breakdown of remote hosts' RTT:
# tcprtt -i 3 --lport 80 --byraddr
Trace IPv4 family only:
# tcprtt -4
Trace IPv6 family only:
# tcprtt -6
π₯ OVERHEAD π₯
This traces the kernel tcp_rcv_established function and collects TCP RTT. The rate depends on your server application π If it's a web or proxy server accepting many tens of thousands of connections per second, the overhead is going to be real.
π SOURCE π
This is from bcc π¦
https://github.com/iovisor/bcc
Also look in the bcc distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, and it's honestly such a good read ππ
π OS π
Linux π§
π«§ STABILITY π«§
Unstable, it's still in development π
π AUTHOR π
zhenwei pi, the queen behind this one β¨
πΈ SEE ALSO πΈ
tcptracer(8), tcpconnect(8), funccount(8), tcpdump(8) π
Okay bestie, that's the whole page! π It's from the USER COMMANDS section, dated 2020-08-23, and it's all about tcprtt(8). Go slay your network debugging π
πΈπ¦
π¦ where this page comes from
- alpine 3.24: bcc-doc 0.36.1-r1 Β· Apache-2.0
- nixpkgs unstable: bcc 0.37.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: bcc-tools 0.35.0-160000.2.2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms