sys_acct(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 ✨ or NULL to shut accounting all the way down. like, closing the group chat. NULL means 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: name being NULL is 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 🌈

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