mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
quote $nvSmiExec and use for driverVersion
This commit is contained in:
parent
7ef2911ee1
commit
cc0efe410b
1 changed files with 3 additions and 3 deletions
|
@ -91,7 +91,7 @@ if [ "$1" = "suggest" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get number of GPUs
|
# Get number of GPUs
|
||||||
nGpusOutput=$($nvSmiExec -L)
|
nGpusOutput=$("$nvSmiExec" -L)
|
||||||
nGpus=$(echo "$nGpusOutput" | wc -l)
|
nGpus=$(echo "$nGpusOutput" | wc -l)
|
||||||
if [ "$nGpus" -eq 0 ]; then
|
if [ "$nGpus" -eq 0 ]; then
|
||||||
# Exit if no GPUs found
|
# Exit if no GPUs found
|
||||||
|
@ -100,13 +100,13 @@ if [ "$nGpus" -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get full output from nvidia-smi
|
# Get full output from nvidia-smi
|
||||||
smiOutput=$($nvSmiExec -q)
|
smiOutput=$("$nvSmiExec" -q)
|
||||||
|
|
||||||
# Check if config was requested
|
# Check if config was requested
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
# Get driver version
|
# 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
|
# Configure graph depending on what which quantity will be plotted
|
||||||
case $name in
|
case $name in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue