v0.16.0
This release contains a fairly large internal restructuring, which has noticeable public API changes. A lot of core functionality has been brought into a new procfs-core
crate that contains platform-independent data structures and parsing. This crate can be used on all platforms. The procfs
crate now depends on procfs-core
, and contains all of the Linux-specific code (and thus remains only usable on Linux).
Some procfs
functions require information about the running system. For example, the rss_bytes()
function needs to know the page size. These functions now have a more complicated API. See the docs for more information, but generally you now have to add a call to .get()
, for example:
Old:
let prc = procfs::process::Process::myself().unwrap();
let stat = prc.stat().unwrap();
println!("RSS: {} bytes", stat.rss_bytes());
New:
use procfs::prelude::*; // to bring `WithCurrentSystemInfo` into scope
let prc = procfs::process::Process::myself().unwrap();
let stat = prc.stat().unwrap();
println!("RSS: {} bytes", stat.rss_bytes().get());
We think this new complication is unavoidable, but if you have some thoughts on this, your ideas are welcome in a new issue or discussion thread
New Features
- Implementation of a split crate scheme. by @afranchuk in #257
- Add /proc/mounts by @tatref in #261
- add /proc/pid/clear_refs by @tatref in #268
- Implement some standard traits by @tatref in #254
- Support /proc/net/snmp and /proc/net/snmp6 by @wfly1998 in #281
- Add support for /proc/partitions parsing by @berrange in #286
Bug Fixes
- Don't hide process creation errors in all_processes by @tatref in #260
- Fix O_PATH for old kernels by @tatref in #266
Full Changelog: v0.15.1...v0.16.0