Closed jmjoy closed 2 years ago
What value do you receive, and what do you expect?
Looks like num_cpus is doing everything correctly, it's just that your /proc/cpuinfo is very weird
physical id : 0
siblings : 12
core id : 5
cpu cores : 65532
Looks like num_cpus is doing everything correctly, it's just that your /proc/cpuinfo is very weird
physical id : 0 siblings : 12 core id : 5 cpu cores : 65532
Yes, it is.
Is it better to use lscpu
or libcpuid
to get linux physical cpus num?
Is this function: https://github.com/seanmonstar/num_cpus/blob/ae4492e91bd04a374905b7d62c60eea5f51c14f6/src/lib.rs#L200
I got a error count:
This is my
/proc/cpuinfo
: