Code is Love

Linux: How many processors do I have?

by someguy on Sep.13, 2006, under Uncategorized

On Linux, you can get a ton of information about the physical hardware you are running right from the command line. Simply cat’ing /proc/cpuinfo will give you lots of gory details about the processors you have installed. Unfortunately, it gets a little confusing thanks to hyperthreading, dual cores, etc.. So here’s a simple command to find out how many physical processors you have installed.

$ dmesg | grep "Physical Processor" | awk '{ print $5 }' |sort -nu|wc -l

:, ,

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...