Expand description
Shared utilities used by the procutils workspace.
This crate is a support library, not an end-user tool — it exists to keep parsing, matching, and formatting logic in one place across the procutils binaries. Each module is small and self-contained:
fmt: human-readable size formatters (K/M/G/T).man: per-tool man-page content shared with the man-page generator.procmatch: process selection logic shared bypgrep,pkill,skill,snice— regex matching plus filters on PID, UID, parent, session, tty, run-state, environment, and more.signal: canonical signal-number/name table andparse_signalused bykill,pkill,skill.uid: UID-to-username lookups backed by/etc/passwd, with a small per-process cache.utmp: reader for theutmp(5)binary file format used by/var/run/utmp. The on-disk stride is computed fromlibc::utmpxso the parser stays correct across glibc architectures.
The API is not stable and may change without notice between releases. This crate is intended for internal use by the procutils workspace only.
Modules§
- fmt
- Human-readable size formatters.
- man
- Per-tool man page content shared with the man-page generator.
- procmatch
- Process selection logic shared by
pgrep,pkill,skill,snice. - signal
- Canonical signal table and signal-name parsing shared by
kill,pkill,skilland friends. - uid
- UID/username resolution backed by
/etc/passwd. - utmp
- Reader for the
utmp(5)binary file format used by/var/run/utmp.
Constants§
- MAX_
TERM_ WIDTH - Default maximum width for help-text wrapping in clap-derived CLIs.