linux 查看cpu 多核与多U

wanghuihui0 2011-06-20

# uname -a

Linuxlocalhost.localdomain2.6.18-194.el5#1SMPTueMar1621:52:39EDT2010x86_64x86_64x86_64GNU/Linux

(查看当前操作系统内核信息)

#cat/etc/issue|grepLinux

RedHatEnterpriseLinuxASrelease4(NahantUpdate5)

(查看当前操作系统发行版信息)

#cat/proc/cpuinfo|grepname|cut-f2-d:|uniq-c

8Intel(R)Xeon(R)[email protected]

(看到有8个逻辑CPU,也知道了CPU型号)

#cat/proc/cpuinfo|grepphysical|uniq-c

4physicalid:0

4physicalid:1

(说明实际上是两颗4核的CPU)

#getconfLONG_BIT

32

(说明当前CPU运行在32bit模式下,但不代表CPU不支持64bit)

#cat/proc/cpuinfo|grepflags|grep'lm'|wc-l

8

(结果大于0,说明支持64bit计算.lm指longmode,支持lm则是64bit)

.最后再完整看cpu物理信息,不过大部分我们都不关心而已.

#dmidecode|grep-A48'ProcessorInformation$'

ProcessorInformation

SocketDesignation:CPU1

Type:CentralProcessor

Family:Xeon

Manufacturer:Intel

ID:7A060100FFFBEBBF

Signature:Type0,Family6,Model17,SteppingA

Flags:

FPU(Floating-pointuniton-chip)

VME(Virtualmodeextension)

DE(Debuggingextension)

PSE(Pagesizeextension)

TSC(Timestampcounter)

MSR(Modelspecificregisters)

PAE(Physicaladdressextension)

MCE(Machinecheckexception)

CX8(CMPXCHG8instructionsupported)

APIC(On-chipAPIChardwaresupported)

SEP(Fastsystemcall)

MTRR(Memorytyperangeregisters)

PGE(Pageglobalenable)

MCA(Machinecheckarchitecture)

CMOV(Conditionalmoveinstructionsupported)

PAT(Pageattributetable)

PSE-36(36-bitpagesizeextension)

CLFSH(CLFLUSHinstructionsupported)

DS(Debugstore)

ACPI(ACPIsupported)

MMX(MMXtechnologysupported)

FXSR(Fastfloating-pointsaveandrestore)

SSE(StreamingSIMDextensions)

SSE2(StreamingSIMDextensions2)

SS(Self-snoop)

HTT(Hyper-threadingtechnology)

TM(Thermalmonitorsupported)

SBF(SignalbreakonFERR)

Version:Intel(R)Xeon(R)[email protected]

Voltage:1.2V

ExternalClock:333MHz

MaxSpeed:2333MHz

CurrentSpeed:2333MHz

Status:Populated,Enabled

Upgrade:<OUTOFSPEC>

L1CacheHandle:0x0005

L2CacheHandle:0x0006

L3CacheHandle:0x0007

SerialNumber:ToBeFilledByO.E.M.

AssetTag:ToBeFilledByO.E.M.

PartNumber:ToBeFilledByO.E.M.

--

ProcessorInformation

SocketDesignation:CPU2

Type:CentralProcessor

Family:Xeon

Manufacturer:Intel

ID:7A060100FFFBEBBF

Signature:Type0,Family6,Model17,SteppingA

Flags:

FPU(Floating-pointuniton-chip)

VME(Virtualmodeextension)

DE(Debuggingextension)

PSE(Pagesizeextension)

TSC(Timestampcounter)

MSR(Modelspecificregisters)

PAE(Physicaladdressextension)

MCE(Machinecheckexception)

CX8(CMPXCHG8instructionsupported)

APIC(On-chipAPIChardwaresupported)

SEP(Fastsystemcall)

MTRR(Memorytyperangeregisters)

PGE(Pageglobalenable)

MCA(Machinecheckarchitecture)

CMOV(Conditionalmoveinstructionsupported)

PAT(Pageattributetable)

PSE-36(36-bitpagesizeextension)

CLFSH(CLFLUSHinstructionsupported)

DS(Debugstore)

ACPI(ACPIsupported)

MMX(MMXtechnologysupported)

FXSR(Fastfloating-pointsaveandrestore)

SSE(StreamingSIMDextensions)

SSE2(StreamingSIMDextensions2)

SS(Self-snoop)

HTT(Hyper-threadingtechnology)

TM(Thermalmonitorsupported)

SBF(SignalbreakonFERR)

Version:Intel(R)Xeon(R)[email protected]

Voltage:1.2V

ExternalClock:333MHz

MaxSpeed:2333MHz

CurrentSpeed:2333MHz

Status:Populated,Enabled

Upgrade:<OUTOFSPEC>

L1CacheHandle:0x0009

L2CacheHandle:0x000A

L3CacheHandle:0x000B

SerialNumber:ToBeFilledByO.E.M.

AssetTag:ToBeFilledByO.E.M.

PartNumber:ToBeFilledByO.E.M.

--END--

相关推荐