View CPU information in LINUX

Source: Internet
Author: User
Linux command: cat/proc/cpuinfo use the command to determine the number of physical CPUs and cores: number of logical CPUs: # cat/proc/cpuinfo | grepprocessor | wc-l number of physical CPUs: # cat/proc/cpuinfo | grepphysicalid | sort |...

 

Linux command: cat/proc/cpuinfo

 

Use commands to determine the number of physical CPUs and cores:

 

Logical CPU count:

# Cat/proc/cpuinfo | grep "processor" | wc-l

 

Number of physical CPUs:

# Cat/proc/cpuinfo | grep "physical id" | sort | uniq | wc-l

 

Number of cores in each physical CPU:

# Cat/proc/cpuinfo | grep "cpu cores" | wc-l

 

Is it hyper-threading?

If two logical CPUs have the same core id, hyper-threading is enabled.

 

The number of logical CPUs (possibly core, threads, or both) in each physical CPU:

# Cat/proc/cpuinfo | grep "siblings"

 

To sum up, read the physical CPU book, read physincal_id, and start from 0. then, check the number of cores of each CPU.

Core_id

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.