通过cpuid命令,来获取CPU的信息,这个命令的底层是通过CPUID指令。获取的内容比/proc/cpuinfo要详细很多,如果要获取详细信息就使用cpuid命令吧。

例如,执行

#cpuid

CPU 0:

   vendor_id = "GenuineIntel"

   version information (1/eax):

      processor type  = primary processor (0)

      family          = Intel Pentium Pro/II/III/Celeron/Core/Core 2/Atom, AMD Athlon/Duron, Cyrix M2, VIA C3

(6)

      model           = 0x5 (5)

      stepping id     = 0x1 (1)

      extended family = 0x0 (0)

      extended model  = 0x4 (4)

      (simple synth)  = Intel Mobile Core i3-4000Y / Mobile Core i5-4000Y / Mobile Core i7-4000Y / Mobile Pent

ium 3500U/3600U/3500Y / Mobile Celeron 2900U (Mobile U/Y) (Haswell), 22nm

   miscellaneous (1/ebx):

      process local APIC physical ID = 0x0 (0)

      cpu count                      = 0x0 (0)

      CLFLUSH line size              = 0x8 (8)

      brand index                    = 0x0 (0)

   brand id = 0x00 (0): unknown

   feature information (1/edx):

      x87 FPU on chip                        = true

      virtual-8086 mode enhancement          = true

      debugging extensions                   = true

      page size extensions                   = true

      time stamp counter                     = true

      RDMSR and WRMSR support                = true

 

1.1.1 参考

https://en.wikipedia.org/wiki/CPUID