Struct sysinfo::System [−][src]
pub struct System { /* fields omitted */ }
Structs containing system’s information.
Trait Implementations
impl SystemExt for System
[src]
impl SystemExt for System
[src]fn new_with_specifics(refreshes: RefreshKind) -> System
[src]
fn new_with_specifics(refreshes: RefreshKind) -> System
[src]Creates a new System
instance and refresh the data corresponding to the
given RefreshKind
. Read more
fn refresh_components_list(&mut self)
[src]
fn refresh_components_list(&mut self)
[src]Refreshes components list. Read more
fn refresh_memory(&mut self)
[src]
fn refresh_memory(&mut self)
[src]Refreshes RAM and SWAP usage. Read more
fn refresh_cpu(&mut self)
[src]
fn refresh_cpu(&mut self)
[src]Refreshes CPU usage. Read more
fn refresh_processes(&mut self)
[src]
fn refresh_processes(&mut self)
[src]Gets all processes and updates their information. Read more
fn refresh_process(&mut self, pid: Pid) -> bool
[src]
fn refresh_process(&mut self, pid: Pid) -> bool
[src]Refreshes only the process corresponding to pid
. Returns false
if the process doesn’t
exist. If it isn’t listed yet, it’ll be added. Read more
fn refresh_disks_list(&mut self)
[src]
fn refresh_disks_list(&mut self)
[src]The disk list will be emptied then completely recomputed. Read more
fn refresh_users_list(&mut self)
[src]
fn refresh_users_list(&mut self)
[src]Refreshes users list. Read more
fn get_process(&self, pid: Pid) -> Option<&Process>
[src]
fn get_process(&self, pid: Pid) -> Option<&Process>
[src]Returns the process corresponding to the given pid or None
if no such process exists. Read more
fn get_networks(&self) -> &Networks
[src]
fn get_networks(&self) -> &Networks
[src]Returns the network interfaces object. Read more
fn get_networks_mut(&mut self) -> &mut Networks
[src]
fn get_networks_mut(&mut self) -> &mut Networks
[src]Returns a mutable access to network interfaces. Read more
fn get_global_processor_info(&self) -> &Processor
[src]
fn get_global_processor_info(&self) -> &Processor
[src]Returns “global” processors information (aka the addition of all the processors). Read more
fn get_physical_core_count(&self) -> Option<usize>
[src]
fn get_physical_core_count(&self) -> Option<usize>
[src]Returns the number of physical cores on the processor or None
if it couldn’t get it. Read more
fn get_total_memory(&self) -> u64
[src]
fn get_total_memory(&self) -> u64
[src]Returns the RAM size in kB. Read more
fn get_free_memory(&self) -> u64
[src]
fn get_free_memory(&self) -> u64
[src]Returns the amount of free RAM in kB. Read more
fn get_available_memory(&self) -> u64
[src]
fn get_available_memory(&self) -> u64
[src]Returns the amount of available RAM in kB. Read more
fn get_used_memory(&self) -> u64
[src]
fn get_used_memory(&self) -> u64
[src]Returns the amound of used RAM in kB. Read more
fn get_total_swap(&self) -> u64
[src]
fn get_total_swap(&self) -> u64
[src]Returns the SWAP size in kB. Read more
fn get_free_swap(&self) -> u64
[src]
fn get_free_swap(&self) -> u64
[src]Returns the amount of free SWAP in kB. Read more
fn get_used_swap(&self) -> u64
[src]
fn get_used_swap(&self) -> u64
[src]Returns the amount of used SWAP in kB. Read more
fn get_components_mut(&mut self) -> &mut [Component]
[src]
fn get_components_mut(&mut self) -> &mut [Component]
[src]Returns a mutable components list. Read more
fn get_uptime(&self) -> u64
[src]
fn get_uptime(&self) -> u64
[src]Returns system uptime (in seconds). Read more
fn get_boot_time(&self) -> u64
[src]
fn get_boot_time(&self) -> u64
[src]Returns the time (in seconds) when the system booted since UNIX epoch. Read more
fn get_load_average(&self) -> LoadAvg
[src]
fn get_load_average(&self) -> LoadAvg
[src]Returns the system load average value. Read more
fn get_long_os_version(&self) -> Option<String>
[src]
fn get_long_os_version(&self) -> Option<String>
[src]Returns the system long os version (e.g “MacOS 11.2 BigSur”). Read more
fn get_host_name(&self) -> Option<String>
[src]
fn get_host_name(&self) -> Option<String>
[src]Returns the system hostname based off DNS Read more
fn get_kernel_version(&self) -> Option<String>
[src]
fn get_kernel_version(&self) -> Option<String>
[src]Returns the system’s kernel version. Read more
fn get_os_version(&self) -> Option<String>
[src]
fn get_os_version(&self) -> Option<String>
[src]Returns the system version (e.g. for MacOS this will return 11.1 rather than the kernel version). Read more
fn new() -> Self
[src]
fn new() -> Self
[src]Creates a new System
instance with nothing loaded except the processors list. If you
want to load components, network interfaces or the disks, you’ll have to use the
refresh_*_list
methods. SystemExt::refresh_networks_list
for example. Read more
fn refresh_specifics(&mut self, refreshes: RefreshKind)
[src]
fn refresh_specifics(&mut self, refreshes: RefreshKind)
[src]Refreshes according to the given RefreshKind
. It calls the corresponding
“refresh_” methods. Read more
fn refresh_system(&mut self)
[src]
fn refresh_system(&mut self)
[src]Refreshes system information (RAM, swap, CPU usage and components’ temperature). Read more
fn refresh_components(&mut self)
[src]
fn refresh_components(&mut self)
[src]Refreshes components’ temperature. Read more
fn refresh_disks(&mut self)
[src]
fn refresh_disks(&mut self)
[src]Refreshes the listed disks’ information. Read more
fn refresh_networks(&mut self)
[src]
fn refresh_networks(&mut self)
[src]Refreshes networks data. Read more
fn refresh_networks_list(&mut self)
[src]
fn refresh_networks_list(&mut self)
[src]The network list will be updated: removing not existing anymore interfaces and adding new ones. Read more
fn refresh_all(&mut self)
[src]
fn refresh_all(&mut self)
[src]Refreshes all system, processes, disks and network interfaces information. Read more
Auto Trait Implementations
impl RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl UnwindSafe for System
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T