tcpsynbl(8)

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

πŸ¦‹ NAME πŸ¦‹

okay bestie, meet tcpsynbl(8) πŸ’– it's a tool that shows the TCP SYN backlog as a histogram ✨ and it uses BCC/eBPF πŸ”₯ so it's giving low-level main character energy.

πŸ’… SYNOPSIS πŸ’…

tcpsynbl [-4 | -6]

✨ DESCRIPTION ✨

okay so this tool shows you the TCP SYN backlog size at the moment a SYN arrives, and it shows it as a histogram πŸ“Š the way that this helps you see how close your apps are to hitting the backlog limit 😭 and when that happens, SYNs get dropped, which causes performance issues with SYN retransmits. it's basically a measure of workload saturation 🫢 The histogram is measured at the time of SYN received, and you get a separate histogram for each backlog limit 🌈

this works by tracing the tcp_v4_syn_recv_sock() and tcp_v6_syn_recv_sock() kernel functions using dynamic instrumentation 🧚 but ngl, these functions might change in future kernels, so this tool may need maintenance to keep working ⚠️

also, since this uses BPF, only the root user can use this tool πŸ‘‘ no cap.

πŸŽ€ REQUIREMENTS πŸŽ€

you'll need CONFIG_BPF and BCC πŸ’œ

🌸 OPTIONS 🌸

  • -h β€” print the usage message πŸ’Œ
  • -4 β€” trace the IPv4 family only πŸ“
  • -6 β€” trace the IPv6 family only 🌊

πŸ“ EXAMPLES πŸ“

show the TCP SYN backlog as a histogram ✨

# tcpsynbl

trace the IPv4 family only:

# tcpsynbl -4

trace the IPv6 family only:

# tcpsynbl -6

πŸ“Š FIELDS πŸ“Š

  • backlog β€” the backlog size when a SYN was received 🎯
  • count β€” the number of times this backlog size was encountered πŸ”’
  • distribution β€” an ASCII visualization of the count column 🎨

🫧 OVERHEAD 🫧

inbound SYNs should be relatively low compared to packets and other events, so the overhead of this tool is expected to be negligible πŸ’… lowkey the best kind of overhead.

πŸ“š SOURCE πŸ“š

this originated as a bpftrace tool from the book "BPF Performance Tools", published by Addison Wesley (2019) πŸ“– the book is here:

http://www.brendangregg.com/bpf-performance-tools-book.html

see the book for more documentation on this tool πŸ€“

this version lives in the BCC repository:

https://github.com/iovisor/bcc

also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool 🫢

🌈 OS 🌈

Linux 🐧

πŸ§ͺ STABILITY πŸ§ͺ

Unstable - in development. it's still cooking, so don't be shocked if things shift πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg πŸ’œ

πŸ”— SEE ALSO πŸ”—

tcptop(8) πŸ¦‹


bestie, that's the whole page πŸ’– it's from the BCC-era manpages, the source/version line says USER COMMANDS and the date is 2019-07-03 🌸 and the manual is tcpsynbl(8) 🧚 slay forever ✨