Linux下如何查看CPU信息, 包括位数和多核信息
# uname -a
Linux liuzhouping-laptop 2.6.28-14-generic #46-Ubuntu SMP Wed Jul 8 07:21:34 UTC 2009 i686 GNU/Linux
(查看当前操作系统内核信息)
# cat /etc/issue
Ubuntu 9.04 \n \l
(查看当前操作系统发行版信息)
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
2 Intel(R) Core(TM)2 Duo CPU T5550 @ 1.83GHz
(看到有8个逻辑CPU, 也知道了CPU型号)
# cat /proc/cpuinfo | grep physical | uniq -c
2 physical id : 0
# getconf LONG_BIT
32
(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
2
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
最后再完整看cpu物理信息, 不过大部分我们都不关心而已.
# dmidecode | grep -A48 'Processor Information$'
Processor Information
Socket Designation: Socket 478
Type: Central Processor
Family: Pentium M
Manufacturer: Intel
ID: FD 06 00 00 FF FB EB BF
Signature: Type 0, Family 6, Model 15, Stepping 13
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) Core(TM)2 Duo CPU T5550 @ 1.83GHz
Voltage: 1.4 V
External Clock: 167 MHz
Max Speed: 1833 MHz
Current Speed: 1833 MHz
Status: Populated, Enabled
Upgrade: Socket 423
L1 Cache Handle: 0x0005
L2 Cache Handle: 0x0006
L3 Cache Handle: Not Provided
Serial Number: PSN12345678901234567
Asset Tag: PATN1234567890123456
Part Number: PPN12345678901234567
阅读(864) | 评论(0) | 转发(0) |