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


    Linux下如何查看CPU信息, 包括位数和多核信息                                    
    # 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.
    作者:yuandianlws 发表于2012-8-3 10:35:27 原文链接
    阅读:131 评论:0 查看评论
  • 相关阅读:
    SQL通用数据类型
    SQL基础
    软件测试相关(1)
    C语言——判断
    C语言新手教程——计算
    并查集
    洛谷-P1551 亲戚
    洛谷-P1536 村村通
    洛谷-P1525 [NOIP2010 提高组] 关押罪犯
    洛谷-P2814 家谱
  • 原文地址:https://www.cnblogs.com/yuandianliws/p/3568260.html
Copyright © 2020-2023  润新知