Sponsored Content
Operating Systems Linux Red Hat Number of CPU in linux server Post 302390628 by Neo on Thursday 28th of January 2010 11:45:44 AM
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

 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
GETCPU(2)						     Linux Programmer's Manual							 GETCPU(2)

NAME
getcpu - determine CPU and NUMA node on which the calling thread is running SYNOPSIS
#include <linux/getcpu.h> int getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache); DESCRIPTION
The getcpu() system call identifies the processor and node on which the calling thread or process is currently running and writes them into the integers pointed to by the cpu and node arguments. The processor is a unique small integer identifying a CPU. The node is a unique small identifier identifying a NUMA node. When either cpu or node is NULL nothing is written to the respective pointer. The third argument to this system call is nowadays unused. The information placed in cpu is only guaranteed to be current at the time of the call: unless the CPU affinity has been fixed using sched_setaffinity(2), the kernel might change the CPU at any time. (Normally this does not happen because the scheduler tries to minimize movements between CPUs to keep caches hot, but it is possible.) The caller must be prepared to handle the situation when cpu and node are no longer the current CPU and node. VERSIONS
getcpu() was added in kernel 2.6.19 for x86_64 and i386. CONFORMING TO
getcpu() is Linux specific. NOTES
Linux makes a best effort to make this call as fast possible. The intention of getcpu() is to allow programs to make optimizations with per-CPU data or for NUMA optimization. Glibc does not provide a wrapper for this system call; call it using syscall(2); or use sched_getcpu(3) instead. The tcache argument is unused since Linux 2.6.24. In earlier kernels, if this argument was non-NULL, then it specified a pointer to a caller-allocated buffer in thread-local storage that was used to provide a caching mechanism for getcpu(). Use of the cache could speed getcpu() calls, at the cost that there was a very small chance that the returned information would be out of date. The caching mechanism was considered to cause problems when migrating threads between CPUs, and so the argument is now ignored. SEE ALSO
mbind(2), sched_setaffinity(2), set_mempolicy(2), sched_getcpu(3), cpuset(7) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-06-03 GETCPU(2)
All times are GMT -4. The time now is 10:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy