我需要对以下过程状态进行分类(从/ proc / [PID] / status获得)
作为
我最初的猜测:
1:R (running)
2:S (sleeping)
3:D (disk sleep)
3:T (stopped)
3:T (tracing stop)
4:Z (zombie)
4:X (dead)
这是对的吗?
答案 0 :(得分:2)
来自fs / proc / array.c:
static const char * const task_state_array[] = {
"R (running)", /* 0 */
"S (sleeping)", /* 1 */
"D (disk sleep)", /* 2 */
"T (stopped)", /* 4 */
"t (tracing stop)", /* 8 */
"Z (zombie)", /* 16 */
"X (dead)", /* 32 */
"x (dead)", /* 64 */
"K (wakekill)", /* 128 */
"W (waking)", /* 256 */
};