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

Merge pull request #482 from leeclemens/patch-2

_mem should use FB memory used, only
This commit is contained in:
Steve Schnepp 2014-05-05 18:04:05 +02:00
commit fd4002e8a4

View file

@ -127,7 +127,7 @@ if [ "$1" = "config" ]; then
;;
mem)
# First determine total memory of each GPU...
gpusTotalMemOutput=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' '`
gpusTotalMemOutput=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' '`
gpusTotalMem=''
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]
@ -146,7 +146,7 @@ if [ "$1" = "config" ]; then
echo 'graph_args -l 0 -u 100'
echo 'graph_vlabel Percentage'
echo 'graph_category gpu'
echo "graph_info Memory usage for NVIDIA GPUs using driver version $driverVersion (total memory is $gpusTotalMem)"
echo "graph_info FB Memory usage for NVIDIA GPUs using driver version $driverVersion (total memory is $gpusTotalMem)"
;;
fan)
echo 'graph_title GPU fan speed'
@ -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 "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`
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`
valueGpus=''
nGpusCounter=0
while [ $nGpusCounter -lt $nGpus ]