From 31b71b67011fa52f091df6fe536a11d6d0bfb256 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 25 Jul 2016 18:25:28 +0200 Subject: Imported Upstream version 2.0.2 --- freebsd/FreeBSDProcessList.c | 6 +----- freebsd/Platform.c | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'freebsd') diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 241bee2..b58e6e6 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -427,7 +427,7 @@ void ProcessList_goThroughEntries(ProcessList* this) { int cpus = this->cpuCount; int count = 0; - struct kinfo_proc* kprocs = kvm_getprocs(fpl->kd, KERN_PROC_ALL, 0, &count); + struct kinfo_proc* kprocs = kvm_getprocs(fpl->kd, KERN_PROC_PROC, 0, &count); for (int i = 0; i < count; i++) { struct kinfo_proc* kproc = &kprocs[i]; @@ -495,10 +495,6 @@ void ProcessList_goThroughEntries(ProcessList* this) { isIdleProcess = true; } } - if (isIdleProcess == false && proc->percent_cpu >= 99.8) { - // don't break formatting - proc->percent_cpu = 99.8; - } proc->priority = kproc->ki_pri.pri_level - PZERO; diff --git a/freebsd/Platform.c b/freebsd/Platform.c index 4185a8b..f02daa5 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -163,15 +163,15 @@ double Platform_setCPUValues(Meter* this, int cpu) { double percent; double* v = this->values; - v[CPU_METER_NICE] = cpuData->nicePercent * cpus; - v[CPU_METER_NORMAL] = cpuData->userPercent * cpus; + v[CPU_METER_NICE] = cpuData->nicePercent; + v[CPU_METER_NORMAL] = cpuData->userPercent; if (this->pl->settings->detailedCPUTime) { - v[CPU_METER_KERNEL] = cpuData->systemPercent * cpus; - v[CPU_METER_IRQ] = cpuData->irqPercent * cpus; + v[CPU_METER_KERNEL] = cpuData->systemPercent; + v[CPU_METER_IRQ] = cpuData->irqPercent; Meter_setItems(this, 4); percent = v[0]+v[1]+v[2]+v[3]; } else { - v[2] = cpuData->systemAllPercent * cpus; + v[2] = cpuData->systemAllPercent; Meter_setItems(this, 3); percent = v[0]+v[1]+v[2]; } -- cgit v1.2.3