CPU Utilization


 
Thread Tools Search this Thread
Operating Systems AIX CPU Utilization
# 1  
Old 06-03-2010
MySQL CPU Utilization

Hi All,

Can some one help me in finding % CPU Utilization ?

From VMSTAT command, How we can find % utilization ?

Thanks
# 2  
Old 06-03-2010
You can subtract the idle ("id") column from 100 and that is the percent of your CPU used:
Code:
kthr    memory              page              faults              cpu
----- ----------- ------------------------ ------------ -----------------------
 r  b    avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa    pc    ec
 0  0 331429  5036   0   0   0   0    0   0  22  437 266  5  7 88  0  0.02  16.8
 0  0 331429  5036   0   0   0   0    0   0  22  253 255  3  4 93  0  0.01  10.4
 0  0 331428  5037   0   0   0   0    0   0  28  265 254  3  5 92  0  0.01  11.7
 0  0 331428  5037   0   0   0   0    0   0  29  271 254  3  4 93  0  0.01  11.0


Last edited by bakunin; 06-04-2010 at 10:18 AM..
# 3  
Old 06-04-2010
When you run "vmstat" you see 5(6) columns in the "cpu" block. They are labeled "us", "sy", "id", and "wa" (on LPARs with a shared processor there are two additional columns "pc" and "ec").
  • id
    Gives the percentage of the total processor resources left over. This is the complement to 100% after adding up the other values (see below)
  • wa
    Gives the percentage of the total processor resources spent idle whlie the system has outstanding I/O requests.
  • us, sy
    Give the percentage of the total processor resources spent executing user programs ("us") and system calls ("sy").

There are two more columns on LPARs with shared processors, "pc" (number of physical processors consumed) and "ec" (entitled processor capacity consumed), which tell you how much of the underlying real hardware ("pc") was used and how much of the resources the LPAR is allowed to allocate was consumed.

Typical problems and their symptoms:
  • "us" high, ("sy" high too), "wa" and "id" near zero
    The system is processor-bound: the resources the system can use are used up by programs. High program loads ("us") will typically drive up the number of system calls ("sy") too, but that doesn't have to be so. Ultimately all your processing power is used. If the system is too slow it would gain from more processors.

  • "us" low, ("sy" low too), "wa" high, "id" near zero
    The system is I/O-bound: it is not spending all too much time executing your programs ("us"/"sy" is low), but it spends a lot of time waiting for some I/O to happen. There are a lot of programs which could continue to do something - if they wouldn't have to wait for some (disk) I/O to happen. Cure is to get the system more I/O bandwidth somehow: replace SCSI-disks with FC-disks for instance, etc..

    This could also happen if the system has not enough memory and is constantly swapping: since every process has to wait until swapping operations have finished all the processes have to wait for the disks. If "wa" is high and the second column ("b" - blocked processes) is non-zero, perhaps along with "pi" and "po" being not (near) zero too, then your system has probably not enough memory for what it is doing at this moment.

  • "pc" or "ec" high (90% and more)
    The system is processor-bound, because there are not enough resources allocated for it. Correct this at the HMC and give more (physical) processor resources to the LPAR.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 4  
Old 06-04-2010
when looking at cpu utilization, watch the us+sy values but also look at the EC (entitled capacity).
EC can be, if the lpar is uncapped, more than 100%.

Here's an example

Code:
System configuration: lcpu=4 mem=2048MB ent=0.20

kthr    memory              page              faults              cpu
----- ----------- ------------------------ ------------ -----------------------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs    us sy id wa    pc  ec
 0  0 322989 79334   0   0   0   0    0   0 115 54342 5041 40 57  3  0  0.50 247.9

the example shot idle=3%, so CPU utilization is 97%, but the EC value is almost 250% meaning, this LPAR is uncapped and is using 2.5 times is original assigned CPU. So now it's utilizing 97% of (2.5 times 0.2cpu)

when the partition is uncapped. EC is max 100%, so max CPU utilization is 100% of 0.2 CPU

Moderator's Comments:
Mod Comment Please use CODE-tags when posting terminal output. Thank you.

Last edited by bakunin; 06-04-2010 at 10:16 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies

2. UNIX for Advanced & Expert Users

CPU utilization

Hi, any commande on AIX 6.1 that shows me total CPU utilization ? I saw curt in documentation but there should be a trace file before. Thank you. (1 Reply)
Discussion started by: big123456
1 Replies

3. Shell Programming and Scripting

CPU Utilization

I know how to check the CPU utilization and memory space like: vmstat top free What i want ot check on my linux system is... how much CPU are available on my system and do i need to put extra CPU. Also need to check the hardware configuration and the space related to the same ... (3 Replies)
Discussion started by: j_panky
3 Replies

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

5. Shell Programming and Scripting

CPU Utilization

Hi to All, Would you please help me. I would like to know, In Unix How to know CPU utilization for every process. Thanks in Advance. Thanks, Divyang (3 Replies)
Discussion started by: div_Neev
3 Replies

6. Solaris

CPU Utilization/Saturation

Hi! I have following problem: How can I calculate 100 % CPU utilisation if I have 8 chip (SPARCV6 dual core)? Which load is 100 % CPU utilisation? Hope someone can help! (7 Replies)
Discussion started by: Helmut
7 Replies

7. Shell Programming and Scripting

CPU Utilization

Dear friends, I am doing a report daily for all most 30 more serves... i need to check out CPU utlization bu (top command, 100 - (ideal value)) and Memory utilization too could some one help me how can i get it directly, if scripts also no problem.. i will very thankful if some one... (3 Replies)
Discussion started by: bullz26
3 Replies

8. UNIX for Dummies Questions & Answers

% CPU utilization

Hi, iam new to AIX and had a basic question. I was asked to give a chart of CPU utilization in percentage for every hour. where can i look for information and which column should i look at? I would be very thankful if somebody could respond. Thanks! karthik (1 Reply)
Discussion started by: karthikosu
1 Replies

9. UNIX for Advanced & Expert Users

CPU Utilization

On user complains about the performance of web application, as a part application support, we use following commands to see the CPU utilization in the UNIX using ‘sar' command. Some times it goes below 20 and even reaches 0. HLW$~> sar -u 10 60 SunOS HLW 5.8 Generic_117350-14 sun4u ... (2 Replies)
Discussion started by: thinakarmani
2 Replies

10. UNIX for Dummies Questions & Answers

CPU Utilization

What command do you use to verify if the CPU utilization. Example. If the CPU is at 98%? Thanks (4 Replies)
Discussion started by: kimosilk
4 Replies
Login or Register to Ask a Question