linux 查看cpu全部信息,Linux下如何查看CPU信息, 包括位数和多核信息

Linux下如何查看CPU信息, 包括位数和多核信息

1、获取CPU详细信息

#cat /proc/cpuinfo

2、查看物理CPU的个数

#cat /proc/cpuinfo|grep 'physical id' | sort | uniq | wc–l

3、查看逻辑CPU的个数

#cat /proc/cpuinfo|grep 'processor' | wc–l

4、查看CPU是几核

#cat /proc/cpuinfo | grep 'cores' | uniq

#cat /proc/cpuinfo | grep 'cpu cores' | wc -l

5、查看CPU的主频

#cat /proc/cpuinfo |grep MHz | uniq

6、是否为超线程?如果有两个逻辑CPU具有相同的 “core id”,那么超线程是打开的。

每个物理CPU中逻辑CPU(可能是core,threads或both)的个数:

#cat /proc/cpuinfo | grep 'siblings'

7、查看当前操作系统内核信息

# uname -a

Linux euis1 2.6.9-55.ELsmp

#1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux

8、查看当前操作系统发行版信息

# cat /etc/issue | grep Linux

Red Hat Enterprise Linux AS

release 4 (Nahant Update 5)

9、查看有几个逻辑CPU,同时也能看到CPU型号

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

8 Intel(R) Xeon(R) CPU

E5410 @ 2.33GHz

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

10、

# cat /proc/cpuinfo | grep physical | uniq -c

4 physical id : 0

4 physical id : 1

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

11、

# getconf LONG_BIT

32

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

12、

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

8

(结果大于0,

说明支持64bit计算. lm指long mode, 支持lm则是64bit)

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

#

dmidecode | grep -A48 'Processor Information$'

Processor Information

Socket Designation: CPU 1

Type: Central Processor

Family: Xeon

Manufacturer: Intel

ID: 7A 06 01 00 FF FB EB BF

Signature: Type 0, Family 6, Model 17, Stepping A

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)

SBF (Signal break on FERR)

Version: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz

Voltage: 1.2 V

External Clock: 333 MHz

Max Speed: 2333 MHz

Current Speed: 2333 MHz

Status: Populated, Enabled

Upgrade:

L1 Cache Handle: 0x0005

L2 Cache Handle: 0x0006

L3 Cache Handle: 0x0007

Serial Number: To Be Filled By O.E.M.

Asset Tag: To Be Filled By O.E.M.

Part Number: To Be Filled By O.E.M.

--

Processor Information

Socket Designation: CPU 2

Type: Central Processor

Family: Xeon

Manufacturer: Intel

ID: 7A 06 01 00 FF FB EB BF

Signature: Type 0, Family 6, Model 17, Stepping A

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)

SBF (Signal break on FERR)

Version: Intel(R) Xeon(R) CPU E5410 @ 2.33GHz

Voltage:

1.2 V

External Clock: 333 MHz

Max Speed: 2333 MHz

Current Speed: 2333 MHz

Status: Populated, Enabled

Upgrade:

L1 Cache Handle: 0x0009

L2 Cache Handle: 0x000A

L3 Cache Handle: 0x000B

Serial Number: To Be Filled By O.E.M.

Asset Tag: To Be Filled By O.E.M.

Part Number: To Be Filled By O.E.M.

.

--END--

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值