mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
remove quote from nGpusCounter
This commit is contained in:
parent
cc0efe410b
commit
52917d2bea
@ -117,7 +117,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_category sensors'
|
||||
echo "graph_info Temperature information for NVIDIA GPUs using driver version $driverVersion"
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "${name}${nGpusCounter}.warning ${warning:-75}"
|
||||
@ -131,7 +131,7 @@ if [ "$1" = "config" ]; then
|
||||
gpusTotalMemOutput=$(echo "$smiOutput" | grep -v BAR1 | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | tr -d ' ')
|
||||
gpusTotalMem=''
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "${name}${nGpusCounter}.info Memory information for $gpuName"
|
||||
@ -156,7 +156,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_category sensors'
|
||||
echo "graph_info Fan speed of NVIDIA GPUs using driver version $driverVersion"
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "${name}${nGpusCounter}.info Fan information for $gpuName"
|
||||
@ -169,7 +169,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_category sensors'
|
||||
echo "graph_info power consumption of NVIDIA GPUs using driver version $driverVersion"
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "${name}${nGpusCounter}.info power consumption of $gpuName"
|
||||
@ -183,7 +183,7 @@ if [ "$1" = "config" ]; then
|
||||
echo 'graph_category system'
|
||||
echo "graph_info GPU utilization of NVIDIA GPUs using driver version $driverVersion"
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "${name}${nGpusCounter}.info GPU utilization information for $gpuName"
|
||||
@ -199,7 +199,7 @@ if [ "$1" = "config" ]; then
|
||||
|
||||
# Common stuff for all quantities
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "${name}${nGpusCounter}.label $gpuName"
|
||||
@ -221,7 +221,7 @@ case $name in
|
||||
usedMemGpus=$(echo "$smiOutput" | grep -v BAR1 | grep -A 3 "Memory Usage" | grep "Used" | cut -d : -f 2 | cut -d ' ' -f 2)
|
||||
valueGpus=''
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
totalMemGpu=$(echo "$totalMemGpus" | sed -n $((nGpusCounter+1))p)
|
||||
usedMemGpu=$(echo "$usedMemGpus" | sed -n $((nGpusCounter+1))p)
|
||||
@ -249,7 +249,7 @@ case $name in
|
||||
|
||||
# Print requested value
|
||||
nGpusCounter=0
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
while [ $nGpusCounter -lt "$nGpus" ]
|
||||
do
|
||||
value=$(echo "$valueGpus" | sed -n $((nGpusCounter+1))p)
|
||||
echo "${name}${nGpusCounter}.value $value"
|
||||
|
Loading…
Reference in New Issue
Block a user