pub struct System { /* private fields */ }
Expand description

Structs containing system’s information.

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns true if this OS is supported. Please refer to the crate-level documentation to get the list of supported OSes. Read more

Returns the list of the supported signals on this system (used by ProcessExt::kill_with). Read more

Creates a new System instance and refresh the data corresponding to the given RefreshKind. Read more

Refreshes components list. Read more

Refreshes RAM and SWAP usage. Read more

Refreshes CPUs specific information. Read more

Gets all processes and updates the specified information. Read more

Refreshes only the process corresponding to pid. Returns false if the process doesn’t exist (it will NOT be removed from the processes if it doesn’t exist anymore). If it isn’t listed yet, it’ll be added. Read more

The disk list will be emptied then completely recomputed. Read more

Refreshes users list. Read more

Returns the process list. Read more

Returns the process corresponding to the given pid or None if no such process exists. Read more

Returns the network interfaces object. Read more

Returns a mutable access to network interfaces. Read more

Returns “global” cpus information (aka the addition of all the CPUs). Read more

Returns the list of the CPUs. Read more

Returns the number of physical cores on the CPU or None if it couldn’t get it. Read more

Returns the RAM size in KB. Read more

Returns the amount of free RAM in KB. Read more

Returns the amount of available RAM in KB. Read more

Returns the amount of used RAM in KB. Read more

Returns the SWAP size in KB. Read more

Returns the amount of free SWAP in KB. Read more

Returns the amount of used SWAP in KB. Read more

Returns the components list. Read more

Returns a mutable components list. Read more

Returns the disks list. Read more

Returns the disks list. Read more

Sort the disk list with the provided callback. Read more

Returns system uptime (in seconds). Read more

Returns the time (in seconds) when the system booted since UNIX epoch. Read more

Returns the system load average value. Read more

Returns the users list. Read more

Returns the system name. Read more

Returns the system long os version (e.g “MacOS 11.2 BigSur”). Read more

Returns the system hostname based off DNS Read more

Returns the system’s kernel version. Read more

Returns the system version (e.g. for MacOS this will return 11.1 rather than the kernel version). Read more

Creates a new System instance with nothing loaded except the cpus 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

Creates a new System instance with everything loaded. Read more

Refreshes according to the given RefreshKind. It calls the corresponding “refresh_” methods. Read more

Refreshes all system, processes, disks and network interfaces information. Read more

Refreshes system information (RAM, swap, CPU usage and components’ temperature). Read more

Refreshes CPUs information. Read more

Refreshes components’ temperature. Read more

Gets all processes and updates their information. Read more

Refreshes only the process corresponding to pid. Returns false if the process doesn’t exist (it will NOT be removed from the processes if it doesn’t exist anymore). If it isn’t listed yet, it’ll be added. Read more

Refreshes the listed disks’ information. Read more

Refreshes networks data. Read more

The network list will be updated: removing not existing anymore interfaces and adding new ones. Read more

Returns an iterator of process containing the given name. Read more

Returns an iterator of processes with exactly the given name. Read more

Returns the User matching the given user_id. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.