pidpersec.bt(8)
πΈ pidpersec.bt β the manual page, but make it cute (8) πΈ
okay bestie, welcome to pidpersec.bt from the System Manager's Manual section of your life π it lives in section 8, it's a bpftrace/eBPF situation, and it's genuinely so useful. let's get into it.
β¨ NAME β¨
pidpersec.bt β counts new processes (via fork()). uses bpftrace/eBPF. that's the whole vibe. π
β¨ SYNOPSIS β¨
pidpersec.bt
yeah that's it. no flags, no arguments, no drama. she just runs. π
β¨ DESCRIPTION β¨
so pidpersec shows you how many new processes got created each second. that's it, that's the girl. π
why do you care? because bestie, there can be performance issues caused by a ton of short-lived processes β and those little guys are basically invisible to sampling tools like top(1). they spawn, they die, they never get sampled. pidpersec gives you one way to actually investigate that behavior. π΅οΈββοΈ
how does she do it? she works by tracing the tracepoint:sched:sched_process_fork tracepoint. iconic. β
β οΈ since this uses BPF, only the root user can use this tool. like, actually only root. no cap.
β¨ REQUIREMENTS β¨
CONFIG_BPFπ«Άbpftraceπ¦
β¨ EXAMPLES β¨
count new processes, printing per-second summaries until you hit Ctrl-C:
# pidpersec.bt
just like that. live your life, then Ctrl-C when you're done. π
β¨ FIELDS β¨
- 1st β count of processes (it shows up after the
@)
β¨ OVERHEAD β¨
she traces kernel forks and keeps an in-kernel count that gets read asynchronously from user-space. and since the rate of this is generally expected to be low (<< 1000/s), the overhead is also expected to be negligible. so like, go off, it's fine. π
β¨ SOURCE β¨
this one is from bpftrace. π
https://github.com/iovisor/bpftrace
also, go look in the bpftrace distribution for a companion _examples.txt file β it's got example usage, output, and commentary for this tool. it's giving bonus content fr fr. π
this is a bpftrace version of the bcc tool of the same name. heads up though: the bcc tool may provide more options and customizations. π
https://github.com/iovisor/bcc
β¨ OS β¨
Linux π§
β¨ STABILITY β¨
Unstable - in development. π she's still growing, be nice to her.
β¨ AUTHOR β¨
Brendan Gregg π the icon, the legend, the moment.
β¨ SEE ALSO β¨
top(1)π
and that's the whole page, bestie π this was the USER COMMANDS manual, dated 2018-09-06, for pidpersec.bt(8) β mwah, go count some forks β¨ππ¦
π¦ 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