pidpersec.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

✨ pidpersec.bt(8) ✨ πŸ’– this is the manual page for pidpersec.bt, the tool that gives you the full scoop on your system's process births 🍼

✨ NAME ✨

okay so pidpersec.bt is the tool that counts new processes (via fork()) πŸ“Š and it runs on bpftrace/eBPF πŸ”₯

πŸ’… SYNOPSIS πŸ’…

pidpersec.bt

πŸ“– DESCRIPTION πŸ“–

bestie, pidpersec tells you how many brand new processes got spun up every single second πŸ¦‹ here's the tea: lots of short-lived processes can cause performance problems, and they can totally hide from sampling tools like top(1) πŸ™ˆ pidpersec is one way to actually catch them in the act πŸ•΅οΈβ€β™€οΈ

this works by tracing the tracepoint:sched:sched_process_fork tracepoint ✨

and bc this runs on BPF, only the root user can use this tool πŸ‘‘ no cap, you need to be root 🫢

πŸŽ€ REQUIREMENTS πŸŽ€

you need CONFIG_BPF and bpftrace in your corner πŸ’œ

🧚 EXAMPLES 🧚

here's how you count new processes, getting per-second summaries until you hit Ctrl-C 🌸

# pidpersec.bt

πŸ“ FIELDS πŸ“

  • 1st β€” the count of processes (the bit after "@") πŸ’…

🌈 OVERHEAD 🌈

so this traces kernel forks and keeps an in-kernel count, which user-space reads asynchronously 🫧 the rate is usually expected to be pretty low (<< 1000/s), so the overhead should be negligible 😌 slay

πŸ”₯ SOURCE πŸ”₯

this comes straight from bpftrace πŸ’–

https://github.com/bpftrace/bpftrace

also, look in the bpftrace distribution for a companion _examples.txt file πŸ“‚ it has example usage, output, and commentary for this tool, iykyk πŸ€“

this is the bpftrace version of the bcc tool with the same name ✨ the bcc tool might give you more options and customizations, so check it out if you want more control πŸ’œ

https://github.com/iovisor/bcc

πŸ¦‹ OS πŸ¦‹

Linux, obviously 🐧

πŸ™ˆ STABILITY πŸ™ˆ

Unstable β€” it's still in development, so don't be shocked if things shift πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

written by Brendan Gregg, the legend himself 🫢

πŸ’œ SEE ALSO πŸ’œ


bye bestie πŸŽ€ this was the USER COMMANDS manual page for pidpersec.bt(8), last updated 2018-09-06. stay curious and keep your forks in check πŸ§šπŸ’–