summaryrefslogtreecommitdiffstats
path: root/node-admin
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@verizonmedia.com>2019-05-26 15:46:24 +0200
committerValerij Fredriksen <valerijf@verizonmedia.com>2019-05-26 15:46:24 +0200
commit452b703741b35561177a588abc7efcc1fcae8c1a (patch)
tree0fe26f340272a985079be4eea6c52d98b6f8a227 /node-admin
parent246beba68517df5659173e1dcf5907872708e40e (diff)
Report vcpus of the node rather than the host
Diffstat (limited to 'node-admin')
-rw-r--r--node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/nodeagent/NodeAgentImpl.java2
-rw-r--r--node-admin/src/test/resources/expected.container.system.metrics.txt2
2 files changed, 2 insertions, 2 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 e414dfd3803..a0ad1890967 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
@@ -566,7 +566,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.vcpus", totalNumCpuCores)
+ .withMetric("cpu.vcpus", node.getMinCpuCores())
.withMetric("disk.limit", diskTotalBytes);
diskTotalBytesUsed.ifPresent(diskUsed -> systemMetricsBuilder.withMetric("disk.used", diskUsed));
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 19edf6e1843..c44d72b395e 100644
--- a/node-admin/src/test/resources/expected.container.system.metrics.txt
+++ b/node-admin/src/test/resources/expected.container.system.metrics.txt
@@ -15,7 +15,7 @@ s:
"disk.used": 39625000000,
"cpu.sys.util": 3.402,
"disk.util": 15.85,
- "cpu.vcpus": 8,
+ "cpu.vcpus": 2.0,
"cpu.util": 5.4,
"mem.util": 25.0,
"disk.limit": 250000000000