i need to know the command to find    the numer of  cpu in the server I mean how many cpus are there in a server running  unix, linux

Who is Participating?
edster9999Connect With a Mentor Commented:
cat /proc/cpuinfo | grep processor | awk '{count++} END {print count}'

This will give the CPU count but it will list dual core type processors as '2' as that is sort of what they are inside.
top command wills how you how many cpu you got
there is another one

i will give you the name 5 min
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

sorry, some one already said this before me
Deepak KosarajuDevOps EngineerCommented:
use lshw -class processor
Deepak KosarajuConnect With a Mentor DevOps EngineerCommented:

[root@pro02 ~]# lshw -class processor 
       description: CPU
       product: Genuine Intel(R) CPU            1500  @ 2.00GHz
       vendor: Intel Corp.
       physical id: 1
       bus info: cpu@0
       version: 6.14.8
       serial: 0000-06E8-0000-0000-0000-0000
       slot: CPU Socket #0
       size: 1996MHz
       capacity: 1996MHz
       width: 32 bits
       clock: 133MHz
       capabilities: fpu fpu_exception wp pse tsc msr mce cx8 mtrr pge cmov mmx fxsr sse sse2 ss constant_tsc up pni
[root@pro02 ~]# lshw -class processor | grep -i "bus info"
       bus info: cpu@0    
[root@pro02 ~]# 

Open in new window

taazAuthor Commented:
thanks all
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.