mirror of
https://github.com/thewtex/tmux-mem-cpu-load.git
synced 2026-09-10 07:16:16 -04:00
openbsd: use actual number of cpus being used
This commit is contained in:
parent
67657e6312
commit
2107ea84f1
|
|
@ -27,7 +27,7 @@
|
|||
uint8_t get_cpu_count()
|
||||
{
|
||||
int cpu_count = 1; // default to 1
|
||||
int mib[2] = { CTL_HW, HW_NCPU };
|
||||
int mib[2] = { CTL_HW, HW_NCPUONLINE };
|
||||
size_t len = sizeof( cpu_count );
|
||||
|
||||
if( sysctl( mib, 2, &cpu_count, &len, NULL, 0 ) < 0 )
|
||||
|
|
|
|||
Loading…
Reference in a new issue