[pve-devel] applied: [PATCH manager] pull metric: fix node iowait metric
Fiona Ebner
f.ebner at proxmox.com
Mon Feb 10 10:50:44 CET 2025
Am 02.01.25 um 13:22 schrieb Lukas Wagner:
> 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.
AFAICS, it's not documented anywhere ;)
>
> Reported-by: Dominik Csapak <d.csapak at proxmox.com>
> Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
But we do use the same value for RRD and the "cpu_current" value is also
the percentage, so applied, thanks!
> ---
> 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});
More information about the pve-devel
mailing list