Solved

Linux top - How to Interpret CPU Values for Multiple CPU Server

Posted on 2012-03-27
3
604 Views
Last Modified: 2012-05-02
Hi,

I need the proper method to interpret the "%CPU" column of the "top" command on a multiple CPU server. The server has 24 CPU's running Red Hat linux 5. A top command produces the following output (partial):
top - 06:00:11 up 335 days, 15:51,  0 users,  load average: 28.33, 28.85, 30.17
Tasks: 1857 total,  34 running, 1724 sleeping,   0 stopped,  99 zombie
Cpu(s): 76.4%us, 15.6%sy,  0.0%ni,  2.7%id,  4.0%wa,  0.0%hi,  1.2%si,  0.0%st
Mem:  65875208k total, 65552432k used,   322776k free,   169388k buffers
Swap: 33554424k total,  2912920k used, 30641504k free, 50433244k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 7552 root      25   0  379m  85m  67m R 94.6  0.1   6190:40 /opt/OV/lbin/perf/c
26988 oracle    20   0 2245m 376m 372m R 91.1  0.6   2:48.36 oracleRIS2AFP1 (LOC
32467 oracle    18   0 3240m 1.5g 1.5g R 91.1  2.4 212:49.36 oracleAPUANFP1 (LOC
  733 oracle    20   0 3241m 1.4g 1.4g R 90.8  2.3 213:14.81 oracleAPUANFP1 (LOC
  944 oracle    17   0 3239m 1.5g 1.5g R 89.8  2.4 212:17.48 oracleAPUANFP1 (LOC
  907 oracle    18   0 3241m 1.4g 1.4g R 89.5  2.2 214:45.44 oracleAPUANFP1 (LOC
  940 oracle    18   0 3241m 1.5g 1.5g R 89.5  2.5 211:57.52 oracleAPUANFP1 (LOC
  942 oracle    18   0 3241m 1.5g 1.5g R 89.5  2.4 211:55.31 oracleAPUANFP1 (LOC
  798 oracle    18   0 3241m 1.5g 1.5g R 89.2  2.4 211:03.63 oracleAPUANFP1 (LOC
  932 oracle    18   0 3241m 1.5g 1.5g R 87.9  2.4 212:47.43 oracleAPUANFP1 (LOC
  938 oracle    18   0 3241m 1.6g 1.6g R 87.6  2.6 212:17.60 oracleAPUANFP1 (LOC
  946 oracle    18   0 3241m 1.5g 1.5g R 87.3  2.4 211:26.51 oracleAPUANFP1 (LOC
  930 oracle    17   0 3241m 1.5g 1.5g R 86.9  2.4 211:41.56 oracleAPUANFP1 (LOC
10791 oracle    18   0 1200m  62m  31m R 86.3  0.1  73:07.53 oracleASVSEFP1 (DES
  936 oracle    17   0 3241m 1.5g 1.5g R 85.0  2.4 211:09.24 oracleAPUANFP1 (LOC
  934 oracle    16   0 3241m 1.5g 1.5g R 82.5  2.4 211:22.76 oracleAPUANFP1 (LOC
  621 oracle    16   0 3241m 1.6g 1.6g R 75.2  2.5 211:33.69 oracleAPUANFP1 (LOC
26752 oracle    17   0 3241m 986m 981m R 69.4  1.5 101:05.23 oracleAPUANFP1 (LOC
31263 oracle    18   0 3241m 2.4g 2.4g D 66.6  3.8  88:43.82 oracleAPUANFP1 (LOC
21195 oracle    18   0 1200m  57m  26m R 56.7  0.1  18:09.66 oracleFSSVEFP1 (DES
21359 oracle    18   0 1200m  57m  26m D 36.0  0.1  18:18.51 oracleFSSVEFP1 (DES
31888 oracle    18   0 1200m  58m  27m R 34.1  0.1  21:52.59 oracleFSSUEFP1 (DES
 7227 oracle    15   0 2245m 364m 360m S 27.7  0.6   1:47.05 oracleRIS2AFP1 (LOC
10487 root      18   0 30056 9220 1068 D 26.1  0.0   0:01.79 /sbin/vgscan
10967 oracle    17   0 1169m 150m 146m R 22.0  0.2   0:01.02 oracleASEYEFP1 (LOC
 9764 oracle    18   0 3239m 233m 229m D 19.7  0.4   0:01.63 oracleAPUANFP1 (LOC
18603 oracle    16   0 2244m 282m 279m R 19.1  0.4   0:14.68 oracleRIS2AFP1 (LOC
10973 oracle    16   0 1169m 148m 144m R 17.5  0.2   0:00.78 oracleASSVEFP1 (LOC
  583 oracle    15   0 1173m 127m 122m S 16.2  0.2   0:11.65 ora_p000_ASVSEFP1
10036 oracle    17   0 1171m  81m  77m D 15.3  0.1   0:01.24 oracleASEYEFP1 (LOC
  585 oracle    15   0 1170m 112m 108m S 13.7  0.2   0:11.14 ora_p001_ASVSEFP1
10764 root       0 -20 36468  11m 2112 S 12.7  0.0   6964:37 /opt/perf/bin/scope
 8158 oracle    15   0 2245m 369m 365m S 10.2  0.6   2:04.96 oracleRIS2AFP1 (LOC

Open in new window


Summing up the %CPU used in this partial output from top we get "1322.4%". If that number is divided by 24 CPUs, it's 55.1% - does that mean that the aggregate server CPU at the time  the top command was issued was 55.1% busy? If I wanted to determine how much "CPU" was being used by a particular process (say for instance, the oracle database RIS2AFP1), would I grep out the lines with RIS2AFP1, sum the CPU column and divide that by 24 to get a combined figure of CPU usage at that time for that database?

Any help will be MUCH appreciated!!!
0
Comment
Question by:dhite99
3 Comments
 
LVL 31

Expert Comment

by:farzanj
ID: 37771023
You can see all CPUs separately by pressing 1 on top.
0
 

Author Comment

by:dhite99
ID: 37771075
This top data has already been gathered over a period of time. It was gathered by a script, so there's no opportunity to press anything now, only try and interpret the data, which is what I really need help with and the gist of my question. Thanks for responding though.
0
 
LVL 11

Accepted Solution

by:
legolasthehansy earned 500 total points
ID: 37771425
I'm not sure if you can get an accurate account by doing the math from the output. The correct procedure for getting usage from multiple CPU's was from command "mpstat"

mpstat gives you usage of each processor and better stats than top.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now