summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorVladimir Panteleev <git@thecybershadow.net>2018-01-14 09:08:20 +0000
committerHisham Muhammad <hisham@gobolinux.org>2018-02-04 16:44:21 +0100
commit87be623eac49676ef0ac8e95733308dc12e37582 (patch)
treebc1b21599a7258865b2eb1800da791b11fe32745 /linux
parentb27712181aa27ae1e993f1a505c8e3717e709244 (diff)
Add support for Linux TASK_IDLE
Linux commit 06eb61844d841d0032a9950ce7f8e783ee49c0d0 ("sched/debug: Add explicit TASK_IDLE printing") exposes kthreads idling using TASK_IDLE in procfs as "I (idle)". Until now, when sorting the STATE ("S") column, htop used the raw value of the state character for comparison, however that led to the undesirable effect of TASK_IDLE ('I') tasks being sorted above tasks that were running ('R'). Thus, explicitly recognize the idle process state, and sort it below others.
Diffstat (limited to 'linux')
-rw-r--r--linux/LinuxProcess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index 72408cfa..39b5647e 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -155,7 +155,7 @@ ProcessFieldData Process_fields[] = {
[0] = { .name = "", .title = NULL, .description = NULL, .flags = 0, },
[PID] = { .name = "PID", .title = " PID ", .description = "Process/thread ID", .flags = 0, },
[COMM] = { .name = "Command", .title = "Command ", .description = "Command line", .flags = 0, },
- [STATE] = { .name = "STATE", .title = "S ", .description = "Process state (S sleeping, R running, D disk, Z zombie, T traced, W paging)", .flags = 0, },
+ [STATE] = { .name = "STATE", .title = "S ", .description = "Process state (S sleeping, R running, D disk, Z zombie, T traced, W paging, I idle)", .flags = 0, },
[PPID] = { .name = "PPID", .title = " PPID ", .description = "Parent process ID", .flags = 0, },
[PGRP] = { .name = "PGRP", .title = " PGRP ", .description = "Process group ID", .flags = 0, },
[SESSION] = { .name = "SESSION", .title = " SID ", .description = "Process's session ID", .flags = 0, },

© 2014-2024 Faster IT GmbH | imprint | privacy policy