Releases: eminence/procfs
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
v0.15.1
v0.15.0
New Features
- Add /proc/iomem by @tatref in #216
- Add new functions to read various net files for a specific process by @eminence in #226
- add /proc/kpageflags by @tatref in #233
- Enable oppportunistic fd counting fast path by @bobrik in #234
- add /proc/kpagecount by @tatref in #232
- Add new
/proc/meminfo
fields. by @afranchuk in #238 - impl Hash for kernel version by @tatref in #240
Bug fixes
- fix chrono::Local::timestamp deprecated in chrono 0.4.23 by @tatref in #220
- Fix some minor documentation issues by @eminence in #225
- Fixes the reported path when a task's function returns an error by @eminence in #230
- fix shm size type by @tatref in #243
Breaking changes
- ticks_per_second and page_size are infallible by @eminence in #235
- parse uid for /proc/net/{tcp,udp} by @trinity-1686a in #231
- Refactor and expose memory map processing. by @afranchuk in #237
New Contributors
- @trinity-1686a made their first contribution in #231
- @afranchuk made their first contribution in #238
Full Changelog: v0.14.2...v0.15.0
MSRV Note
This v0.15
release is only tested against the latest stable rust compiler, but is known to work with older versions (down to rust 1.48). Support for these older compilers may break in procfs
patch releases. See also #223
v0.14.2
New Features
- Process: Namespace: Use openat instead of building a path by @arilou in #192
- add serde serialize/deserialize derives for public types by @eliad-wiz in #193
- Disabling default features on the
chrono
crate by @Will-Low in #210 - Implement smaps_rollup by @TaborKelly in #214
Bug fixes
- Don't consider Zombies to be alive by @eminence in #198
- Fix doc and clippy warnings by @tatref in #219
- Fix memfd fd target by @trtt in #209
- Fix process iterator when used with a custom root by @ludo-c in #204
Dependency Updates
- Update to rustix 0.36. by @sunfishcode in #215
- Bump chorono to 0.4.20 by @pinkforest in #194
Full Changelog: v0.14.0...v0.14.2
v0.14.1
v0.13.3
v0.14.0
Breaking changes
New features
- Add suport for /proc/[pid]/task/[tid]/children by @zmjackson in #180
- Add 'from_reader' for LoadAverage struct by @ludo-c in #191
Other changes
- Fix build.rs to allow cross-compilation by @eminence in #187
- Document MSRV in Cargo.toml by @eminence in #189
- Add some docs on the Process object by @eminence in #190
Full Changelog: v0.13.2...v0.14.0
v0.13.2
v0.13.1
Bug fixes
Note: This fix is technically a breaking change, as the return value for a public API changed from HashMap<u32, u32>
to HashMap<u64, u64>
. However, since this function has been 100% broken for 4 years, I feel confident that no one is actually using this API.
New features
Other improvements
- Remove obsolete document about stat field by @dalance in #177
- Small update to doc comment on fd_count() by @eminence in #183
Full Changelog: v0.13.0...v0.13.1
v0.13.0
Breaking changes
This release has several breaking API changes you should be aware of:
- MSRV has been changed from 1.34 to 1.48
- The
Process
struct has been changed in some important ways:- Internally, it now maintains a handle to an opened
/proc/<pid>
directory. So eachProcess
will have an open file handle, which can matter in extreme cases when you have a large number ofProcess
objects created. - Because each
Process
has a handle to its opened proc directory, there is no longer any PID reuse problems (that is, there is no risk of accidentally getting process information for a new process that has reused a PID) Process
no longer implementsClone
.Process
no longer has a public memberstats
member that gets pre-populated on construction. If you want this info, you now need to explicitly call theProcess::stat()
function
- Internally, it now maintains a handle to an opened
New features
- Revive RFC: Change Process to use directory fd by @sunfishcode in #171
- Add support for
/proc/<pid>/pagemap
by @EliaGeretto in #166 - Process: Add support for network by @arilou in #176
Internal changes
- Add build-script to provide a nicely readable error if on unsupported platform by @macisamuele in #167
- Fix a race condition in the
test_task_runsinglethread
test. by @sunfishcode in #169 - Bump MSRV to 1.42 by @eminence in #170
- Update github-actions configuration to run all the github actions up to completion by @macisamuele in #172
- Improve
CpuInfo
performances by @macisamuele in #168 - Build with cargo update -Z minimal-versions by @xfix in #173
- Update to the latest rustix version by @eminence in #174
- Clippy and rustfmt fixes by @eminence in #175
Full Changelog: v0.12.0...v0.13.0