Linux view machine is CPU is a few cores
Several CPUs
More/proc/cpuinfo |grep "Physical ID" |uniq|wc-l
Each CPU is a few cores (assuming the same CPU configuration)
More/proc/cpuinfo |grep "Physical id" |grep "0" |wc-l
Cat/proc/cpuinfo | grep processor
1. View the number of physical CPUs
#cat/proc/cpuinfo |grep "Physical id" |sort |uniq|wc-l
2. View the number of logical CPUs
#cat/proc/cpuinfo |grep "Processor" |wc-l
3. View CPU is a few cores
#cat/proc/cpuinfo |grep "Cores" |uniq
4. Check the CPU frequency
#cat/proc/cpuinfo |grep Mhz|uniq
# Cat/proc/cpuinfo | grep name | cut-f2-d: | uniq-c
8 Intel (R) Xeon (r) CPU E5410 @ 2.33GHz
(see 8 logical CPUs, also know the CPU model)
# Cat/proc/cpuinfo | grep physical | uniq-c
4 Physical id:0
4 Physical Id:1
(Description is actually two 4-core CPUs)
# getconf long_bit
32
(indicates that the current CPU is running in 32bit mode, but does not mean that the CPU does not support 64bit)
# Cat/proc/cpuinfo | grep flags | grep ' LM ' | wc-l
8
(The result is greater than 0, indicating support for 64bit calculations. LM refers to long mode, which supports LM is 64bit)
Linux CPU Related Information view