I am using htop on osx and I can't seem to find out what a 'C' status in the 'S' status column means for a process status.
What does a C process status mean in htop?
I am using htop on osx and I can't seem to find out what a 'C' status in the 'S' status column means for a process status.
What does a C process status mean in htop?
Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:
Source:
man ps
I've got the same question recently. We can try to look it up in the htop sources:
So we go to Unix definition of process states at /usr/include/sys/proc.h:
So, 'C' status is meant to be 'Process being created by fork'. What is it? According to old unix sources, it's a transient state that happens when there's not enough memory when forking a process and the parent needs to be swapped out.
What??
Back to htop source. Where do we get the
ki->state
?We have the following (messed up) mapping:
So, the real answer is: 'C' means that the process is currently running.
How did it happen? Seems that the
ki->state
handling was borrowed fromps
source and wasn't adjusted for Unix process codes.Update: this bug is fixed. Yay open source!
htop author here. I am not aware of such status code in the htop codebase. Keep in mind that htop is written for Linux only, so there is no support for macOS/OSX. When I hear of people running it on OSX they are often using an outdated, unsupported fork (the latest version of htop is 2.0.1, including macOS support).