diff options
author | Valerij Fredriksen <valerijf@verizonmedia.com> | 2019-06-21 11:19:52 +0200 |
---|---|---|
committer | Valerij Fredriksen <valerijf@verizonmedia.com> | 2019-06-21 11:19:52 +0200 |
commit | f12fdce65e3ef0c5a1cc73d9e65a1a16c117b157 (patch) | |
tree | b37d91b03eb39d17e3aeb1584d362474255944b0 /node-admin/src | |
parent | 60566d0a8c28de6201d706320f52d749e2658d76 (diff) |
Pass cpu.throttled_time to metrics proxy
Diffstat (limited to 'node-admin/src')
-rw-r--r-- | node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java | 2 | ||||
-rw-r--r-- | node-admin/src/test/resources/expected.container.system.metrics.txt | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java index 977f1016ed8..fcfb7e55145 100644 --- a/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java +++ b/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java @@ -536,6 +536,7 @@ public class NodeAgentImpl implements NodeAgent { final int totalNumCpuCores = stats.getCpuStats().getOnlineCpus(); final long cpuContainerKernelTime = stats.getCpuStats().getUsageInKernelMode(); final long cpuContainerTotalTime = stats.getCpuStats().getTotalUsage(); + final long cpuContainerThrottledTime = stats.getCpuStats().getThrottledTime(); final long cpuSystemTotalTime = stats.getCpuStats().getSystemCpuUsage(); final long memoryTotalBytes = stats.getMemoryStats().getLimit(); final long memoryTotalBytesUsage = stats.getMemoryStats().getUsage(); @@ -564,6 +565,7 @@ public class NodeAgentImpl implements NodeAgent { .withMetric("mem_total.util", 100 * memoryTotalUsageRatio) .withMetric("cpu.util", 100 * cpuUsageRatioOfAllocated) .withMetric("cpu.sys.util", 100 * cpuKernelUsageRatioOfAllocated) + .withMetric("cpu.throttled_time", cpuContainerThrottledTime) .withMetric("cpu.vcpus", node.vcpus()) .withMetric("disk.limit", diskTotalBytes); diff --git a/node-admin/src/test/resources/expected.container.system.metrics.txt b/node-admin/src/test/resources/expected.container.system.metrics.txt index ec750798c98..747e1b43fbd 100644 --- a/node-admin/src/test/resources/expected.container.system.metrics.txt +++ b/node-admin/src/test/resources/expected.container.system.metrics.txt @@ -10,6 +10,7 @@ s: }, "metrics": { "cpu.sys.util": 3.402, + "cpu.throttled_time": 4523, "cpu.util": 5.4, "cpu.vcpus": 2.0, "disk.limit": 250000000000, |