Number of CPU in linux server

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Number of CPU in linux server
# 1  
Old 01-28-2010
Number of CPU in linux server

I am using linux server.. how do i see number of CPU's in the server? TOP command is not providing result.. Any help is highly appreciated.
# 2  
Old 01-28-2010
Code:
cat /proc/cpuinfo

# 3  
Old 01-28-2010
Quote:
Originally Posted by govindts
I am using linux server.. how do i see number of CPU's in the server? TOP command is not providing result.. Any help is highly appreciated.
You can see the number of running CPUs on Linux by running top and toggle SMP mode with the "1" key.

FYI ...

Code:
top - 16:45:53 up 61 days,  8:25,  1 user,  load average: 1.29, 2.39, 2.97
Tasks: 376 total,   1 running, 375 sleeping,   0 stopped,   0 zombie
Cpu0  : 27.8%us, 12.6%sy,  0.0%ni, 57.9%id,  1.6%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  : 35.5%us,  1.9%sy,  0.0%ni, 62.0%id,  0.6%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  : 25.2%us,  2.6%sy,  0.0%ni, 71.0%id,  1.3%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  : 43.1%us,  9.9%sy,  0.0%ni, 43.1%id,  2.6%wa,  0.3%hi,  1.0%si,  0.0%st
Mem:  16533828k total, 16005948k used,   527880k free,   564024k buffers
Swap:  1477940k total,  1230192k used,   247748k free, 10067232k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                       
30532 mysql     20   0 1963m 1.2g 5632 S   56  7.9   2609:22 mysqld                                                                        
13383 www-data  20   0  368m  29m  12m S   10  0.2   0:01.18 apache2                                                                       
11239 www-data  20   0  372m  33m  15m S    8  0.2   0:08.82 apache2                                                                       
12728 www-data  20   0  369m  28m  13m S    8  0.2   0:02.08 apache2

# 4  
Old 01-28-2010
Thanks.. it Helps...

In cpuinfo file, I see below set of information 7 times... Processor 1 to 7.

It means 7 CPU's or 7 processor? What is CPU Famil = 15? Can you please interpret this?

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 6
model name : Intel(R) Xeon(TM) CPU 3.20GHz
stepping : 8
cpu MHz : 3200.000
cache size : 8192 KB
physical id : 2
siblings : 2
core id : 5
cpu cores : 2
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm pni monitor ds_cpl est tm2 cid cx16 xtpr lahf_lm
bogomips : 6383.32
clflush size : 64
cache_alignment : 128
address sizes : 40 bits physical, 48 bits virtual
power management:
# 5  
Old 01-28-2010
Each processor listed is a logical processor. Logical unit of processing. This may be a core or a 'hardware thread'. The exact interpretation may be tricky.

Please see:
Understanding /proc/cpuinfo

or google for:
understanding /proc/cpuinfo
# 6  
Old 01-28-2010
My top command display like this... Not showing CPU.. What is
PHP Code:
toggle SMP mode with the "1" key 
top - 10:49:16 up 55 days, 11:14, 1 user, load average: 0.29, 0.39, 0.45
Tasks: 277 total, 2 running, 275 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.8% us, 0.9% sy, 0.0% ni, 98.1% id, 0.2% wa, 0.0% hi, 0.0% si
Mem: 16437736k total, 14941532k used, 1496204k free, 265128k buffers
Swap: 24575992k total, 65268k used, 24510724k free, 11773784k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27972 oracle 16 0 6284 1140 752 R 1 0.0 0:00.10 top
3275 oracle 16 0 7476m 4.2g 4.2g S 0 27.1 4:41.80 oracle
4629 root 10 -5 0 0 0 S 0 0.0 122:05.53 vxfs_thread
4769 oracle 16 0 7475m 4.2g 4.2g S 0 26.8 4:34.27 oracle


Quote:
Originally Posted by Neo
You can see the number of running CPUs on Linux by running top and toggle SMP mode with the "1" key.

FYI ...

Code:
top - 16:45:53 up 61 days,  8:25,  1 user,  load average: 1.29, 2.39, 2.97
Tasks: 376 total,   1 running, 375 sleeping,   0 stopped,   0 zombie
Cpu0  : 27.8%us, 12.6%sy,  0.0%ni, 57.9%id,  1.6%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  : 35.5%us,  1.9%sy,  0.0%ni, 62.0%id,  0.6%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  : 25.2%us,  2.6%sy,  0.0%ni, 71.0%id,  1.3%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  : 43.1%us,  9.9%sy,  0.0%ni, 43.1%id,  2.6%wa,  0.3%hi,  1.0%si,  0.0%st
Mem:  16533828k total, 16005948k used,   527880k free,   564024k buffers
Swap:  1477940k total,  1230192k used,   247748k free, 10067232k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                       
30532 mysql     20   0 1963m 1.2g 5632 S   56  7.9   2609:22 mysqld                                                                        
13383 www-data  20   0  368m  29m  12m S   10  0.2   0:01.18 apache2                                                                       
11239 www-data  20   0  372m  33m  15m S    8  0.2   0:08.82 apache2                                                                       
12728 www-data  20   0  369m  28m  13m S    8  0.2   0:02.08 apache2

