Question & Answer
Question
How is cluster CPU% calculated in RTM Grid -> Dashboards -> Cluster -> Cluster Summary?
Cause
Sometimes, the cluster CPU% is not the average of host CPU utilization in the cluster. 
Answer
The cluster CPU% is calculated using two RTM Database tables: grid_hostinfo, grid_load
Use the following query to get CPU usage of each host in the cluster, replace <clusterid> with real clusterid
select h.host, h.clusterid, cpuFactor, maxCpus, isServer, status, ut from grid_hostinfo h, grid_load d where h.host = d.host and h.clusterid = <clusterid> and h.clusterid = d.clusterid and isServer=1 and d.status NOT LIKE 'U%';
+--------+-----------+-----------+---------+----------+--------+----------+
| host | clusterid | cpuFactor | maxCpus | isServer | status | ut |
+--------+-----------+-----------+---------+----------+--------+----------+
| abcd-6 | 2 | 60.000000 | 2 | 1 | Ok | 0.660551 |
| abcd-2 | 2 | 60.000000 | 2 | 1 | Ok | 0.999512 |
| abcd-4 | 2 | 60.000000 | 2 | 1 | Ok | 0.999512 |
| abcd-3 | 2 | 60.000000 | 2 | 1 | Ok | 0.999512 |
+--------+-----------+-----------+---------+----------+--------+----------+
Note there are two additional conditions:
1) isServer=1, this means only static LSF server hosts are included, dynamic hosts are excluded.
2) status NOT LIKE 'U%', 'unavailable' status hosts are excluded.
Then cluster CPU% is calculated using the formula:
SUM(cpuFactor*maxCpus*ut) / SUM(cpuFactor*maxCpus)
Only if all hosts have the same cpuFactor and maxCpus, then cluster CPU% is the average of host CPU utilization
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1016925