summaryrefslogtreecommitdiffstats
path: root/usr.bin/top/machine.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2011-05-31 21:22:44 +0000
committerattilio <attilio@FreeBSD.org>2011-05-31 21:22:44 +0000
commitbc4d32e80bd81ea96c4c2544ab36f7e8caa777b7 (patch)
treec72d5598fc48383e545ddbc1e8438d9245766ca9 /usr.bin/top/machine.c
parent27825059cd2a1ad6c708ee2089f7e182c12e84b1 (diff)
downloadFreeBSD-src-bc4d32e80bd81ea96c4c2544ab36f7e8caa777b7.zip
FreeBSD-src-bc4d32e80bd81ea96c4c2544ab36f7e8caa777b7.tar.gz
MFC
Diffstat (limited to 'usr.bin/top/machine.c')
-rw-r--r--usr.bin/top/machine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index f98f64e..4c55682 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -624,6 +624,7 @@ get_process_info(struct system_info *si, struct process_select *sel,
int show_system;
int show_uid;
int show_command;
+ int show_kidle;
/*
* Save the previous process info.
@@ -664,6 +665,7 @@ get_process_info(struct system_info *si, struct process_select *sel,
show_system = sel->system;
show_uid = sel->uid != -1;
show_command = sel->command != NULL;
+ show_kidle = sel->kidle;
/* count up process states and get pointers to interesting procs */
total_procs = 0;
@@ -705,6 +707,11 @@ get_process_info(struct system_info *si, struct process_select *sel,
/* skip idle or non-running processes */
continue;
+ if (displaymode == DISP_CPU && !show_kidle &&
+ pp->ki_tdflags & TDF_IDLETD)
+ /* skip kernel idle process */
+ continue;
+
if (displaymode == DISP_IO && !show_idle && p_io == 0)
/* skip processes that aren't doing I/O */
continue;
OpenPOWER on IntegriCloud