Skip to main content

Module proc

Module proc 

Source
Expand description

Raw /proc reading for process tree construction.

Only contains functions needed to build and maintain the process tree: comm (cmd name), status (ppid/user/tgid), stat (start_time), uid lookup.

Functionsยง

parse_proc_entry
Parse /proc/{pid}/status into a (PidNode, ProcInfo) pair.
read_proc_comm
Read the command name for a PID from /proc/{pid}/comm.
read_proc_start_time_ns
Read the process start time in nanoseconds from /proc/{pid}/stat.
uid_to_username
Convert a UID to a username by looking up /etc/passwd.