[YARN-10353] Log vcores used and cumulative cpu in containers monitor.
Contributed by Jim Brennan
This commit is contained in:
parent
f2033de234
commit
736bed6d6d
|
@ -648,15 +648,20 @@ public class ContainersMonitorImpl extends AbstractService implements
|
|||
long vmemLimit = ptInfo.getVmemLimit();
|
||||
long pmemLimit = ptInfo.getPmemLimit();
|
||||
if (AUDITLOG.isDebugEnabled()) {
|
||||
int vcoreLimit = ptInfo.getCpuVcores();
|
||||
long cumulativeCpuTime = pTree.getCumulativeCpuTime();
|
||||
AUDITLOG.debug(
|
||||
"Resource usage of ProcessTree {} for container-id {}:" +
|
||||
" {} CPU:{} CPU/core:{}",
|
||||
" {} %CPU: {} %CPU-cores: {}" +
|
||||
" vCores-used: {} of {} Cumulative-CPU-ms: {}",
|
||||
pId, containerId,
|
||||
formatUsageString(
|
||||
currentVmemUsage, vmemLimit,
|
||||
currentPmemUsage, pmemLimit),
|
||||
cpuUsagePercentPerCore,
|
||||
cpuUsageTotalCoresPercentage);
|
||||
cpuUsageTotalCoresPercentage,
|
||||
milliVcoresUsed / 1000, vcoreLimit,
|
||||
cumulativeCpuTime);
|
||||
}
|
||||
|
||||
// Add resource utilization for this container
|
||||
|
|
Loading…
Reference in New Issue