This commit is contained in:
Michael Grote 2021-09-21 19:24:29 +02:00
parent 19f2288c84
commit f68e1673b7

View file

@ -274,13 +274,14 @@ function get_memory_value {
done <<< "$data"
# berechne used-memory
# gesamt + frei = benutzt
echo USEEEEEEEEEEED: $mem_used
while read -r line; do
mem_total=$(echo $line | awk '/total-memory:/{ gsub(/MiB/,"",$2); print $2 }')
echo FREEEEEEEEEEEE111: $mem_free
mem_free=$(echo $line | awk '/free-memory:/{ gsub(/MiB/,"",$2); print $2 }')
echo TOTAAAAAAAAAAAAL111: $mem_total
done <<< "$data"
mem_total=$(
while read -r line; do
echo $line | awk '/total-memory:/{ gsub(/MiB/,"",$2); print $2 }')
done <<< "$data")
mem_free=$(
while read -r line; do
echo $line | awk '/free-memory:/{ gsub(/MiB/,"",$2); print $2 }')
done <<< "$data")
echo FREEEEEEEEEEEE: $mem_free
echo TOTAAAAAAAAAAAAL: $mem_total
mem_used=$(awk '{ print("'"$mem_total"'" - "'"$mem_free"'") }')