cgroupstats_build(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cgroupstats_build(9) β€” like, the whole glow-up

okay so bestie, welcome to the Kernel API Manual page for cgroupstats_build(9) β€” this is the function that literally builds a cgroupstats struct and fills it in, and honestly? it's giving backend icon. let's get into it πŸŽ€


✨ NAME ✨

cgroupstats_build β€” build and fill cgroupstats 🫢


🌸 SYNOPSIS 🌸

int cgroupstats_build (struct cgroupstats *stats , struct dentry *dentry
);

that's the whole vibe. two args, one int coming back at you. slay. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • stats β€” the cgroupstats you're filling information into. it's the main character here, the one getting all the data πŸ’–
  • dentry β€” a dentry entry belonging to the cgroup for which stats have been requested. like, which cgroup are we talking about? this one. no cap. πŸ‘‘

🌈 DESCRIPTION 🌈

so what does it actually do? it builds and fills cgroupstats so that taskstats can export it to user space. that's the whole mission statement, bestie β€” build it, fill it, hand it off so user space can see it. iconic behaviour, fr fr. πŸ’…


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • a negative errno code on failure πŸ’€

that's it, that's the contract. check your return value, bestie, i'm begging πŸ™ˆ


🧚 SEE ALSO 🧚

kernel file ./kernel/cgroup/cgroup-v1.c, plus these absolute legends:

go read those too, iykyk πŸ“šβœ¨


lowkey reminder: always check for that negative errno, because a silently ignored failure is not the vibe. πŸ’€

mwah πŸ’‹ that's the page! brought to you by the source tree at ./kernel/cgroup, in the Kernel API Manual, dated October 2026 β€” same title, same function, just with way more sparkle. go build some stats, bestie πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from