Page 1 of 1

How can I see the number of CPU's in Linux

Posted: Fri Jul 17, 2009 2:28 pm
by unreal_champion
Hi,

Is there a command that I can use to see the number of CPU's in the system?

Thanks

Re: How can I see the number of CPU's in Linux

Posted: Wed Jul 22, 2009 11:12 am
by Chris
You can see the cpu info in /proc/cpuinfo

Code: Select all

less /proc/cpuinfo
Note: Processors with 2 cores(Or more) can be shown twice (Or more)


On Solaris you can do:

Code: Select all

uname -X
Or you can do the following:

Code: Select all

psrinfo -p
Shows the number of physical processors

Code: Select all

psrinfo -pv
Shows the number of virtual processors (Number of cores x Number of threads)

Re: How can I see the number of CPU's in Linux

Posted: Wed Jul 22, 2009 5:47 pm
by Chris
You can also use

Code: Select all

x86info a
But you might need to install it first
on debian/ubuntu

Code: Select all

apt-get install x86info