2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

append newline to support _mem and multiple GPUs

Memory used percentages were being concatenated into a single string if multiple GPUs were present, e.g. both using 30% would print mem0.value 3030 mem1.value
This commit is contained in:
leeclemens 2014-01-23 14:33:43 -05:00
parent 2a31f93e4a
commit 7713329755

View File

@ -180,7 +180,7 @@ case $name in
totalMemGpu=`echo "$totalMemGpus" | sed -n $(( $nGpusCounter + 1 ))p`
usedMemGpu=`echo "$usedMemGpus" | sed -n $(( $nGpusCounter + 1 ))p`
percentMemUsed=$(( $usedMemGpu * 100 / $totalMemGpu ))
valueGpus="${valueGpus}${percentMemUsed}"
valueGpus="${valueGpus}${percentMemUsed}"$'\n'
: $(( nGpusCounter = $nGpusCounter + 1 ))
done
;;