mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 12:44:34 +03:00
OpenBSD: update
* Set process data for: - minflt - majflt - processor - nlwp * Drop unimplemented nlwp column * Scan userland threads * Mark a 'Thread is currently on a CPU.' with 'R', and processes 'Currently runnable' with 'P', do confine with man:ps(1) and Linux. See https://man.openbsd.org/ps.1 * Show CPU frequency
This commit is contained in:
@ -15,6 +15,8 @@ in the source distribution for its full text.
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/signal.h> // needs to be included before <sys/proc.h> for 'struct sigaltstack'
|
||||
#include <sys/proc.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/sensors.h>
|
||||
#include <sys/sysctl.h>
|
||||
@ -162,8 +164,7 @@ void Platform_getLoadAverage(double* one, double* five, double* fifteen) {
|
||||
}
|
||||
|
||||
int Platform_getMaxPid() {
|
||||
// this is hard-coded in sys/proc.h - no sysctl exists
|
||||
return 99999;
|
||||
return 2 * THREAD_PID_OFFSET;
|
||||
}
|
||||
|
||||
double Platform_setCPUValues(Meter* this, int cpu) {
|
||||
@ -196,6 +197,8 @@ double Platform_setCPUValues(Meter* this, int cpu) {
|
||||
|
||||
v[CPU_METER_TEMPERATURE] = NAN;
|
||||
|
||||
v[CPU_METER_FREQUENCY] = (pl->cpuSpeed != -1) ? pl->cpuSpeed : NAN;
|
||||
|
||||
return totalPercent;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user