CentOS View CPU information (CPU model CPU number of CPUs is a few cores)

Source: Internet
Author: User
Tags centos

[1] Physical CPU: The number of CPUs on the slot in the actual server.

Number of physical CPUs: There are several physical IDs that can be counted without duplicates.

[2] Logical CPU

Linux users are certainly not unfamiliar with the/proc/cpuinfo file. It is used to store CPU hardware information.
The information content lists the specifications of the processor 0–n respectively. Notice here that if you think n is the real number of CPUs, it's a big mistake.

In general, we think that a CPU can have multi-core, plus Intel's Hyper-Threading Technology (HT), which can logically be divided into a second number of CPU core out

Logical CPUs = number of physical CPUs x CPU cores This metric value x 2 (if HT is supported and turned on)
Note: Linux top view CPU is also the number of logical CPUs


[3] CPU Kernel Count

The number of chipsets that can process data on a single CPU, such as the current i5 760, is a dual-core four-thread CPU, and i5 2250 is a quad-core four-threaded CPU
In general, the number of physical CPUs x per kernel should equal the number of logical CPUs, if not equal, the server's CPU support Hyper-Threading Technology

2. View CPU Information

When we cat/proc/cpuinfo, CPUs with the same core ID are the same core hyper-threading, and CPUs with the same physical IDs are threads or cores encapsulated by the same CPU.

3, the following examples illustrate

[0] View CPU model

The code is as follows Copy Code
# Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c
Intel (R) Xeon (r) CPU E5620 @ 2.40GHz

[1] View the number of physical CPUs

The code is as follows Copy Code

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

[2] View the number of logical CPUs

The code is as follows Copy Code

# Cat/proc/cpuinfo |grep "Processor" |wc-l
16

[3] View CPU is a few cores

The code is as follows Copy Code

# cat/proc/cpuinfo |grep "Cores" |uniq
4

I am here should be 2 CPU, each CPU has 4 core, is Intel's U, support Hyper-threading, so show 16

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.