通過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)
(****** 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
通過CPUID命令訪問CPU詳細資訊
通過cpuid命令,來獲取cpu的資訊,這個命令的底層是通過cpuid指令。獲取的內容比 proc cpuinfo要詳細很多,如果要獲取詳細資訊就使用cpuid命令吧。例如,執行 cpuid cpu 0 vendor id genuineintel version information 1 eax...
linux下 用cpuid指令讀取CPU資訊
include int main fixme 打出來的字串是 in htel r pentium r h d cpu 2.80ghz 其中 h是個不可見字元,會把它前乙個吃掉 printf n eax 0 eax cpuid指令允許的最大eax輸入值 ebx genu ecx ntel edx in...
Ubuntu下檢視CPU 記憶體和硬碟詳細資訊的命令
1.cpu 型號 grep model name proc cpuinfo awk f 數量 lscpu grep cpu socket awk 或 lscpu grep socket awk 每個cpu的核數 lscpu grep core s per socket awk 2.記憶體 卡槽數量 ...