public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] pull metric: fix node iowait metric
Date: Thu,  2 Jan 2025 13:22:52 +0100	[thread overview]
Message-ID: <20250102122252.146567-1-l.wagner@proxmox.com> (raw)

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


                 reply	other threads:[~2025-01-02 12:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250102122252.146567-1-l.wagner@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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