//! Lightweight process diagnostics via `/proc/self`.
//!
//! These helpers are designed for periodic logging inside real-time loops.
//! They perform a single read per call and are cheap on Linux.
/// Count open file descriptors by reading `/proc/self/fd`.
/// Return resident set size in KiB by reading `/proc/self/statm`.
///
/// The second field of `statm` is RSS in pages. We multiply by the page
/// size (almost always 4 KiB on Linux).