proc-tree 0.2.0

Linux process tree: snapshot, incremental maintenance via fork/exec events, ancestry chain queries, PID reuse detection
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Data types for the process tree.

/// Process info for a single PID.
#[derive(Clone, Debug)]
pub struct ProcessInfo {
    /// Command name (from `/proc/{pid}/comm`).
    pub cmd: String,
    /// Username (from UID lookup via `/etc/passwd`).
    pub user: String,
    /// Parent PID.
    pub ppid: u32,
    /// Thread group ID.
    pub tgid: u32,
    /// Process start time in nanoseconds since boot.
    /// Used for PID reuse detection.
    pub start_time_ns: u64,
}