sys_acct(9)
π sys_acct(9) β the kernel API manual, bestie edition π
okay so you're here for sys_acct(9), and honestly? iconic of you. this is the kernel API manual page, and it's about to be your new hyperfixation. let's get into it β¨
πΈ NAME πΈ
sys_acct β turn process accounting on or off. that's the whole vibe. enable/disable, on/off, light switch energy π
π¦ SYNOPSIS π¦
long sys_acct (const char __user * name );
that's it. that's the signature. look at her go π
π ARGUMENTS π
nameβ the file name where the accounting records go β¨ orNULLto shut accounting all the way down. like, closing the group chat.NULLmeans shutdown, no cap.
π§ DESCRIPTION π§
so sys_acct is literally the only system call you need to implement process accounting. one call. main character energy fr fr π
it takes the name of the file where the accounting records should be written. you hand it a filename, the kernel writes the records there, done. slay.
but if the filename is NULL? accounting gets shutdown. that's it, that's the deal π«Ά
bestie pay attention:namebeingNULLis not "oops no filename" β it is the documented way to shut accounting down. that's a feature, not a bug π
π₯ RETURN π₯
0 for success, or negative errno values for failure. that's the whole mood: zero means we ate, negative means something went sideways π
π SEE ALSO π
- Kernel file
./kernel/acct.c acct_collect(9)acct_process(9)
go read those next, iykyk πβ¨
and that's the page, bestie π this one came from ./kernel, dated October 2026, and honestly it ate. go forth and account for your processes ππ¦β
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms