rw_resource_util::runtime

Function is_controller_activated

source
pub fn is_controller_activated(
    controller_type: Controller,
    cgroup_version: CgroupVersion,
) -> bool
Expand description

Given a certain controller, checks if it is enabled. For cgroup v1, existence of directory with controller name is checked in cgroup default root hierarchy. e.g if directory “/sys/fs/cgroup”/cpu“ exists then CPU controller is enabled. For cgroup v2, check the controller list path for the controller name.