pidpersec(8)

πŸ“¦ version 0.36.1, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

πŸŽ€ NAME πŸŽ€

okay so the name says it all: pidpersec counts new processes (via fork()) πŸ’– and it uses Linux eBPF/bcc to do it ✨


🌸 SYNOPSIS 🌸

pidpersec

✨ DESCRIPTION ✨

bestie, pidpersec shows you how many new processes got created each second πŸ¦‹ lowkey this matters because loads of short-lived processes can cause performance issues, and they can totally hide from sampling tools like top(1) πŸ™ˆ pidpersec is one way to actually investigate that behaviour πŸ’…

so how does it work? It traces the kernel sched_fork() function using dynamic tracing πŸ” heads up, this means it will need updating if sched_fork() ever changes 😭

⚠️ Since this uses BPF, only the root user can run this tool. no cap, you need to be root πŸ‘‘

🧚 REQUIREMENTS 🧚

you'll need CONFIG_BPF and bcc 🫢


πŸ’œ EXAMPLES πŸ’œ

to count the new processes created each second, just run:

# pidpersec

πŸ”₯ OVERHEAD πŸ”₯

this traces the kernel fork function and keeps an in-kernel count 🧠 user-space reads that count asynchronously. the rate is usually expected to be low (<< 1000/s), so the overhead is also expected to be negligible ✨ literally barely there πŸ’…


🌈 SOURCE 🌈

this one is from bcc πŸ’–

https://github.com/iovisor/bcc

also check out the bcc distribution for a companion _examples.txt file. it has example usage, output, and commentary for this tool πŸ“š


πŸ“ OS πŸ“

Linux 🐧


πŸ¦‹ STABILITY πŸ¦‹

Unstable β€” it's still in development 🚧 so don't be shocked if things shift around πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg, the icon 🫢


πŸ”— SEE ALSO πŸ”—


Okay bestie, that's the whole tea β˜•πŸ’œ This was the USER COMMANDS manual page for pidpersec(8), dated 2015-08-18 πŸŽ€ Stay iconic and keep those forks in check! 🧚✨

πŸ“¦ where this page comes from