Saturday, April 26, 2014

Linux Get CPU Info

Probably the simplest way to get CPU info in Linux is to display /proc/cpuinfo (and example output)

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.40GHz
stepping        : 9
cpu MHz         : 2423.933
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up pebs bts sync_rdtsc cid xtpr
bogomips        : 4851.34
clflush size    : 64

if we need only to display model name: 

$ cat /proc/cpuinfo|grep "model name"
model name      : Intel(R) Celeron(R) CPU 2.40GHz

In the case that there are multiple processors, info of second will continue after first one and so on... processor: 0, processor: 1,...

No comments:

Post a Comment