tcpsynbl.bt(8)

πŸ“¦
version 0.27.0 Β· 3 versions
  • 0.27.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.14.0 Β· ubuntu jammy
  • 0.20.2 Β· ubuntu noble
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ tcpsynbl.bt(8) β€” the TCP SYN backlog histogram ✨

okay bestie, welcome to tcpsynbl.bt πŸ’– this is a manual-page tool for showing the TCP SYN backlog as a histogram. it uses bpftrace/eBPF, so it's giving low-level and very, very cool 🧚

🌸 NAME

tcpsynbl.bt β€” Show the TCP SYN backlog as a histogram. Uses bpftrace/eBPF.

πŸŽ€ SYNOPSIS

tcpsynbl

πŸ’… DESCRIPTION

okay so this tool shows the TCP SYN backlog size during SYN arrival as a histogram πŸ“Š it lets you see how close your applications are to hitting the backlog limit and dropping SYNs 😭 which causes performance issues with SYN retransmits. it's basically a measure of workload saturation, so it's a huge vibe check for your servers πŸ”₯ the histogram is measured at the time of SYN received, and there's 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 may change in future kernels, so this tool may need maintenance to keep working πŸ’€

since this uses BPF, only the root user can use this tool. no cap, that's a hard rule πŸ”

🫢 REQUIREMENTS

CONFIG_BPF and bpftrace. that's the whole list, bestie 🌈

πŸ“ EXAMPLES

show the TCP SYN backlog as a histogram.

# tcpsynbl.bt

🧚 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. iykyk πŸ“ˆ

πŸŒ™ OVERHEAD

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

πŸ’– 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, obviously πŸ™ˆ

this version is in the bpftrace repository:

https://github.com/bpftrace/bpftrace

also look in the bpftrace distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool πŸŽ€

🌈 OS

Linux 🐧

⭐ STABILITY

Unstable - in development. still cooking, so be gentle 🫠

πŸ‘‘ AUTHOR

Brendan Gregg πŸ’…

πŸ¦‹ SEE ALSO

tcptop(8)


tcpsynbl.bt(8) was sourced from the USER COMMANDS section of the 2019-07-03 page, so go forth and histogram responsibly, bestie πŸ’–βœ¨