# 7  
Old 01-28-2010
Quote:
Originally Posted by govindts
In cpuinfo file, I see below set of information 7 times... Processor 1 to 7.
Normally it is 0 to 7, for 8 processors (CPUs).

Are you sure it is only 1 - 7 ??

---------- Post updated at 16:55 ---------- Previous update was at 16:53 ----------

Quote:
Originally Posted by govindts
My top command display like this... Not showing CPU.. What is toggle SMP mode with the "1" key
When running top, press the "1" key.

Press it again to turn off SMP mode.

When in top, press h for help......

Code:
Help for Interactive Commands - procps version 3.2.8
Window 1:Def: Cumulative mode Off.  System: Delay 3.0 secs; Secure mode Off.

  Z,B       Global: 'Z' change color mappings; 'B' disable/enable bold
  l,t,m     Toggle Summaries: 'l' load avg; 't' task/cpu stats; 'm' mem info
  1,I       Toggle SMP view: '1' single/separate states; 'I' Irix/Solaris mode

  f,o     . Fields/Columns: 'f' add or remove; 'o' change display order
  F or O  . Select sort field
  <,>     . Move sort field: '<' next col left; '>' next col right
  R,H     . Toggle: 'R' normal/reverse sort; 'H' show threads
  c,i,S   . Toggle: 'c' cmd name/line; 'i' idle tasks; 'S' cumulative time
  x,y     . Toggle highlights: 'x' sort field; 'y' running tasks
  z,b     . Toggle: 'z' color/mono; 'b' bold/reverse (only if 'x' or 'y')
  u       . Show specific user only
  n or #  . Set maximum tasks displayed

  k,r       Manipulate tasks: 'k' kill; 'r' renice
  d or s    Set update interval
  W         Write configuration file
  q         Quit
          ( commands shown with '.' require a visible task display window ) 
Press 'h' or '?' for help with Windows,
any other key to continue

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Is it possible to combine multiple CPU to act as a single CPU on the same server?

We have a single threaded application which is restricted by CPU usage even though there are multiple CPUs on the server, hence leading to significant performance issues. Is it possible to merge / combine multiple CPUs at OS level so it appear as a single CPU for the application? (6 Replies)
Discussion started by: Dissa
6 Replies

2. Red Hat

CPU high - apache real server OK, virtual server not

Got two RHEL servers - one real and one virtual/cloud. Both run apache web server. When traffic is applied, CPU seems to go quite high on virtual one (20%) but real is not really affected. Worry is that a further increase in traffic will see a problem. Experience of RHEL is limited. Whats... (2 Replies)
Discussion started by: psychocandy
2 Replies

3. AIX

Number of CPU & Number of Core

root:/> # lscfg -vp|grep -c -E 'proc.*Processor' 8 root:/> # lscfg -vpl sysplanar0 | grep -i way 8 WAY PROC CUOD : 8 WAY PROC CUOD : 8 WAY PROC CUOD : 8 WAY PROC CUOD : 8 WAY PROC CUOD : 8 WAY PROC CUOD : I have this output and need to know how... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

4. Shell Programming and Scripting

Identify CPU usage on the Linux server

We are using linux server. We have below script running on the crontab and it send the alert if the cpu usage is above 90%. My question is, the below script tells the CPU usage for one CPU or all CPU in the server? sar 1 1 | sed '$!d' | awk '{printf("%d", $8)}' > $SAR_LOG Please let me... (4 Replies)
Discussion started by: govindts
4 Replies

5. Red Hat

Number of CPU in LINUX server

I want to find number of CPU and number NIC card in Linux server. I have below content in /proc/cpuinfo. I have from processor 0 - 15. It means, i have 15 similar entries in that file. How many CPU we have on this server? also how do find how many NIC card on this? processor : 0... (5 Replies)
Discussion started by: govindts
5 Replies

6. Solaris

Number of CPU and Memory information in SunOS server?

I have SunOS and here is the version details SunOS chfdalsun003 5.10 Generic_138888-03 sun4u sparc SUNW,Sun-Fire-V890 I have couple of questions. How do i see number of CPU's in the server? How can i see the Server memory(RAM)? The detail memory information like(total, used, free etc).... (6 Replies)
Discussion started by: govindts
6 Replies

7. Solaris

Number of CPU

Hi Experts, with the help of which command we can see the Number of cpu in a solaris solaris5.10.Also how we know the total disk & free disk space size in this system. Kind regards ---------- Post updated at 12:25 PM ---------- Previous update was at 12:25 PM ---------- Command... (10 Replies)
Discussion started by: rafiassam
10 Replies

8. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

9. Solaris

How to down a particular CPU in a server, witch is having 16 CPU's

Hi.., my dout is a solaris server is having 16 cpu's. in tht one cpu running some error process, accupaying more space. I wanna down tht particular CPU only with out interrupting the other 15 CPU's. how can i do this. is there any command for this ?? (5 Replies)
Discussion started by: b.janardhanguru
5 Replies

10. Solaris

number of cpu's

How can I tell how many cpu's are on a solaris 9 sunfire? (3 Replies)
Discussion started by: csaunders
3 Replies
Login or Register to Ask a Question