Skip to main content

read_thread_stat

Function read_thread_stat 

Source
pub fn read_thread_stat(
    root: &Path,
    pid: Pid,
    tid: Pid,
) -> Option<(CommBuf, StatFields)>
Expand description

Read stat for one thread of pid.

/proc/<pid>/task/<tid>/stat is the same format as a process’s stat, with the thread’s own CPU counters. The identity files (status, cmdline) are per-process, so a thread row reuses its leader’s.