2
0
Fork 0
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:
Nils 2018-02-23 19:27:22 +01:00
parent cc0efe410b
commit 52917d2bea

View file

@ -117,7 +117,7 @@ if [ "$1" = "config" ]; then
echo 'graph_category sensors' echo 'graph_category sensors'
echo "graph_info Temperature information for NVIDIA GPUs using driver version $driverVersion" echo "graph_info Temperature information for NVIDIA GPUs using driver version $driverVersion"
nGpusCounter=0 nGpusCounter=0
while [ "$nGpusCounter" -lt "$nGpus" ] while [ $nGpusCounter -lt "$nGpus" ]
do do
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1) gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.warning ${warning:-75}" 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 ' ') gpusTotalMemOutput=$(echo "$smiOutput" | grep -v BAR1 | 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" ]
do do
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1) gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.info Memory information for $gpuName" echo "${name}${nGpusCounter}.info Memory information for $gpuName"
@ -156,7 +156,7 @@ if [ "$1" = "config" ]; then
echo 'graph_category sensors' echo 'graph_category sensors'
echo "graph_info Fan speed of NVIDIA GPUs using driver version $driverVersion" echo "graph_info Fan speed of NVIDIA GPUs using driver version $driverVersion"
nGpusCounter=0 nGpusCounter=0
while [ "$nGpusCounter" -lt "$nGpus" ] while [ $nGpusCounter -lt "$nGpus" ]
do do
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1) gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.info Fan information for $gpuName" echo "${name}${nGpusCounter}.info Fan information for $gpuName"
@ -169,7 +169,7 @@ if [ "$1" = "config" ]; then
echo 'graph_category sensors' echo 'graph_category sensors'
echo "graph_info power consumption of NVIDIA GPUs using driver version $driverVersion" echo "graph_info power consumption of NVIDIA GPUs using driver version $driverVersion"
nGpusCounter=0 nGpusCounter=0
while [ "$nGpusCounter" -lt "$nGpus" ] while [ $nGpusCounter -lt "$nGpus" ]
do do
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1) gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.info power consumption of $gpuName" echo "${name}${nGpusCounter}.info power consumption of $gpuName"
@ -183,7 +183,7 @@ if [ "$1" = "config" ]; then
echo 'graph_category system' echo 'graph_category system'
echo "graph_info GPU utilization of NVIDIA GPUs using driver version $driverVersion" echo "graph_info GPU utilization of NVIDIA GPUs using driver version $driverVersion"
nGpusCounter=0 nGpusCounter=0
while [ "$nGpusCounter" -lt "$nGpus" ] while [ $nGpusCounter -lt "$nGpus" ]
do do
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1) gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.info GPU utilization information for $gpuName" echo "${name}${nGpusCounter}.info GPU utilization information for $gpuName"
@ -199,7 +199,7 @@ if [ "$1" = "config" ]; then
# Common stuff for all quantities # Common stuff for all quantities
nGpusCounter=0 nGpusCounter=0
while [ "$nGpusCounter" -lt "$nGpus" ] while [ $nGpusCounter -lt "$nGpus" ]
do do
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1) gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
echo "${name}${nGpusCounter}.label $gpuName" 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) usedMemGpus=$(echo "$smiOutput" | grep -v BAR1 | 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" ]
do do
totalMemGpu=$(echo "$totalMemGpus" | sed -n $((nGpusCounter+1))p) totalMemGpu=$(echo "$totalMemGpus" | sed -n $((nGpusCounter+1))p)
usedMemGpu=$(echo "$usedMemGpus" | sed -n $((nGpusCounter+1))p) usedMemGpu=$(echo "$usedMemGpus" | sed -n $((nGpusCounter+1))p)
@ -249,7 +249,7 @@ case $name in
# Print requested value # Print requested value
nGpusCounter=0 nGpusCounter=0
while [ "$nGpusCounter" -lt "$nGpus" ] while [ $nGpusCounter -lt "$nGpus" ]
do do
value=$(echo "$valueGpus" | sed -n $((nGpusCounter+1))p) value=$(echo "$valueGpus" | sed -n $((nGpusCounter+1))p)
echo "${name}${nGpusCounter}.value $value" echo "${name}${nGpusCounter}.value $value"