don't include offline CPUs in summary for OpenBSD

By default, OpenBSD disables SMT (hyperthreading) cpu pseudo-cores.
This can be changed at runtime by setting the hw.smt sysctl so they
may become active later, therefore they are still present in cpu
stat structures but are marked as offline.

As done with native top(1), this drops them from the cpu summary
graphs.
This commit is contained in:
Stuart Henderson
2021-03-27 13:26:26 +00:00
committed by Christian Göttsche
parent d63394b5f6
commit feec16cbb5
2 changed files with 30 additions and 2 deletions

View File

@ -35,6 +35,8 @@ typedef struct CPUData_ {
unsigned long long int spinPeriod;
unsigned long long int intrPeriod;
unsigned long long int idlePeriod;
int cpuIndex;
} CPUData;
typedef struct OpenBSDProcessList_ {