5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-09 05:17:35 +03:00

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
This commit is contained in:
Alexandre Derumier 2022-01-10 05:52:57 +01:00 committed by Thomas Lamprecht
parent 964684b5e2
commit 5224b31bbd

View File

@ -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;