Linux View system CPU number, core book, Number of threads

Source: Internet
Author: User

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.


  1. To view the number of physical CPUs

    grep ' physical id '/proc/cpuinfo | Sort-u


  2. View number of cores

    grep ' core ID '/proc/cpuinfo | Sort-u | Wc-l


  3. To view the number of threads

    grep ' Processor '/proc/cpuinfo | Sort-u | Wc-l


  4. 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 ; "/>

  5. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.