Pcornel
Linux · Processes

Process States

Cheat sheet · https://pcornel.dk/topic.php?topic=2717

Back to the Topic

Answer

Process states in ps STAT: R running/runnable, S sleeping (waiting for an event), D uninterruptible sleep (usually I/O), T stopped, Z zombie, I idle kernel thread. Extra flags: s session leader, + foreground, < high priority, N low priority.

Remember

Many processes in D state usually mean storage or NFS problems and raise the load average without CPU use. Zombies need their parent fixed. T means stopped by a signal or debugger.

First checks

  • ps -eo pid,ppid,user,stat,%cpu,%mem,etime,cmd --sort=-%cpu | head — processes by CPU with parent and state
  • pstree -p <pid> — process tree
  • top / htop — live CPU and memory
  • cat /proc/<pid>/status — state, threads and memory of one process

Verify in this order

running (R) ↔ waiting (S/D) → stopped (T) by signal → exit → zombie (Z) until reaped

Where it usually breaks

First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2717

Confirmation

Confirm action

Continue?