Thursday, July 31, 2008

How To Display The Number of Processors in Linux

On Linux, /proc/cpuinfo file contains all of the processor information from your system. This includes the processor speed, vendor id, cpu family, model, model name, CPU MHz, cache size and many more.

To mainly determine how many processors your system has, simply parse /proc/cpuinfo details from command line terminal as shown

# cat /proc/cpuinfo | grep processor | wc -l

The above command shows the total number of processors a system currently have.

This command is helpful specially on remote linux servers wherein you don't have physical access and you have nobody to tell you how many processors does that remote server have.

Remember that dual core CPU are reported as a separate processor unit.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy