public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] pull metric: fix node iowait metric
@ 2025-01-02 12:22 Lukas Wagner
  2025-02-10  9:50 ` [pve-devel] applied: " Fiona Ebner
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2025-01-02 12:22 UTC (permalink / raw)
  To: pve-devel

The hash from which we query cpu metrics contains 'iowait' as well as
'wait'. The first one is the total amount of time that was spent
waiting on IO, the second one is the percentage of time spent on waiting
on IO in a certain time frame.

For the metrics returned by the /cluster/metrics/export endpoint we want
the second one.

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 PVE/PullMetric.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/PullMetric.pm b/PVE/PullMetric.pm
index 92f4daef..954bd604 100644
--- a/PVE/PullMetric.pm
+++ b/PVE/PullMetric.pm
@@ -103,7 +103,7 @@ my sub get_node_metrics {
     push @$metrics, gauge($id, $timestamp, "cpu_avg15", $cpustat->{avg15});
     push @$metrics, gauge($id, $timestamp, "cpu_max", $cpustat->{cpus});
     push @$metrics, gauge($id, $timestamp, "cpu_current", $cpustat->{cpu});
-    push @$metrics, gauge($id, $timestamp, "cpu_iowait", $cpustat->{iowait});
+    push @$metrics, gauge($id, $timestamp, "cpu_iowait", $cpustat->{wait});
 
     my $memory = $data->{memory};
     push @$metrics, gauge($id, $timestamp, "mem_total", $memory->{memtotal});
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-10  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-02 12:22 [pve-devel] [PATCH manager] pull metric: fix node iowait metric Lukas Wagner
2025-02-10  9:50 ` [pve-devel] applied: " Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal