mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
FreeBSD: improve actual processor calculation logic
This commit is contained in:
parent
73f5ecf528
commit
5afb57b49e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user