1 min read

Linux: PROCESS STATE CODES

  1. D (uninterruptible sleep): The process is in uninterruptible sleep, usually waiting for I/O operations to complete.
  2. R (running or runnable): The process is either running or ready to run and is waiting for its turn on the CPU.
  3. S (interruptible sleep): The process is in interruptible sleep, waiting for an event to complete. It can be awakened by signals.
  4. T (stopped by job control signal): The process has been stopped (paused) by a job control signal.
  5. t (stopped by debugger during tracing): The process is stopped by a debugger during tracing.
  6. W (paging): Not valid since the 2.6.xx kernel. This state is no longer used.
  7. X (dead): The process is dead and should never be seen. This might indicate a bug.
  8. Z (zombie): The process is terminated but not reaped by its parent. It exists in the process table as a "zombie" until the parent acknowledges its termination.

For BSD formats and when using the stat keyword, additional characters may be displayed:

  1. < (high-priority): The process has high priority and may not be "nice" to other users.
  2. N (low-priority): The process has low priority and is "nice" to other users.
  3. L (has pages locked into memory): The process has pages locked into memory, often used for real-time and custom I/O.
  4. s (is a session leader): The process is a session leader.
  5. l (is multi-threaded): The process is multi-threaded, using CLONE_THREAD (such as NPTL pthreads).
  6. + (is in the foreground process group): The process is part of the foreground process group.