pub struct SystemInfo {Show 13 fields
pub cpu_model: String,
pub ram_total: String,
pub ram_free: String,
pub disk_total: String,
pub disk_free: String,
pub disk_used_percent: String,
pub uptime: String,
pub load_average: String,
pub ram_total_bytes: u64,
pub ram_free_bytes: u64,
pub disk_total_bytes: u64,
pub disk_free_bytes: u64,
pub disk_used_percent_numeric: f64,
}Expand description
Basic system information from /proc and shell commands.
Fields§
§cpu_model: StringCPU model string (from /proc/cpuinfo).
ram_total: StringTotal RAM (human-readable, e.g. "16Gi").
ram_free: StringFree RAM (human-readable, e.g. "13Gi").
disk_total: StringTotal disk space (human-readable, e.g. "100G").
disk_free: StringFree disk space (human-readable).
disk_used_percent: StringDisk usage percentage (e.g. "45%").
uptime: StringSystem uptime (e.g. "up 3 days, 2 hours").
load_average: StringLoad average (e.g. " 0.50, 0.30, 0.20").
ram_total_bytes: u64Total RAM in bytes (machine-readable).
ram_free_bytes: u64Free RAM in bytes (machine-readable).
disk_total_bytes: u64Total disk space in bytes (machine-readable).
disk_free_bytes: u64Free disk space in bytes (machine-readable).
disk_used_percent_numeric: f64Disk usage percentage as numeric (e.g. 45.0, no % sign).
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 moreSource§impl Debug for SystemInfo
impl Debug for SystemInfo
Source§impl<'de> Deserialize<'de> for SystemInfo
impl<'de> Deserialize<'de> for SystemInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto 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