免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 834 | 回复: 0
打印 上一主题 下一主题

Linux下如何查看CPU信息, 包括位数和多核信息 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-05 13:03 |只看该作者 |倒序浏览

# uname -a
Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
(查看当前操作系统内核信息)
# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(查看当前操作系统发行版信息)
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
      8  Intel(R) Xeon(R) CPU            E5410   @ 2.33GHz
(看到有8个逻辑CPU, 也知道了CPU型号)
# cat /proc/cpuinfo | grep physical | uniq -c
      4 physical id      : 0
      4 physical id      : 1
(说明实际上是两颗4核的CPU)
# getconf LONG_BIT
32
(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
.
.
最后再完整看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--

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/97963/showart_2018513.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP