View CPU configuration information under Linux __linux

Source: Internet
Author: User

Enter command: Cat/proc/cpuinfo

See the output of the physical ID there are several, if the display 0, then there is only one physical CPU;

View output processor There are several, if there are 0 and 12, so there are two logical CPUs.
(i) Conceptual
① Physical CPU
Number of CPUs on slots in actual server
Number of physical CPUs, several physical IDs can be counted
② Logical CPU
/proc/cpuinfo used to store CPU hardware information.
The information content lists the specification of processor 0–processor N respectively. Note here that n is the logical number of CPUs
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
③CPU Nuclear number
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
(ii) View CPU information
When we cat/proc/cpuinfo,
CPUs with the same core ID are the same core Hyper-threading
CPUs with the same physical ID are threads or cores encapsulated by the same CPU
(iii) The following examples illustrate
① 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
③ View CPU is a few cores
#cat/proc/cpuinfo |grep "Cores" |uniq
6
I am here should be 2 CPU, each CPU has 6 core, should be Intel's U, support Hyper-threading, so show 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.