From 5224b31bbd417fbcfcb6d0bf6ff93be8c120dc22 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Mon, 10 Jan 2022 05:52:57 +0100 Subject: [PATCH] read_proc_stat : initialize newer fields to 0 new fields has been added recently, but values are not initialized https://git.proxmox.com/?p=pve-common.git;a=commit;h=5a82eb712e4c879a271686f07c589fadc0b09185 as total of all fields is compute later, this can give undef values --- src/PVE/ProcFSTools.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/ProcFSTools.pm b/src/PVE/ProcFSTools.pm index a75274a..c816131 100644 --- a/src/PVE/ProcFSTools.pm +++ b/src/PVE/ProcFSTools.pm @@ -162,7 +162,7 @@ sub read_pressure { my $last_proc_stat; sub read_proc_stat { - my $res = { user => 0, nice => 0, system => 0, idle => 0 , sum => 0}; + my $res = { user => 0, nice => 0, system => 0, idle => 0 , iowait => 0, irq => 0, softirq => 0, steal => 0, guest => 0, guest_nice => 0, sum => 0}; my $cpucount = 0;