diff options
author | Daniel Lange <DLange@git.local> | 2016-07-25 18:25:28 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-07-25 18:25:28 +0200 |
commit | 31b71b67011fa52f091df6fe536a11d6d0bfb256 (patch) | |
tree | 31cb222871017376af8b7435d24cf4961863fa93 /freebsd | |
parent | 8c82a38002ce09db2a0b83dab8b598cf1ab0596c (diff) | |
download | debian_htop-31b71b67011fa52f091df6fe536a11d6d0bfb256.tar.gz debian_htop-31b71b67011fa52f091df6fe536a11d6d0bfb256.tar.bz2 debian_htop-31b71b67011fa52f091df6fe536a11d6d0bfb256.zip |
Imported Upstream version 2.0.2upstream/2.0.2
Diffstat (limited to 'freebsd')
-rw-r--r-- | freebsd/FreeBSDProcessList.c | 6 | ||||
-rw-r--r-- | freebsd/Platform.c | 10 |
2 files changed, 6 insertions, 10 deletions
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]; } |