[−][src]Crate cgroups_fs
Cgroup-fs is a minimal wrapper around Linux Control Groups (cgroups) filesystem (usually
mounted as /sys/fs/cgroup).
Examples
Get memory usage from root cgroup
let root_cgroup = cgroups_fs::CgroupName::new(""); let root_memory_cgroup = cgroups_fs::Cgroup::new(&root_cgroup, "memory"); println!( "Current memory usage is {} bytes", root_memory_cgroup.get_value::<u64>("memory.usage_in_bytes").unwrap() );
Measure memory usage of a child process
Structs
| AutomanagedCgroup | An automatically managed controller of a specific cgroups subsystem. |
| Cgroup | A controller of a specific cgroups namespace. |
| CgroupName | A common structure holding a cgroups name (path). |
Traits
| CgroupsCommandExt | This trait is designed to extend |