Index: machine.c =================================================================== --- machine.c (revision 266123) +++ machine.c (working copy) @@ -650,6 +650,21 @@ } /* + * Return true if this process has used any CPU time since the + * previous update. + */ +static int +proc_used_cpu(struct kinfo_proc *pp) +{ + const struct kinfo_proc *oldp; + + oldp = get_old_proc(pp); + if (oldp == NULL) + return (pp->ki_runtime != 0); + return (pp->ki_runtime != oldp->ki_runtime); +} + +/* * Return the total number of block in/out and faults by a process. */ long @@ -765,7 +780,7 @@ continue; if (displaymode == DISP_CPU && !show_idle && - (pp->ki_pctcpu == 0 || + (!proc_used_cpu(pp) || pp->ki_stat == SSTOP || pp->ki_stat == SIDL)) /* skip idle or non-running processes */ continue;