diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 628956d1..2e937669 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -572,7 +572,11 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { proc->percent_cpu = 100.0 * ((double)kproc->ki_pctcpu / (double)kernelFScale); proc->percent_mem = 100.0 * proc->m_resident / (double)(super->totalMem); - proc->processor = kproc->ki_lastcpu; + if (kproc->ki_stat == SRUN && kproc->ki_oncpu != NOCPU) { + proc->processor = kproc->ki_oncpu; + } else { + proc->processor = kproc->ki_lastcpu; + } proc->majflt = kproc->ki_cow;