pub struct LimitStatus {Show 22 fields
pub id: String,
pub kind: LimitKind,
pub label: String,
pub runtime: Option<String>,
pub sandbox_id: Option<String>,
pub cgroup: Option<String>,
pub pod: Option<String>,
pub usage: Measured<u64>,
pub limit: Measured<u64>,
pub target: LimitTarget,
pub high: Option<u64>,
pub peak: Measured<u64>,
pub pct: Option<f64>,
pub growth_per_min: Measured<f64>,
pub forecast: Option<LimitForecast>,
pub state: LimitState,
pub oom_kills: Measured<u64>,
pub oom_kills_observed: u64,
pub last_oom_kill_ms: Option<u64>,
pub oom_killed_last_exit: Option<bool>,
pub restarts: Option<u32>,
pub summary: String,
}Expand description
One limit and how close it is (SPEC §8.3). summary is in IEC units; LimitStatus::sentence
re-renders it in the caller’s units.
Fields§
§id: StringStable id: cgroup:<path>, a sandbox id (docker:<12 hex>), k8s:<ns>/<pod>/<container>.
kind: LimitKind§label: StringContainer / pod / unit name.
runtime: Option<String>Engine or cluster runtime (“docker”, “orbstack”, “kubernetes”, “systemd”).
sandbox_id: Option<String>crate::model::Sandbox::id of the container or VM, when there is one.
cgroup: Option<String>cgroup path, when the numbers come from cgroup files.
pod: Option<String>namespace/pod for Kubernetes containers and pods.
usage: Measured<u64>Working set (see module docs).
limit: Measured<u64>The limit the percent and forecast use (memory.max, else memory.high; engine limit; VM size).
target: LimitTarget§high: Option<u64>memory.high when set below memory.max.
peak: Measured<u64>Highest usage the kernel recorded (memory.peak), when readable.
pct: Option<f64>usage ÷ limit × 100.
growth_per_min: Measured<f64>Growth over the last ≤ 5 min (bytes/min, an estimate; may be noise — the forecast is the trustworthy signal).
forecast: Option<LimitForecast>§state: LimitState§oom_kills: Measured<u64>Kernel OOM kills inside the cgroup since it was created (memory.events:oom_kill).
oom_kills_observed: u64OOM kills that happened while oomtop was watching.
last_oom_kill_ms: Option<u64>When the newest observed OOM kill was noticed (ms since the epoch).
oom_killed_last_exit: Option<bool>The container’s previous run ended in an OOM kill (Docker State.OOMKilled, Kubernetes
lastState.terminated.reason = OOMKilled).
restarts: Option<u32>Restarts (Docker RestartCount, Kubernetes restartCount).
summary: String“container web hits its 2.0 GiB limit in ~4 min” (IEC units).
Implementations§
Source§impl LimitStatus
impl LimitStatus
Sourcepub fn sentence(&self, units: UnitSystem, decimals: usize) -> String
pub fn sentence(&self, units: UnitSystem, decimals: usize) -> String
The one-line answer in the caller’s units.