py-cpuinfo icon indicating copy to clipboard operation
py-cpuinfo copied to clipboard

how to get threads?

Open gMan1990 opened this issue 5 years ago • 2 comments

like lscpu

CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4

gMan1990 avatar Apr 28 '20 20:04 gMan1990

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.

workhorsy avatar Apr 29 '20 04:04 workhorsy

> 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

gMan1990 avatar Jan 13 '21 09:01 gMan1990