get_cgroup_id_from_path(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– get_cgroup_id_from_path(9) πŸ’–

Bestie, welcome to the get_cgroup_id_from_path(9) page from the Kernel API Manual ✨ this one is short and sweet, and we are literally getting a cgroup id from a path. Slay.


✨ NAME ✨

get_cgroup_id_from_path β€” get the cgroup id for a particular cgroup path πŸŽ€


🌸 SYNOPSIS 🌸

unsigned long long get_cgroup_id_from_path (const char *cgroup_workdir
);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • cgroup_workdir β€” the absolute cgroup path, no cap. That's the whole argument, bestie πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

Okay so on success, it returns the cgroup id, periodt ✨

On failure it returns 0, which is an invalid cgroup id β€” so do not treat that like a real one, fr fr πŸ™ˆ

If there is a failure, it prints the error to stderr πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./tools/testing/selftests/bpf/cgroup_helpers.c β€” iykyk 🫢


Signing off with source/version ./tools/testing/selftests/bpf, dated October 2026, for get_cgroup_id_from_path(9) β€” mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from