25

In man page of ps under Process State Codes, the I flag (capital i) is not mentioned but ps aux shows the I flag in some processes as shown by the image below.

enter image description here

What does the I flag mean?

ilkkachu
  • 138,973
  • 5
    Please, DO NOT post pictures of text. Copying it out of terminal would have been much easier for both of us. – Maya Dec 23 '17 at 10:53

1 Answers1

39

It means “idle”. This state was introduced in version 4.14 of the Linux kernel, in September 2017. It is used for kernel threads which use the TASK_IDLE state when idling, instead of TASK_INTERRUPTIBLE; in previous versions of the kernel, such threads were reported as TASK_UNINTERRUPTIBLE which was confusing.

ps reports this without needing any change itself, because it reports the state directly from /proc.

Stephen Kitt
  • 434,908
  • What is the difference between those two states? – Thorbjørn Ravn Andersen Dec 22 '17 at 19:08
  • 2
    See this commit: uninterruptible tasks contribute to the load average, so idle kernel threads idled in interruptible state, but that caused some issues, so a new “no load” state was introduced, along with a helper “idle” state. The idle state was made reportable in the later patch linked in the answer. So basically “idle” is “uninterruptible” but doesn’t contribute to the load average. – Stephen Kitt Dec 22 '17 at 20:12
  • 1
    Also see htop source code - https://github.com/hishamhm/htop/blob/59166da773d8a9a97c8f1b087346865bc8cda9fa/linux/LinuxProcess.c#L163 [STATE] = { .name = "STATE", .title = "S ", .description = "Process state (S sleeping, R running, D disk, Z zombie, T traced, W paging, I idle)", .flags = 0, } – steve Apr 23 '21 at 16:50