mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Fix memory usage check
Change "FB Memory Usage" to just "Memory Usage" - this will also work on an old version that still uses the "FB" terminology.
This commit is contained in:
parent
56573f4600
commit
d8dad71362
1 changed files with 3 additions and 3 deletions
|
@ -127,7 +127,7 @@ if [ "$1" = "config" ]; then
|
||||||
;;
|
;;
|
||||||
mem)
|
mem)
|
||||||
# First determine total memory of each GPU...
|
# 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=''
|
gpusTotalMem=''
|
||||||
nGpusCounter=0
|
nGpusCounter=0
|
||||||
while [ $nGpusCounter -lt $nGpus ]
|
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`
|
valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2`
|
||||||
;;
|
;;
|
||||||
mem)
|
mem)
|
||||||
totalMemGpus=`echo "$smiOutput" | grep -A 3 "FB Memory Usage" | grep "Total" | 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 "FB Memory Usage" | grep "Used" | 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=''
|
valueGpus=''
|
||||||
nGpusCounter=0
|
nGpusCounter=0
|
||||||
while [ $nGpusCounter -lt $nGpus ]
|
while [ $nGpusCounter -lt $nGpus ]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue