py-cpuinfo
py-cpuinfo copied to clipboard
how to get threads?
like lscpu
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
There isn't a way to do it yet. I'm trying to make py-cpuinfo work consistently on every OS. Unfortunately there does not seem to be a way to do it on a vanilla Windows install.
> python3.7 -m cpuinfo
Python Version: 3.7.4.final.0 (64 bit)
Cpuinfo Version: 7.0.0
...
Count: 8
...
# MacBook ME293
> sysctl machdep.cpu.core_count
machdep.cpu.core_count: 4
> sysctl machdep.cpu.thread_count
machdep.cpu.thread_count: 8