]> granicus.if.org Git - icinga2/commit
Fixed precision for percentage calculations with large units
authorPer von Zweigbergk <pvz@itassistans.se>
Sat, 31 Oct 2015 13:47:36 +0000 (14:47 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 08:47:19 +0000 (09:47 +0100)
commit30f9a1e3939b164ffee3b906a592deae6f09418c
treef869d3eed90d1f77e3f5013630e9dd406de71303
parent4f253e53ea309d4c1bd7601fc5621e1a71579b41
Fixed precision for percentage calculations with large units

The check_memory and check_swap plugins on Windows were incorrectly
rounding the memory/swap measurements to the nearest unit prior to
calculating a percentage. This was causing imprecise percentage
values when the unit selected meant that the values in question had
few significant figures.

fixes #10497

Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
plugins/check_memory.cpp
plugins/check_memory.h
plugins/check_swap.cpp
plugins/check_swap.h