Linux View hardware Information-cpu

Source: Internet
Author: User

Linux View CPU
Cat/proc/cpuinfo

[Email protected]/]# Cat/proc/cpuinfo
processor:0 #逻辑处理器标识
Vendor_id:genuineintel #cpu供应商ID
CPU Family:6
Model:30
Model Name:intel (R) Xeon (r) CPU X3470 @ 2.93GHz
Stepping:5
CPU mhz:2926.061
Cache size:8192 KB
Physical ID:0 # Physical Processor identification
Siblings:8 # Indicates the number of logical processors located on this physical package. They may or may not support Hyper-Threading (HT) technology.
Core ID:0 # processor Kernel ID
CPU Cores:4 # Number of cores in a single physical processor
apicid:0
Initial apicid:0
Fdiv_bug:no #浮点除bug不支持
Hlt_bug:no
F00f_bug:no
Coma_bug:no
Fpu:yes #支持浮点运算
Fpu_exception:yes
CPUID level:11
Wp:yes
FLAGS:FPU VME de PSE TSC MSR PAE MCE cx8 APIC Sep MTRR PGE MCA cmov Pat PSE36 clflush DTS ACPI MMX FXSR SSE SS E2 SS HT TM PBE NX rdtscp LM constant_tsc Arch_perfmon pebs BTS pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 Sse4_2 popcnt lahf_lm Ida
# Lm-long mode 64-bit support LM is 64bit;vmx-intel virtualization support; SVM-AMD Virtualization support
# HT-Hyper-Threading
bogomips:5856.80
Clflush size:64
Power Management:
======================================

Physical ID Physical Processor ID
CPU cores The number of cores in the same physically encapsulated processor.
Processor Logical Processor Identification
Core ID Processor Core identity (the CPU with the same core ID is a hyper-thread of the same core.) )
APICID Interrupt Processor Identification
Siblings represents the number of logical processors located on this physical package. They may or may not support Hyper-Threading (HT) technology. The number of logical processors in the same physically encapsulated processor.

=======================================
# total number of cores = number of physical CPUs X number of cores per physical CPU
# Total Logical CPUs = number of physical CPUs x number of cores per physical CPU X number of hyper-threads

View the ID of a processor that has several physical CPUs (physical ID physically encapsulated. )
Determine the number of physical CPUs you can view the value of the physical ID, the same as the same physical
-----------------------------------------
#cat/proc/cpuinfo | grep ' Physical ID ' | Uniq-c
4 Physical id:0
4 Physical Id:1
(indicates there are 2 physical CPUs)


Instance:
View a few physical CPUs
# Cat/proc/cpuinfo | grep ' Physical ID ' | Uniq-c
8 Physical id:0
This server has 1 physical CPUs

# See the number of cores in each physical CPU (that is, the number of nuclei)
----------------------------------------
cat/proc/cpuinfo| grep "CPU Cores" | Sort-u
CPU Cores:4
This server CPU is 4 cores

# View the number of logical CPUs (processor logical processor ID)
------------------------------------------------
cat/proc/cpuinfo| grep "Processor" | Wc-l
8
This service has 8 logical CPUs (should be the above company logic cup= 1 4, but now 8, which means Hyper-threading)

CPUs with the same core ID are Hyper-threading of the same core.
To verify
[Email protected] ~]# Cat/proc/cpuinfo | grep ' Core ID '
Core id:0
Core Id:1
Core Id:2
Core Id:3
Core id:0
Core Id:1
Core Id:2
Core Id:3
So here are 1 physical CPUs, 4 cores, Hyper-threading supported, all display logical CPUs are 8

Supports 64-bit
# Cat/proc/cpuinfo | grep Flags | grep ' LM ' | Wc-l
8
(The result is greater than 0, indicating support for 64bit calculations. LM refers to long mode, which supports LM is 64bit)

The same principle Cat/proc/cpuinfo | grep "Information to look for"
CPU model, CPU MHZ, can query only add a filter pipeline grep


While hyper-Threading technology can execute two threads at the same time, it does not have separate resources for each CPU, as is the case with two real CPUs.
When two threads require a resource at the same time, one of them is temporarily stopped and the resources are given up until the resources are idle before they can continue.
Therefore, hyper-threading performance is not equal to the performance of two CPUs.


Look at the CPU details in full, but most of us don't care.
[Roo[email protected] ~] #dmidecode | grep ' Processor information '-B 1-a 54
Handle 0x0400, DMI type 4, bytes
Processor Information
Socket designation:cpu1 #关注
Type:central Processor
Family:xeon #关注
Manufacturer:intel
Id:e5, FF FB EB BF #关注, warranty may be
Signature:type 0, Family 6, Model, stepping 5
Flags:
FPU (floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (time stamp counter)
MSR (Model specific registers)
PAE (Physical Address Extension)
MCE (Machine Check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (on-chip APIC Hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page Global Enable)
MCA (Machine Check architecture)
Cmov (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (Clflush instruction supported)
DS (Debug Store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (Fast floating-point save and restore)
SSE (streaming SIMD extensions)
SSE2 (streaming SIMD extensions 2)
SS (Self-snoop)
HTT (hyper-threading Technology)
TM (Thermal Monitor supported)
PBE (Pending break enabled)
Version:intel (R) Xeon (r) CPU X3470 @ 2.93GHz #关注
voltage:1.2 V
External clock:4800 MHz
Max speed:3600 MHz #关注
Current speed:2933 MHz #关注
status:populated, Enabled
Upgrade: <out of Spec>
L1 Cache handle:0x0700
L2 Cache handle:0x0701
L3 Cache handle:0x0702
Serial Number:not Specified
Asset Tag:not Specified
Part Number:not Specified
Core Count:4 #关注
Core Enabled:4 #关注
Thread Count:8 #关注
Characteristics:
64-bit capable

There are many other concepts that are not mentioned in the following article.
For example: Physical CPUs, logical CPUs, threads, hyper-threading, and CPU caches, hit ratios, interrupts, etc., and their relationships,

The above individuals a little summary and understanding, level is not high, the level of writing is very bad, please greatly forgive me.
Can exchange learning together.

My qq:610851588.
Can join my build group (now very few people, hope slowly more up)
Linux Clusters: 183932302
Python, Shell AC Group: 469094734

This article from the "Go to the Origin dimension" blog, reproduced please contact the author!

Linux View hardware Information-cpu

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.