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

quote $nvSmiExec and use for driverVersion

This commit is contained in:
Nils 2018-02-23 18:55:59 +01:00
parent 7ef2911ee1
commit cc0efe410b

View File

@ -91,7 +91,7 @@ if [ "$1" = "suggest" ]; then
fi
# Get number of GPUs
nGpusOutput=$($nvSmiExec -L)
nGpusOutput=$("$nvSmiExec" -L)
nGpus=$(echo "$nGpusOutput" | wc -l)
if [ "$nGpus" -eq 0 ]; then
# Exit if no GPUs found
@ -100,13 +100,13 @@ if [ "$nGpus" -eq 0 ]; then
fi
# Get full output from nvidia-smi
smiOutput=$($nvSmiExec -q)
smiOutput=$("$nvSmiExec" -q)
# Check if config was requested
if [ "$1" = "config" ]; then
# Get driver version
driverVersion=$(nvidia-smi -q | grep "Driver Version" | cut -d : -f 2 | tr -d ' ')
driverVersion=$(echo "$smiOutput" | grep "Driver Version" | cut -d : -f 2 | tr -d ' ')
# Configure graph depending on what which quantity will be plotted
case $name in