get_cgroup_id_from_path(9)
π 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 π«Ά
enable_controllers(9)write_cgroup_file(9)write_cgroup_file_parent(9)setup_cgroup_environment(9)join_cgroup(9)join_root_cgroup(9)join_parent_cgroup(9)set_cgroup_xattr(9)__cleanup_cgroup_environment(9)cleanup_cgroup_environment(9)get_root_cgroup(9)create_and_get_cgroup(9)setup_classid_environment(9)set_classid(9)join_classid(9)cleanup_classid_environment(9)get_classid_cgroup_id(9)get_cgroup1_hierarchy_id(9)open_classid(9)
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
- 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