killsnoop.bt(8)
β¨ killsnoop.bt β the manual page, but make it cute β¨
okay bestie, pull up a chair, we're reading the killsnoop.bt page from the System Manager's Manual together and it's gonna be a whole vibe π
πΈ NAME πΈ
killsnoop.bt β this lil icon traces signals issued by the kill(), tkill(), tgkill() syscall. and yes, it uses bpftrace/eBPF, no cap π₯
π SYNOPSIS π
killsnoop.bt
that's it. that's the whole thing. she's low maintenance π
π¦ DESCRIPTION π¦
so killsnoop traces the kill(), tkill(), tgkill() syscall, so you can actually see the signals getting sent this way. ngl this is lowkey perfect for troubleshooting failing applications when some unknown mechanism is out there sending signals and you're like "who?? who did this??" π
the way it works: it traces the kill(), tkill(), tgkill() syscall tracepoints. tracing, but make it β¨telepathicβ¨
since this uses BPF, only the root user can use this tool. root only, bestie. no sneaking in π
π REQUIREMENTS π
CONFIG_BPFbpftrace
both. you need both. that's the vibe check π
β EXAMPLES β
trace all the kill(), tkill(), tgkill() syscalls, every single one, main character energy:
# killsnoop.bt
π FIELDS π
here's what each column is giving, one by one, no skipping π«Ά
TIMEβ time of the kill call. when it happened β°PIDβ source process IDCOMMβ source process nameSIGβ signal number or name. seesignal(7)TPIDβ target process IDRESULTβ the result.0== success, and a negative value (of the error code) for failure. so if it's negative, something said no π
π OVERHEAD π
this traces the kernel kill function and prints output for every single event. and because the rate of this is generally expected to be low (< 100/s), the overhead is also expected to be negligible. obsessed with a low-overhead tool honestly π
but listen β if you have an application that is calling a very high rate of kill()|tkill()|tgkill()s for some reason, then test and understand overhead before use. fr fr. test first, then send it. not the other way around π
π§ SOURCE π§
this is from bpftrace.
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. it's giving bonus content, we love her π
this is a bpftrace version of the bcc tool of the same name. the bcc tool may provide more options and customizations, iykyk π
https://github.com/iovisor/bcc
πΈ OS πΈ
Linux. (obviously, she's a kernel tool π )
β οΈ STABILITY β οΈ
Unstable β in development. she's still growing, be gentle π
π AUTHOR π
Brendan Gregg, Rong Tao. absolute legends, we thank them for their service π«Ά
π SEE ALSO π
okay that's the whole page, you ate that π½οΈβ¨
this beauty lives under USER COMMANDS, and she was dated 2018-09-07. go forth and trace some signals, bestie ππ¦π
π¦ where this page comes from
- alpine 3.24: bpftrace-tools-doc 0.26.1-r0 Β· Apache-2.0
- arch rolling: bpftrace 0.27.0-2 Β· Apache-2.0
- centos-stream 10: bpftrace 0.26.1-1.el10 Β· Apache-2.0
- centos-stream 9: bpftrace 0.26.1-1.el9 Β· ASL 2.0
- nixos 26.05: bpftrace 0.25.1
- nixpkgs unstable: bpftrace 0.27.1
- ubuntu resolute: bpftrace 0.25.0-1ubuntu1 Β· Apache-2.0
- ubuntu stonking: bpftrace 0.25.0-1ubuntu2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms