A process and system monitoring library for Rust, heavily inspired by the psutil module for Python.
Add this to your Cargo.toml
:
[dependencies]
psutil = "4.0.0"
Or to only use certain submodules:
[dependencies]
psutil = { version = "4.0.0", default-features = false, features = ["cpu", "process"] }
This project is not well maintained, and there are a host of other projects that may meet your needs better. rust-psutil started as a university student's project before the Rust 1.0 release (all the way back in January 2015!), and has had irregular maintenance by a small group of developers since then.
There's no intent to archive it any time soon, as there are still projects using rust-psutil and we get the occasional pull request to implement a new feature. Open a discussion if you'd be interested in helping maintain it, ideally after you've made one or two contributions.
See "Related Projects" below for a list of projects that overlap with rust-psutil's functionality. Hiem has a comparison between Rust libraries with similar functionality: https://github.com/heim-rs/heim/blob/master/COMPARISON.md.
The API is relatively unstable. The version number attempts to follow semantic versioning, and you should major version bumps to include multiple breaking changes—most significant new features added to rust-psutil required adjusting existing APIs.
Currently, only Linux and macOS are supported at all.
platform-support.md details the implementation level of each platform.
† Direct dependencies.
- Rust
- Golang
- Python
You can also see GitHub's list of dependents.
Released under the MIT license—see LICENCE.