Linux display CPU information - number of CPUs and their speed
Q. How do I display CPU information such as the number of CPUs and their speed?
A. Proc (/proc) file system provides easy information about CPU and their speed.
The proc filesystem is a pseudo-filesystem which is used as an interface to kernel data structures. It is commonly mounted at /proc. Most of it is read-only, but some files allow kernel variables to be changed.
Display the number of processors in Linux
You need to use /proc/cpuinfo file. This is a collection of CPU and system architecture dependent items, for each supported architecture a different list. Two common entries are processor which gives CPU number and bogomips; a system constant that is calculated during kernel initialization. SMP machines have information for each CPU. Type the following command:
$ less /proc/cpuinfo
Output:
processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Xeon(TM) CPU 3.00GHz stepping : 3 cpu MHz : 2992.991 cache size : 2048 KB physical id : 0 siblings : 2 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 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 nx lm pni monitor ds_cpl cid bogomips : 5931.00 processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Xeon(TM) CPU 3.00GHz stepping : 3 cpu MHz : 2992.991 cache size : 2048 KB physical id : 0 siblings : 2 ..... ... ....
You can narrow down output with the following command, to display number of processors in the system:
$ grep processor /proc/cpuinfo
See also:
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Linux / UNIX FAQ:
- Linux display each multiple SMP CPU processors utilization individually
- Linux OR BSD: How to speed up compile time with GNU make
- Howto find out AIX UNIX CPU information, clock speed
- Determine / Find ethernet connection speed
- Linux LAN card: Find out full duplex / half speed or mode
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Please do not use the comment form to ask for help / question. Ask your question on the excellent Linux tech support forum. Thank you very much for stopping by our site!
Tags: architecture, cat_command, cpuinfo, grep_command, intel, number_of_processors, proc_cpuinfo_file, xeon ~ Last updated on: August 24, 2007



Recent Comments
Today ~ 2 Comments
Today ~ 9 Comments
Today ~ 2 Comments
Today ~ 1 Comment
Today ~ 2 Comments