Linux command: cat/proc/cpuinfo use the command to determine the number of physical CPUs and cores: number of logical CPUs: # cat/proc/cpuinfo | grepprocessor | wc-l number of physical CPUs: # cat/proc/cpuinfo | grepphysicalid | sort |...
Linux command: cat/proc/cpuinfo
Use commands to determine the number of physical CPUs and cores:
Logical CPU count:
# Cat/proc/cpuinfo | grep "processor" | wc-l
Number of physical CPUs:
# Cat/proc/cpuinfo | grep "physical id" | sort | uniq | wc-l
Number of cores in each physical CPU:
# Cat/proc/cpuinfo | grep "cpu cores" | wc-l
Is it hyper-threading?
If two logical CPUs have the same core id, hyper-threading is enabled.
The number of logical CPUs (possibly core, threads, or both) in each physical CPU:
# Cat/proc/cpuinfo | grep "siblings"
To sum up, read the physical CPU book, read physincal_id, and start from 0. then, check the number of cores of each CPU.
Core_id