]> 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)
committerJean Flach <jean-marcel.flach@netways.de>
Fri, 19 Feb 2016 10:30:12 +0000 (11:30 +0100)
commit5c18c1ed2da855711fea43e04e0d5d00b071923f
treea31e64c34b0b16fed27c747763c58103d0ae49ae
parent9a8458fd677d4e3117abc04e7d094b36e8ec9d3d
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