pub struct MemoryMetrics {
pub total_mib: u64,
pub free_mib: u64,
pub available_mib: u64,
pub used_mib: u64,
pub used_pct: f64,
pub buffers_mib: u64,
pub cached_mib: u64,
pub swap_total_mib: u64,
pub swap_used_mib: u64,
pub swap_used_pct: f64,
pub active_mib: u64,
pub inactive_mib: u64,
}Expand description
Memory snapshot from /proc/meminfo. All values are in mebibytes (MiB = 1_048_576 bytes), standardized to match Python resource-tracker PR #9 which also adopted MiB throughout.
Fields§
§total_mib: u64§free_mib: u64Truly free RAM (MemFree from /proc/meminfo). Matches Python memory_free.
available_mib: u64Free + reclaimable RAM (MemAvailable from /proc/meminfo). Superset field.
used_mib: u64Used RAM excluding buffers/cache (MemTotal - MemFree - Buffers - Cached).
Matches Python memory_used.
used_pct: f64Fraction of total RAM in use (0.0–100.0).
buffers_mib: u64Memory used by kernel I/O buffers (MiB).
cached_mib: u64Memory used by the page cache including slab-reclaimable (Cached + SReclaimable).
Matches Python memory_cached.
swap_total_mib: u64§swap_used_mib: u64§swap_used_pct: f64Fraction of swap in use (0.0–100.0). 0.0 when no swap is configured.
active_mib: u64Memory used by active pages (MiB). Matches Python’s memory_active.
inactive_mib: u64Memory used by inactive pages (MiB). Matches Python’s memory_inactive.
Trait Implementations§
Source§impl Clone for MemoryMetrics
impl Clone for MemoryMetrics
Source§fn clone(&self) -> MemoryMetrics
fn clone(&self) -> MemoryMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more