Expand description
CPU time spent by a process and everything it spawned, read from /proc.
A test binary running one long test prints nothing until that test ends, so silence alone cannot tell a stuck run from a busy one. The hang the watchdog exists for sat idle on a socket; a run burning CPU is making progress.
Structsยง
- Stat ๐
Constantsยง
- TICKS_
PER_ SECOND /procreports CPU time inUSER_HZticks, fixed at 100 by the kernel ABI.
Functionsยง
- group_
members - Live members of the process group
pgid, the leader included. - parse ๐
- A
/proc/<pid>/statline. The command name sits in parentheses and may itself hold spaces and parentheses, so fields are counted after the last). - read_
stats ๐ - tree_
ticks - User plus system ticks of
rootand all its live descendants, each with the ticks of its reaped children rolled up, so a finished process does not make the total fall.