Linux View system CPU number, core book, Number of threads
Now that the number of CPU cores and threads is getting higher, this article will show you how to determine how many CPUs a server has, a few cores per CPU, and several threads per core.
To view the number of physical CPUs
grep ' physical id '/proc/cpuinfo | Sort-u
View number of cores
grep ' core ID '/proc/cpuinfo | Sort-u | Wc-l
To view the number of threads
grep ' Processor '/proc/cpuinfo | Sort-u | Wc-l
instance 1
command execution results, according to the results, this server has 1 cpu,6 cores, each core 2 threads, a total of 12 threads.
through Dmidecode can view the CPU model, according to the model can also find the specific parameters of the CPU
650) this.width=650; "class=" Exp-image-default "alt=" Linux View system CPU count, core book, Number of Threads "src=" http://b.hiphotos.baidu.com/ Exp/w=500/sign=98b677afd62a60595210e11a1835342d/4a36acaf2edda3ccb560234600e93901203f92d4.jpg "style=" border:0px ; "/>
Example 2
Command execution results, according to the results, this server has 2 CPUs, each CPU4 core, each core 4 threads, a total of 16 threads.
The CPU model can be viewed by dmidecode and the specific parameters of this CPU can be found according to the model.
650) this.width=650; "class=" Exp-image-default "alt=" Linux View system CPU count, core book, Number of Threads "src=" http://f.hiphotos.baidu.com/exp/ W=500/sign=89de9bace7cd7b89e96c3a833f254291/b21bb051f81986186ba374e24bed2e738ad4e6f4.jpg "style=" border:0px; >
This article is from the "Crazy_sir" blog, make sure to keep this source http://douya.blog.51cto.com/6173221/1603936
Linux View system CPU number, core book, Number of threads