How to calculate AIX CPU utilization using lparstat command


 
Thread Tools Search this Thread
Operating Systems AIX How to calculate AIX CPU utilization using lparstat command
# 1  
Old 09-14-2012
How to calculate AIX CPU utilization using lparstat command

Could you please explain about calculate CPU utilization of aix server using lparstat command?

Here below i have provided example output from aix test server.

System configuration: type=Shared mode=Uncapped smt=On lcpu=4 mem=4096 psize=63 ent=0.50

Code:
%user  %sys  %wait  %idle physc %entc  lbusy  vcsw phint 
----- ----- ------ ------ ----- ----- ------ ----- -----   
0.2   0.8    0.0   98.9  0.01   1.8    2.3   152     0   
0.1   0.8    0.0   99.1  0.01   1.8    2.5   276     0
0.1   2.0    0.0   97.9  0.02   4.4    5.0   693     0


Last edited by Corona688; 09-14-2012 at 01:49 PM..
# 2  
Old 09-14-2012
I am not sure what you want. There is nothing to "calculate":

You have the 4 values "user", "sys", "wait" and "idle". All these values are percentages and add up to 100.

"user" is the time the processor resources of the system spend executing user code.

"sys" is the time the processor(s) spend executing system code - system calls, etc.

"wait" and "idle" are basically the same thing - the processor doing nothing. The difference is: if there is a process waiting for I/O - say, it waits for data to load or a memory page to be be moved from paging space back to memory - the time will be added to "wait". If there is no such process in the run queue it will be added to "idle" instead.

All these percentages are taken from the alotted CPU resources of the LPAR. You have a 4 lcpu system. If you run a single-threaded process which consumes one CPU completely, has no I/O and nothing else you will see about 25% user, 1-2% system, wait% 0 and idle% at about 72-73%.

Why not exactly 25? Because the running system will generate some small tasks in user space too, so user% will not show the exact 25% but a bit more.

I hope this helps.

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

What happened if CPU utilization is near to 100 % in AIX 6.1?

Hi all, We have a setup where our application is running on 2 AIX servers ( AIX 6.1 , 16 CPU, P5 570 boxes). These boxes works as disaster recovery server for each other i.e. in case of 1 box failure, whole load will run out of other box. Average CPU utilization on each box is between 30-40 %... (7 Replies)
Discussion started by: MKJ
7 Replies

3. Shell Programming and Scripting

Cpu utilization by a process has to be mailed if more than 5% on AIX

i am using the below command in order to find the cpu utilization by a user..now i want to mail if the cpu utilization goes beyond 5%....can someone please help me ? ps auxw | sort -r +2 | awk '{ print $3,$1 }' | head -6 | egrep "USER|#anonymous#" %CPU USER 2.0 anonymous Regards,... (6 Replies)
Discussion started by: arorap
6 Replies

4. Shell Programming and Scripting

Getting CPU% from a ps command (AIX 5.3)

Hi, I need write a script that check how much CPU% a particular process is using so I execute something like : while : do ps aux | awk '{ if($3 < 10) {printf( "this process %s CPU: %f and process %d\n",$1,$3,$2)}}' sleep 300 done but issue here is that I compare... (0 Replies)
Discussion started by: arizah
0 Replies

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

6. AIX

AIX 6.1 Power6 - Sys CPU utilization twice that of User

Hello, We just purchased two new 4-way (one active one failover) 5Ghz Power6 Servers (failover) with 64GB RAM (32GB per node) runing AIX 6.1 with two LPARs per node connected to our SAN with two 4GB HBAs. The PROD LPAR has 2 dedicated CPUs (4 virtual) and the TEST LPAR has 2 dedicated CPUs. ... (3 Replies)
Discussion started by: troym72
3 Replies

7. Shell Programming and Scripting

Command to find the Memory and CPU utilization using 'top' command

Hi all, I found like top command could be used to find the Memory and CPU utilization. But i want to know how to find the Memory and CPU utilization for a particular user using top command. Thanks in advance. Thanks, Ananthi.U (2 Replies)
Discussion started by: ananthi_ku
2 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. Shell Programming and Scripting

How to calculate Memory and CPU Usage on AIX

I have written a script that will calculate CPU usage and Memory usage of a particular process on AIX Unix. I know the PID and I am using the command -- # for CPU Usage MSG_CPU_USG=`ps uax | grep ${PID} | awk {'print $3'}` #for Memory Usage MSG_MEM_USG=`ps uax | grep ${PID} | awk {'print... (0 Replies)
Discussion started by: asutoshch
0 Replies

10. Shell Programming and Scripting

wat is the command to view the cpu utilization ? nothing works !!!!

hi ! i m in AIX box. i wanna chk the overall CPU utilization : in % . wat command i can try ? i m already done with Vmstat : giving some output iostat : not working (3 Replies)
Discussion started by: pingme8705
3 Replies
Login or Register to Ask a Question