View CPU information on Linux

Source: Internet
Author: User

I. Description of the Order

CPU-related information is viewed from the/proc/cpuinfo file, and the following commands are viewed:

View the number of physical CPUs Cat/proc/cpuinfo | grep "Physical ID" | Uniq | Wc-l View CPU Cores Cat/proc/cpuinfo | grep "CPU Cores" |uniq see the number of processors in the CPU Cat/proc/cpuinfo | grep "Processor" | Wc-l


Second, examples

1. The following command executes the machine's CPU configuration:

2 physical CPUs, 4 cores 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/73/1F/wKioL1X2NV_g3_ Ltaaglintixzy162.jpg "title=" virtual machine configuration. jpg "alt=" wkiol1x2nv_g3_ltaaglintixzy162.jpg "/>


2. View the number of physical CPUs 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/22/wKiom1X2M9bxu-gJAAR87GANx6Q445.gif "titl E= "Cpu-physical-num.gif" alt= "Wkiom1x2m9bxu-gjaar87ganx6q445.gif"/>

3. View the number of cores on each CPU

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/20/wKioL1X2O77TvQiDAAMzwD_QoX4382.gif "title=" Cpu-cores-num.gif "alt=" Wkiol1x2o77tvqidaamzwd_qox4382.gif "/>

4. View the number of logical CPUs

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/22/wKiom1X2NICwJiinAAK5AMeakKc717.gif "title=" Cpu-processor-num.gif "alt=" Wkiom1x2nicwjiinaak5ameakkc717.gif "/>


Iii. Summary

The following is a Dell server configuration that uses Intel's E5520 CPU

Physical CPU Number = Number of processor slots = 2

Number of cores per CPU = number of cores per slot = 4

Processor total number of cores =2*4=8


The Hyper-Threading is active in the figure, and the CPU uses Hyper-Threading technology, so there are two logical processors in one core.

Number of logical processors = Total cores


The machine executing the command instance above does not have hyper-threading technology, so the number of cores and logical processing is equal, and Dell is twice times the relationship.


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/22/wKiom1X2NtTwgECfAAFbDU_uYrs479.jpg "title=" example. jpg "alt=" Wkiom1x2nttwgecfaafbdu_uyrs479.jpg "/>


This article is from "Linux Novice learning" blog, please be sure to keep this source http://xzb2015.blog.51cto.com/8796643/1694503

View CPU information on Linux

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.