Skip to main content

parse_proc_entry

Function parse_proc_entry 

Source
pub fn parse_proc_entry(pid: u32) -> Option<ProcessInfo>
Expand description

Parse /proc/{pid}/status and /proc/{pid}/cmdline into a ProcessInfo.

The cmd field is populated from /proc/{pid}/cmdline (full command line with arguments), falling back to the Name: field from /proc/{pid}/status (truncated to 15 chars) for kernel threads where cmdline is empty.

Returns None if the process doesn’t exist or the status file can’t be read.

§Internal Usage

This function is used internally by: