get_cgroup1_hierarchy_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… get_cgroup1_hierarchy_id(9) β€” a Kernel API Manual moment

okay so bestie, welcome to the <pink>get_cgroup1_hierarchy_id</pink> page, straight outta the Kernel API Manual. this one's a lil function that does exactly one thing and does it cute. let's get into it πŸŽ€


✨ NAME ✨

get_cgroup1_hierarchy_id β€” gets you the ID of a cgroup1 hierarchy, and it pulls it straight from the cgroup1 subsys name. that's it, that's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

int get_cgroup1_hierarchy_id (const char *subsys_name );

literally one argument, one int back. she's low maintenance, we stan. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • subsys_name β€” the cgroup1 subsys name, and ngl you can grab this from /proc/self/cgroup. it can be a named cgroup like "name=systemd", or a controller name like "net_cls", or even multi-controllers like "net_cls,net_prio". so she's flexible, she's versatile, she contains multitudes πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

like, go look at this kernel file, it's right there in the source:

  • Kernel file ./tools/testing/selftests/bpf/cgroup_helpers.c

and the whole friend group of related functions, no cap:


fr fr, that's the whole page β€” no hidden options, no secret environment variables, no exit statuses hiding in the bushes. just subsys_name in, hierarchy ID out. 🫢

and that's a wrap bestie!! this icon was brought to you by the <purple>./tools/testing/selftests/bpf</purple> section (iykyk), dated `October 2026. mwah, go read your kernel source, ily πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from