1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

represent the memory as a floating point with 0 after the dot so it will be rounded and not floored

This commit is contained in:
Younes Ichiche 2021-11-28 18:53:03 +01:00 committed by Lars Kruse
parent 58dbb4d0b6
commit 3dd16cc568

View file

@ -345,13 +345,13 @@ function get_memory_value {
while read -r line; do
echo "$line" | awk '/total-memory:/{
gsub(/MiB/,"",$2);
printf "total_memory.value %d\n", $2
printf "total_memory.value %.0f\n", $2
}'
done <<< "$data"
while read -r line; do
echo "$line" | awk '/free-memory:/{
gsub(/MiB/,"",$2);
printf "free_memory.value %d\n", $2
printf "free_memory.value %.0f\n", $2
}'
done <<< "$data"
# berechne used-memory