Skip to content

Commit

Permalink
Issue #82: On AIX, use LPAR PhysicalCPU to scale nmon TOP PID CPU% (#83)
Browse files Browse the repository at this point in the history
* Issue #82: On AIX, use LPAR PhysicalCPU to scale nmon TOP PID CPU%
  • Loading branch information
kgibm authored Aug 18, 2020
1 parent 5d52cf0 commit c08b724
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/com/ibm/nmon/parser/NMONParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -833,11 +833,16 @@ private double[] scaleProcessDataByCPUs(ProcessDataType processType, double[] va
double CPUs = fileCPUs;

if (isAIX) {
DataType cpuAll = data.getType("PCPU_ALL");

// hasData should also cover cpuAll == null
if (currentRecord.hasData(cpuAll)) {
CPUs = currentRecord.getData(cpuAll, "Entitled Capacity");
DataType lpar = data.getType("LPAR");
if (currentRecord.hasData(lpar)) {
CPUs = currentRecord.getData(lpar, "entitled");
} else {
DataType cpuAll = data.getType("PCPU_ALL");

// hasData should also cover cpuAll == null
if (currentRecord.hasData(cpuAll)) {
CPUs = currentRecord.getData(cpuAll, "Entitled Capacity");
}
}
}
else {
Expand Down

0 comments on commit c08b724

Please sign in to comment.