[PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top

Sergey Kandaurov pluknet at gmail.com
Fri May 27 15:46:35 UTC 2011


On 27 May 2011 18:46, John Baldwin <jhb at freebsd.org> wrote:
> Some times in top, I don't want to see all the per-CPU idle threads but
> instead focus on the non-idle threads that are running.  Especially on a
> system with a lot of CPUs, the idle threads can push all the interesting
> threads off of the list.  This patch adds a new 'z' flag (gratuitously chosen
> letter) and interactive command to toggle the display of the system idle
> process.  Patch is tested against 8, but should work fine on HEAD too:

Works on HEAD as well. I like this idea.
Perhaps it could be combined with i key?

> @@ -1075,7 +1081,13 @@
>                                reset_display();
>                                putchar('\r');
>                                break;
> -
> +                           case CMD_kidletog:
> +                               ps.kidle = !ps.kidle;
> +                               new_message(MT_standout | MT_delayed,
> +                                   " %sisplaying kernel idle process.",

> +                                   ps.idle ? "D" : "Not d");
^^
typo: s/idle/kidle/


-- 
wbr,
pluknet


More information about the freebsd-current mailing list