- Debian Admin - http://www.debianadmin.com -
Howto display the number of processors in Linux
Posted By Admin On 24th August 2007 @ 07:04 In General | 6 Comments
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Here’s how to display the number of processor of your linux box.
Simply issue the following command as root
# cat /proc/cpuinfo | grep processor
Everything in linux is files. This command simply retrieves the number of processors that linux detected from /proc/cpuinfo and displays it. Usually, the processor number comes at the first set of line from issuing the command.
Here’s what the command returned for me:
~~~~~~~~~~~~~~~~~~~~~~~~
processor : 0
~~~~~~~~~~~~~~~~~~~~~~~~
which means You have 1 processor with a processor ID number 0. Processor counting starts with 0.
So if you have a PC with core duo, you will probably have 2 lines that says 0 and 1.That is 2 processors.
You may also be interested in...
Article printed from Debian Admin: http://www.debianadmin.com
URL to article: http://www.debianadmin.com/howto-display-the-number-of-processors-in-linux.html
Click here to print.