It’s important to know a CPU capacity used by a system. In IBM i world, we have a licpgm – 5761PT1 Performance tools. But what if you run other OS’s than IBM i, on the same POWER box. Or you run LPARs in different shared processor pools ? The most efficient might be tracking CPU cycles dispatched by the POWER Hypervisor. In this post I show you, how to interpret performance data collected by a HMC, and how to allow IBM i collects and display dispatched CPU cycles.
With POWER6, IBM introduced a HMC command lslparutil. The command retrieves a utilization data collected by a HMC, if the ‘utilization data’ feature has been enabled. From my understanding a HMC stores number of CPU cycles assigned to LPAR or pool. With simple calculation we can convert these cycles to percentage of CPU utilization.
Most of the AIX admins use the freeware tool – LPAR2RRD. The tool can run on AIX/Linux/UNIX instance, it talks to a HMC, transfer data, and represent in a graphical format. Most of the IBM i shops won’t be happy, because it needs stuff with some AIX/Linux/UNIX skills. If you decide to use an AIX, the OS license is required.
With IBM i you can get same the same numbers following
If a LPAR runs in shared processor mode use following command
lslparutil -m FRAME -r lpar -h 1 –filter lpar_names=lpartest -F time,entitled_cycles,capped_cycles,uncapped_cycles
It should give you a similar result:
Now, using the formula we can calculate CPU utilization for a particular lpar
lpar utilization = (((9653539819933-9652124977276) + (12886488291342-12885119717818))/(154318675159123-154287609733067))*100
LPAR utilization = 8.95% between 22:50-22:55
If you want to calculate a pool utilization
lslparutil -m FRAME -r pool -h 1 -F time,utilized_pool_cycles,total_pool_cycles
It gives you this
Now, using the formula we can calculate a pool utilization
pool utilization =((814596783594687-814373583411751)/(49423342024877611-49413553638688304))*100
pool utilization = 2,28% between 23:35-23:40.
If you run OS ver 6.1 with certain level of PTF, you can collect the hypervisor data directly by an IBM i LPAR.
To allow collection, it is necessary to enable it, in the partition properties.
Shortly after, you should see the file QAPMLPARH collecting the hypervisor data.
As an alternative you can display these figures in IBM Navigator for i.
In the QAPMLPARH file you can find metrics such as
- HPPRCE – Processor entitled time
- HPPRCEU – Entitled time used
- HPPRCEUU – Uncapped time used
Using formula below you can also get capacity delivered by the POWER Hypervisor
Utilization % = 100 *(HPPRCEU+HPPRCUU)/HPPRCE