Skip to main content
Welcome guest. | Register | Login | Post

Howto display the number of processors in Linux

If you’ve just bought a new desktop,laptop or server and the box says the box is powered by 2 processors, you can actually verify that.

Full Story

Comments

If you enhance the line

 

If you enhance the line given there you don't even need to count for yourself. Could be handy when Intel releases that 80-core-CPU they currently are playing around with. ;-)

This just gives you number of CPUs/cores of yours system.
cat /proc/cpuinfo | grep processor | wc -l

If you want to have it a bit nicer try this:
echo "Your system has $(cat /proc/cpuinfo | grep processor | wc -l) CPUs or CPU-cores."

Of course you can even parse /proc/cpuinfo some more to get more details, like how many physical CPUs and how many cores in total. But I guess since a core is basically like a CPU it doesn't really matter that much.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.