A process and system monitoring library for Rust, heavily inspired by the
psutil module for Python.
- Linux: 2.6.0 (2003-12-17)
rust-psutil implements the same API as
psutil with some exceptions:
- some things have been slightly renamed
- the crate is namespaced based on subsystem, e.g.
- users can opt into which subsystems to use based on cargo feature flags
- some functions have been refactored
- functions that need to persist data between calls are implemented as methods on 'collectors'
- platform specific functionality is hidden behind traits that need to be imported before used
- e.g. import
cpu::os::linux::ProcessExt to use Linux specific process functionality
- some types are different, for example:
- structs instead of named tuples
std::time::Duration instead of float for seconds
- enums instead of constants
- most struct fields have been replaced with getter methods to better enable platform based extensions