Skip to main content

proc_tree/
types.rs

1//! Data types for the process tree.
2
3/// Process info for a single PID.
4#[derive(Clone, Debug)]
5pub struct ProcessInfo {
6    /// Command name (from `/proc/{pid}/comm`).
7    pub cmd: String,
8    /// Username (from UID lookup via `/etc/passwd`).
9    pub user: String,
10    /// Parent PID.
11    pub ppid: u32,
12    /// Thread group ID.
13    pub tgid: u32,
14    /// Process start time in nanoseconds since boot.
15    /// Used for PID reuse detection.
16    pub start_time_ns: u64,
17}