pub struct SystemInfo {
pub uptime: Duration,
pub load_average: [f64; 3],
pub total_ram: u64,
pub free_ram: u64,
pub shared_ram: u64,
pub buffer_ram: u64,
pub total_swap: u64,
pub free_swap: u64,
pub processes: u16,
pub total_high: u64,
pub free_high: u64,
pub mem_unit: u32,
}Expand description
Statistiques globales du système retournées par sysinfo(2).
Les valeurs de RAM et de swap sont exprimées en octets — le wrapper
applique la multiplication par mem_unit en interne avant de
construire ce type. Les load_average (1, 5 et 15 minutes) sont
normalisés en f64.
Fields§
§uptime: DurationDurée de fonctionnement du système depuis le boot.
load_average: [f64; 3]Charge moyenne sur 1, 5 et 15 minutes (valeurs en nombre de processus).
total_ram: u64Mémoire RAM totale (octets).
free_ram: u64Mémoire RAM libre (octets).
Mémoire partagée (octets).
buffer_ram: u64Mémoire en cache tampon (octets).
total_swap: u64Espace swap total (octets).
free_swap: u64Espace swap libre (octets).
processes: u16Nombre courant de processus.
total_high: u64Total de mémoire high (zones >896 Mo sur x86 32 bits ; 0 sur 64 bits).
free_high: u64Mémoire high libre.
mem_unit: u32Unité de granularité mémoire du kernel (toujours 1 après conversion).
Trait Implementations§
Source§impl Clone for SystemInfo
impl Clone for SystemInfo
Source§fn clone(&self) -> SystemInfo
fn clone(&self) -> SystemInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SystemInfo
impl RefUnwindSafe for SystemInfo
impl Send for SystemInfo
impl Sync for SystemInfo
impl Unpin for SystemInfo
impl UnsafeUnpin for SystemInfo
impl UnwindSafe for SystemInfo
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