pub struct CgroupMem {
pub path: String,
pub current: Option<u64>,
pub max: Option<u64>,
pub high: Option<u64>,
pub limits_read: bool,
pub peak: Option<u64>,
pub swap_current: Option<u64>,
pub inactive_file: Option<u64>,
pub anon: Option<u64>,
pub file: Option<u64>,
pub events: Option<MemoryEvents>,
pub at_ms: u64,
}Expand description
cgroup v2 memory accounting of one cgroup (Linux; /sys/fs/cgroup/<path>/memory.*, all world-readable).
Decoded from the process source for container / pod cgroups and every cgroup with a limit (SPEC §11).
Fields§
§path: Stringcgroup path relative to the v2 root (/kubepods.slice/…).
current: Option<u64>memory.current.
max: Option<u64>memory.max; None = max (no limit) or not read (limits_read says which).
high: Option<u64>memory.high (the throttle point: the kernel reclaims hard above it but does not kill).
limits_read: boolmemory.max / memory.high were read (absent files mean the memory controller is off here).
peak: Option<u64>memory.peak (kernel ≥ 5.19).
swap_current: Option<u64>memory.swap.current.
inactive_file: Option<u64>memory.stat inactive_file / anon / file.
anon: Option<u64>§file: Option<u64>§events: Option<MemoryEvents>memory.events (counters since the cgroup was created; oom_kill = kernel OOM kills inside it).
at_ms: u64When the values were read (ms since the epoch).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CgroupMem
impl<'de> Deserialize<'de> for CgroupMem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CgroupMem
impl StructuralPartialEq for CgroupMem
Auto Trait Implementations§
impl Forget for CgroupMem
impl Freeze for CgroupMem
impl Move for CgroupMem
impl RefUnwindSafe for CgroupMem
impl Send for CgroupMemwhere
RawVecInner: Send,
impl Sync for CgroupMemwhere
RawVecInner: Sync,
impl Unpin for CgroupMem
impl UnsafeUnpin for CgroupMem
impl UnwindSafe for CgroupMemwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more