Struct linux_stats::MemInfo

source ·
pub struct MemInfo {
Show 45 fields pub mem_total: u64, pub mem_free: u64, pub mem_available: u64, pub bufers: u64, pub cached: u64, pub swap_cached: u64, pub active: u64, pub inactive: u64, pub active_anon: u64, pub inactive_anon: u64, pub active_file: u64, pub inactive_file: u64, pub unevictable: u64, pub mlocked: u64, pub swap_total: u64, pub swap_free: u64, pub dirty: u64, pub writeback: u64, pub anon_pages: u64, pub mapped: u64, pub shmem: u64, pub slab: u64, pub s_reclaimable: u64, pub s_unreclaim: u64, pub kernel_stack: u64, pub page_tables: u64, pub nfs_unstable: u64, pub bounce: u64, pub writeback_tmp: u64, pub commit_limit: u64, pub committed_as: u64, pub vmalloc_total: u64, pub vmalloc_used: u64, pub vmalloc_chunk: u64, pub hardware_corrupted: u64, pub anon_huge_pages: u64, pub cma_total: u64, pub cma_free: u64, pub huge_pages_total: u64, pub huge_pages_free: u64, pub huge_pages_rsvd: u64, pub huge_pages_surp: u64, pub hugepagesize: u64, pub direct_map_4k: u64, pub direct_map_2m: u64,
}
Expand description

Represents the output of cat /proc/meminfo

Fields§

§mem_total: u64§mem_free: u64§mem_available: u64§bufers: u64§cached: u64§swap_cached: u64§active: u64§inactive: u64§active_anon: u64§inactive_anon: u64§active_file: u64§inactive_file: u64§unevictable: u64§mlocked: u64§swap_total: u64§swap_free: u64§dirty: u64§writeback: u64§anon_pages: u64§mapped: u64§shmem: u64§slab: u64§s_reclaimable: u64§s_unreclaim: u64§kernel_stack: u64§page_tables: u64§nfs_unstable: u64§bounce: u64§writeback_tmp: u64§commit_limit: u64§committed_as: u64§vmalloc_total: u64§vmalloc_used: u64§vmalloc_chunk: u64§hardware_corrupted: u64§anon_huge_pages: u64§cma_total: u64§cma_free: u64§huge_pages_total: u64§huge_pages_free: u64§huge_pages_rsvd: u64§huge_pages_surp: u64§hugepagesize: u64§direct_map_4k: u64§direct_map_2m: u64

Trait Implementations§

source§

impl Clone for MemInfo

source§

fn clone(&self) -> MemInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MemInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MemInfo

source§

fn default() -> MemInfo

Returns the “default value” for a type. Read more
source§

impl FromStr for MemInfo

§

type Err = Infallible

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<MemInfo, Infallible>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq<MemInfo> for MemInfo

source§

fn eq(&self, other: &MemInfo) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for MemInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.