tcpsynbl.bt(8)
π tcpsynbl.bt β bestie's guide to the SYN backlog π
okay so real quick: this is a page from section 8 of the System Manager's Manual, and the star of the show is tcpsynbl.bt. she's a bpftrace/eBPF girlie. let's get into it π«Ά
β¨ NAME β¨
tcpsynbl.bt β shows the TCP SYN backlog as a histogram. it uses bpftrace/eBPF, no cap π
πΈ SYNOPSIS πΈ
tcpsynbl
π¦ DESCRIPTION π¦
okay so picture this: this tool shows you the TCP SYN backlog size right when a SYN arrives, and it draws it as a histogram. why do you care?? because it literally lets you see how close your apps are to hitting the backlog limit and just. dropping SYNs. π and dropped SYNs mean SYN retransmits, which means performance issues, which means everyone's sad. it's also a measure of workload saturation, iykyk.
the histogram you see is measured at the time of SYN received, and there's a separate histogram shown for each backlog limit. one per limit, she's thorough π
how does she do it? she traces the tcp_v4_syn_recv_sock() and tcp_v6_syn_recv_sock() kernel functions using dynamic instrumentation. and like... since these functions may change in future kernels, this tool may need maintenance to keep working. so if she breaks on a new kernel, that's why, bestie. not her fault fr fr.
also since this uses BPF, only the root user can use this tool. root only. periodt. π
π REQUIREMENTS π
CONFIG_BPFbpftrace
that's the whole list. iconic, low maintenance β¨
π₯ EXAMPLES π₯
show the TCP SYN backlog as a histogram:
# tcpsynbl.bt
that's it, that's the example. go off π
π 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 thecountcolumn. yes bestie, she draws you a little picture π
β OVERHEAD β
inbound SYNs should be relatively low compared to packets and other events, so the overhead of this tool is expected to be negligible. tiny. micro. basically nothing. obsessed. π§
π SOURCE π
this tool originated from the book "BPF Performance Tools", published by Addison Wesley (2019):
http://www.brendangregg.com/bpf-performance-tools-book.html
see the book for more documentation on this tool π
this version is in the bpftrace repository:
https://github.com/iovisor/bpftrace
also look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool. it's giving bonus content π
π§ OS π§
Linux
π STABILITY π
Unstable β in development.
she's in her WIP era, okay?? handle with care π
π AUTHOR π
Brendan Gregg
π SEE ALSO π
and that's the whole page, bestie!! this was the USER COMMANDS version, dated 2019-07-03, and the manual page you're holding is tcpsynbl.bt(8). go forth and check your backlog before it checks you πβ¨π
π¦ where this page comes from
- debian bookworm: bpftrace 0.17.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms