Linux Display CPU Information

by lifeLinux on May 19, 2011

Q. How do I display CPU information in Linux ?
A.You can get information of /proc/cpuinfo file or use lshw command to display CPU information in Linux.

Display CPU information from /proc/cpuinfo file

/proc/cpuinfo is a short, read-only, plain text file that contains information about the CPUs (central processing units) on a computer.
Type the following command to display CPU information:

# cat /proc/cpuinfo

Sample outputs

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 37
model name	: Intel(R) Core(TM) i3 CPU       M 350  @ 2.27GHz
stepping	: 5
cpu MHz		: 931.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 11
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 syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips	: 4522.67
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:
...

To display number of processors in the system, type the following command:

# cat /proc/cpuinfo | grep processor

Sample output

processor	: 0
processor	: 1
processor	: 2
processor	: 3

Using lshw command

Type the following command

# lshw -class processor

Sample output

WARNING: you should run this program as super-user.
  *-cpu
       product: Intel(R) Core(TM) i3 CPU       M 350  @ 2.27GHz
       vendor: Intel Corp.
       physical id: 1
       bus info: cpu@0
       size: 931MHz
       capacity: 931MHz
       width: 64 bits
       capabilities: fpu fpu_exception wp 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 syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat tpr_shadow vnmi flexpriority ept vpid cpufreq

Related Posts:

Previous post:

Next post: