Struct cgroupfs::CgroupReader
source · pub struct CgroupReader { /* private fields */ }
Implementations§
source§impl CgroupReader
impl CgroupReader
pub fn new(root: PathBuf) -> Result<CgroupReader>
pub fn new_with_relative_path( root: PathBuf, relative_path: PathBuf ) -> Result<CgroupReader>
pub fn root() -> Result<CgroupReader>
sourcepub fn name(&self) -> &Path
pub fn name(&self) -> &Path
Returns the cgroup name (e.g. the path relative to the cgroup root) Invoking this on the root cgroup will return an empty path
pub fn read_inode_number(&self) -> Result<u64>
sourcepub fn read_cgroup_controllers(&self) -> Result<BTreeSet<String>>
pub fn read_cgroup_controllers(&self) -> Result<BTreeSet<String>>
Read cgroup.controllers
sourcepub fn read_cgroup_subtree_control(&self) -> Result<BTreeSet<String>>
pub fn read_cgroup_subtree_control(&self) -> Result<BTreeSet<String>>
Read cgroup.subtree_control
sourcepub fn read_pids_current(&self) -> Result<u64>
pub fn read_pids_current(&self) -> Result<u64>
Read pids.current - returning current cgroup number of processes
sourcepub fn read_pids_max(&self) -> Result<i64>
pub fn read_pids_max(&self) -> Result<i64>
Read pids.max - returning max cgroup number of processes
sourcepub fn read_memory_min(&self) -> Result<i64>
pub fn read_memory_min(&self) -> Result<i64>
Read memory.min - returning memory.min limit in bytes Will return -1 if the content is max
sourcepub fn read_memory_low(&self) -> Result<i64>
pub fn read_memory_low(&self) -> Result<i64>
Read memory.low - returning memory.low limit in bytes Will return -1 if the content is max
sourcepub fn read_memory_high(&self) -> Result<i64>
pub fn read_memory_high(&self) -> Result<i64>
Read memory.high - returning memory.high limit in bytes Will return -1 if the content is max
sourcepub fn read_memory_max(&self) -> Result<i64>
pub fn read_memory_max(&self) -> Result<i64>
Read memory.max - returning memory.max max in bytes Will return -1 if the content is max
sourcepub fn read_memory_swap_max(&self) -> Result<i64>
pub fn read_memory_swap_max(&self) -> Result<i64>
Read memory.swap.max - returning memory.swap.max max in bytes Will return -1 if the content is max
sourcepub fn read_memory_zswap_max(&self) -> Result<i64>
pub fn read_memory_zswap_max(&self) -> Result<i64>
Read memory.zswap.max - returning memory.zswap.max max in bytes Will return -1 if the content is max
sourcepub fn read_memory_current(&self) -> Result<u64>
pub fn read_memory_current(&self) -> Result<u64>
Read memory.current - returning current cgroup memory consumption in bytes
sourcepub fn read_memory_swap_current(&self) -> Result<u64>
pub fn read_memory_swap_current(&self) -> Result<u64>
Read memory.swap.current - returning current cgroup memory swap consumption in bytes
sourcepub fn read_memory_zswap_current(&self) -> Result<u64>
pub fn read_memory_zswap_current(&self) -> Result<u64>
Read memory.zswap.current - returning current cgroup memory zswap consumption in bytes
sourcepub fn read_cpu_stat(&self) -> Result<CpuStat>
pub fn read_cpu_stat(&self) -> Result<CpuStat>
Read cpu.stat - returning assorted cpu consumption statistics
sourcepub fn read_io_stat(&self) -> Result<BTreeMap<String, IoStat>>
pub fn read_io_stat(&self) -> Result<BTreeMap<String, IoStat>>
Read io.stat - returning assorted io consumption statistics
sourcepub fn read_memory_stat(&self) -> Result<MemoryStat>
pub fn read_memory_stat(&self) -> Result<MemoryStat>
Read memory.stat - returning assorted memory consumption statistics
pub fn read_memory_events(&self) -> Result<MemoryEvents>
pub fn read_cgroup_stat(&self) -> Result<CgroupStat>
sourcepub fn read_cpu_weight(&self) -> Result<u32>
pub fn read_cpu_weight(&self) -> Result<u32>
Read cpu.weight
sourcepub fn read_cpu_max(&self) -> Result<CpuMax>
pub fn read_cpu_max(&self) -> Result<CpuMax>
Read cpu.max
sourcepub fn read_cpuset_cpus(&self) -> Result<Cpuset>
pub fn read_cpuset_cpus(&self) -> Result<Cpuset>
Read cpuset.cpus
sourcepub fn read_cpuset_cpus_effective(&self) -> Result<Cpuset>
pub fn read_cpuset_cpus_effective(&self) -> Result<Cpuset>
Read cpuset.cpus.effective
sourcepub fn read_cpuset_cpus_partition(&self) -> Result<String>
pub fn read_cpuset_cpus_partition(&self) -> Result<String>
Read cpuset.cpus.partition
sourcepub fn read_cpuset_mems(&self) -> Result<MemNodes>
pub fn read_cpuset_mems(&self) -> Result<MemNodes>
Read cpuset.mems
sourcepub fn read_cpuset_mems_effective(&self) -> Result<MemNodes>
pub fn read_cpuset_mems_effective(&self) -> Result<MemNodes>
Read cpuset.mems.effective
sourcepub fn read_cpu_pressure(&self) -> Result<CpuPressure>
pub fn read_cpu_pressure(&self) -> Result<CpuPressure>
Read $typ
sourcepub fn read_io_pressure(&self) -> Result<IoPressure>
pub fn read_io_pressure(&self) -> Result<IoPressure>
Read $typ
sourcepub fn read_memory_pressure(&self) -> Result<MemoryPressure>
pub fn read_memory_pressure(&self) -> Result<MemoryPressure>
Read $typ
sourcepub fn read_pressure(&self) -> Result<Pressure>
pub fn read_pressure(&self) -> Result<Pressure>
Read all pressure metrics
pub fn read_memory_numa_stat(&self) -> Result<BTreeMap<u32, MemoryNumaStat>>
sourcepub fn child_cgroup_iter(
&self
) -> Result<impl Iterator<Item = CgroupReader> + '_>
pub fn child_cgroup_iter( &self ) -> Result<impl Iterator<Item = CgroupReader> + '_>
Return an iterator over child cgroups