1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-01 22:03:57 +00:00

Merge pull request #518 from asgh/patch-1

Fix memory usage check
This commit is contained in:
Steve Schnepp 2014-08-20 14:57:40 +02:00
commit de2705acd2

View file

@ -127,7 +127,7 @@ if [ "$1" = "config" ]; then
;;
mem)
# First determine total memory of each GPU...
gpusTotalMemOutput=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' '`
gpusTotalMemOutput=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' '`
gpusTotalMem=''
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
@ -189,8 +189,8 @@ case $name in
valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2`
;;
mem)
totalMemGpus=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Total" | cut -d : -f 2 | cut -d ' ' -f 2`
usedMemGpus=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Used" | cut -d : -f 2 | cut -d ' ' -f 2`
totalMemGpus=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | cut -d ' ' -f 2`
usedMemGpus=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Used" | cut -d : -f 2 | cut -d ' ' -f 2`
valueGpus=''
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]