Rust library for reading the Linux procfs filesystem
OTHER License
Bot releases are hidden (Show)
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
Full Changelog: https://github.com/eminence/procfs/compare/v0.15.1...v0.16.0
Published by eminence over 1 year ago
Full Changelog: https://github.com/eminence/procfs/compare/v0.15.0...v0.15.1
Published by eminence over 1 year ago
/proc/meminfo
fields. by @afranchuk in https://github.com/eminence/procfs/pull/238
Full Changelog: https://github.com/eminence/procfs/compare/v0.14.2...v0.15.0
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
Published by eminence almost 2 years ago
chrono
crate by @Will-Low in https://github.com/eminence/procfs/pull/210
Full Changelog: https://github.com/eminence/procfs/compare/v0.14.0...v0.14.2
Published by eminence about 2 years ago
Full Changelog: https://github.com/eminence/procfs/compare/v0.14.0...v0.14.1
Published by eminence about 2 years ago
Full Changelog: https://github.com/eminence/procfs/compare/v0.13.2...v0.13.3
Published by eminence about 2 years ago
Full Changelog: https://github.com/eminence/procfs/compare/v0.13.2...v0.14.0
Published by eminence over 2 years ago
all_processes_with_root
. by @sunfishcode in https://github.com/eminence/procfs/pull/184
Published by eminence over 2 years ago
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.
Full Changelog: https://github.com/eminence/procfs/compare/v0.13.0...v0.13.1
Published by eminence over 2 years ago
This release has several breaking API changes you should be aware of:
Process
struct has been changed in some important ways:
/proc/<pid>
directory. So each Process
will have an open file handle, which can matter in extreme cases when you have a large number of Process
objects created.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 implements Clone
.Process
no longer has a public member stats
member that gets pre-populated on construction. If you want this info, you now need to explicitly call the Process::stat()
function/proc/<pid>/pagemap
by @EliaGeretto in https://github.com/eminence/procfs/pull/166
test_task_runsinglethread
test. by @sunfishcode in https://github.com/eminence/procfs/pull/169
CpuInfo
performances by @macisamuele in https://github.com/eminence/procfs/pull/168
Full Changelog: https://github.com/eminence/procfs/compare/v0.12.0...v0.13.0
Published by eminence almost 3 years ago
The flate2
dependencies was used only in the kernel_config
method, which would try to read a compressed /proc/config.gz
file if it existed. The flate2
dependency is now optional (and enabled by default). If you are using procfs with "default-features = false" and you are using the kernel_config
method, pay special attention here -- you might want to manually enable the flate2
feature.
Full Changelog: https://github.com/eminence/procfs/compare/v0.11.0...v0.12.0
Published by eminence almost 3 years ago
Published by eminence about 3 years ago
procfs
panic even less, but as the cost of a breaking API change that wraps the return value of some functions in a Result
Full Changelog: https://github.com/eminence/procfs/compare/v0.10.1...v0.11.0
Published by eminence about 3 years ago
Note The v0.10.1 release was actually released August 26, 2021. This release created in github was done after the fact
Full Changelog: https://github.com/eminence/procfs/compare/v0.10.0...v0.10.1
Published by eminence about 3 years ago
Published by eminence almost 4 years ago
Please note that this are several API incompatible changes, compared to the 0.8.x release. Also, the Minimum Supported Rust Version has been changed from 1.33.0 to 1.34.0
/proc/[pid]/task/[tid]/status
(#110)Published by eminence about 4 years ago
(Released September 8, 2020)
Process::task_main_thread
to get the task for the main thread (#93)Task::Io()
(#91)/proc/cpuinfo
on systems that add extra info at the end of the file (like on a Raspberry Pi) (#92)Published by eminence over 4 years ago
Several new sysctl functions are added, in the following areas:
Support for parsing new files, in the following areas:
Published by eminence over 4 years ago
New Features:
Published by eminence over 4 years ago
New features:
starttime
()). #64Bug fixes: