First, the concept
① Physical CPU
The number of CPUs in the actual server slot on the physical CPU, the number of physical IDs that can be repeated is several
② Logical CPU
③CPU Number of cores
The number of chipsets that can process data on a CPU, such as the current i5 760, is a dual-core four-thread CPU, while i5 2250 is a quad-core four-thread CPU
Second, view CPU information
① View the number of physical CPUs
#cat/proc/cpuinfo |grep "Physical id" |sort |uniq|wc-l
② View the number of logical CPUs (also the number of threads)
#cat/proc/cpuinfo |grep "Processor" |wc-l
③ View CPU is a few cores
#cat/proc/cpuinfo |grep "Cores" |uniq
④ Viewing CPU information (model)
Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c
Note:
#逻辑CPU数量 = number of physical CPUs x CPU cores
# total number of cores = number of physical CPUs X number of cores per physical CPU
# Total Logical CPUs = number of physical CPUs x number of cores per physical CPU X number of hyper-threads (2)
[[email protected] ~]$ cat/proc/cpuinfo |grep "Physical ID" |sort |uniq|wc-l2[[email protected] ~]$ cat/proc/cpuinfo |gr EP "Cores" |UNIQCPU cores
Number of logical CPU cores for the physical CPU