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:
parent
7ef2911ee1
commit
cc0efe410b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user