pub struct SystemCollector { /* private fields */ }Expand description
Wraps the sysinfo handles that must persist between refreshes
(CPU usage and rates are computed from differences).
Implementations§
Source§impl SystemCollector
impl SystemCollector
Sourcepub fn cpu(&self) -> CpuStats
pub fn cpu(&self) -> CpuStats
CPU load and frequencies. Temperatures are filled in by the caller.
Sourcepub fn memory(&self) -> MemoryStats
pub fn memory(&self) -> MemoryStats
Memory and swap. cached_bytes is filled in by the caller where available.
Sourcepub fn networks(&self, elapsed_secs: Option<f64>) -> Vec<NetworkStats>
pub fn networks(&self, elapsed_secs: Option<f64>) -> Vec<NetworkStats>
Network traffic per interface. elapsed_secs is the time since the
previous refresh; rates are zero when it is unknown.
Sourcepub fn filesystems(&self) -> Vec<FilesystemUsage>
pub fn filesystems(&self) -> Vec<FilesystemUsage>
Mounted filesystems, merged by source device so that btrfs subvolumes and bind mounts appear once.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SystemCollector
impl RefUnwindSafe for SystemCollector
impl Send for SystemCollector
impl Sync for SystemCollector
impl Unpin for SystemCollector
impl UnsafeUnpin for SystemCollector
impl UnwindSafe for SystemCollector
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