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 CPU
4. Check the CPU frequency
#cat/proc/cpuinfo |grep Mhz|uniq CPU
# uname-a
(view current operating system kernel information)
# cat/etc/issue
(View current operating system release information)
# Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c
# 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)
How to obtain detailed information about the CPU:
Linux command: Cat/proc/cpuinfo
Use the command to determine several physical CPUs, several cores, etc.:
Number of logical CPUs:
# Cat/proc/cpuinfo | grep "Processor" | Wc-l
Number of physical CPUs:
# Cat/proc/cpuinfo | grep "Physical ID" | Sort | Uniq | Wc-l
Number of cores per physical CPU:
# Cat/proc/cpuinfo | grep "CPU Cores" | Wc-l
Is it hyper-threading?
If there are two logical CPUs with the same "core ID", then Hyper-threading is turned on.
The number of logical CPUs (possibly cores, threads, or both) in each physical CPU: # Cat/proc/cpuinfo | grep "Siblings"
Siblings:8
1. View CPU Information commands
Cat/proc/cpuinfo
2. View memory Information commands
Cat/proc/meminfo
3. View the hard drive information command
Fdisk-l
This article is from the "My Ops Road" blog, so be sure to keep this source http://pythonhome.blog.51cto.com/10015972/1622616
Linux to determine the number of CPU physics, a few cores