Timo Buhrmester wrote: > On Sun, Sep 06, 2015 at 06:34:39PM -0400, Michael McConville wrote: > > When building software, you usually have a lot of compiler processes > > coming and going. The CPU utilization stats (in the header) are more > > averaged than the process list stats. So, when building you're likely to > > see a lot of CPU utilization in the per-CPU stats but no offending > > process in the list. > > Hm, I guess that would explain the low apparent CPU usage *if* processes are > shown in top(1)'s list, but most of the time, the list (of non-idle > processes) was empty. That still strikes me as odd, because regardless of > averaging, there's definitely a few processes running or runnable at any > given time, while compiling. > Or does top(1) do a second pass to verify a process is still alive, before > printing it (but after getting the statistics in the first place)?
The minutiae of process cpu% calculations are in sys/kern/sched_bsd.c

