]> git.proxmox.com Git - pve-common.git/commit
proc fs tools: handle proc/stat without guest values
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 22 Apr 2022 07:17:48 +0000 (09:17 +0200)
committerFabian Ebner <f.ebner@proxmox.com>
Tue, 14 Jun 2022 08:25:24 +0000 (10:25 +0200)
commit2e8331ba22db97e439db8d73f0c1e5529a3c63b3
tree35b0909d59e01a68c0938d243fc0ae188a350a8a
parent08853d22ccee93e8772bc3307c12d67be86cba94
proc fs tools: handle proc/stat without guest values

PMG is often run as a container, and in certain environments (like
Virtuozzo 7), the last two values (guest and guest_nice) might not be
present. This led to a division by zero, because the total value was
never updated.

Reported in the community forum:
https://forum.proxmox.com/threads/106896/

Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/ProcFSTools.pm