tcprtt(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

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 as HH: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 πŸ’…πŸŒΈπŸ¦‹