How to view CPU configuration information in Linux, and how to view cpu configuration in linux

Source: Internet
Author: User

How to view CPU configuration information in Linux, and how to view cpu configuration in linux

Enter the command: cat/proc/cpuinfo

Check the number of physical IDs in the output result. If 0 is displayed, there is only one physical cpu;

Check the number of processor output results. If there are 0 and 1, there are two logical CPUs.

(1) Concepts

① Physical CPU

Number of CPUs in the actual Server slot

Number of physical CPUs, which can contain a few unique physical IDS

② Logical CPU

/Proc/cpuinfo is used to store cpu hardware information

The information lists the specifications of processor 0-processor n. Note that n is the number of logical CPUs.

In general, we think that a cpu can have multiple cores, and intel's hyper-Threading Technology (HT) can be logically split into multiple cpu cores.

Logical cpu count = physical cpu count x cpu cores specification value x 2 (if ht is supported and enabled)

Note: in Linux, the top view CPU is also the number of logical CPUs.

③ Number of CPU Cores

The number of chipsets that can process data on a CPU. For example, the current i5 760 is a dual-core four-thread CPU, while the i5 2250 is a four-core four-thread CPU.

In general, the number of physical CPUs × the number of each core should be equal to the number of logical CPUs. Otherwise, the CPU of the server supports hyper-Threading Technology.

(2) view CPU Information

When we cat/proc/cpuinfo,

CPU with the same core id is hyper-threading of the same core

A cpu with the same physical id is a thread or core encapsulated by the same CPU.

(3) examples below

① 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

24

③ Check the CPU Cores

# Cat/proc/cpuinfo | grep "cores" | uniq

6

Here I should have 2 CPUs, each of which has 6 cores, which should be Intel's U, supporting hyper-threading, so the display is 24

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.