Fix display of idle processes, which had been broken since rev. 1.56 of
machine.c. The traditional condition was (pctcpu > 0 || SRUN), but the negation of the condition logic (from select to skip) made this come out as (pctcpu > 0 && SRUN), leading to a very erratic display, except for purely CPU bound processes. This has been discussed in the mail lists some time ago and I have used top with this patch on my systems for more than a year without problems (just forgot to commit it earlier, since my systems were all fixed ...).
This commit is contained in:
parent
6d3d5db831
commit
d1b76f3f6e
@ -603,7 +603,8 @@ get_process_info(struct system_info *si, struct process_select *sel,
|
||||
continue;
|
||||
|
||||
if (displaymode == DISP_CPU && !show_idle &&
|
||||
(pp->ki_pctcpu == 0 || pp->ki_stat != SRUN))
|
||||
(pp->ki_pctcpu == 0 ||
|
||||
pp->ki_stat == SSTOP || pp->ki_stat == SIDL))
|
||||
/* skip idle or non-running processes */
|
||||
continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user