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

Post Reply
unreal_champion
Posts: 8
Joined: Sun Aug 31, 2008 12:16 am

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

Post by unreal_champion »

Hi,

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

Thanks
Chris
Site Admin
Posts: 129
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

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

Post 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)
Chris
Site Admin
Posts: 129
Joined: Mon Jul 21, 2008 9:45 am
Location: Leuven, Belgium
Contact:

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

Post 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
Post Reply