mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
use variable names also in the configuration
This commit is contained in:
parent
cf52a44380
commit
60a2093605
@ -120,11 +120,11 @@ if [ "$1" = "config" ]; then
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "temp${nGpusCounter}.warning ${warning:-75}"
|
||||
echo "temp${nGpusCounter}.critical ${critical:-95}"
|
||||
echo "temp${nGpusCounter}.info Temperature information for $gpuName"
|
||||
echo "${name}${nGpusCounter}.warning ${warning:-75}"
|
||||
echo "${name}${nGpusCounter}.critical ${critical:-95}"
|
||||
echo "${name}${nGpusCounter}.info Temperature information for $gpuName"
|
||||
: $((nGpusCounter=nGpusCounter+1))
|
||||
done
|
||||
done
|
||||
;;
|
||||
mem)
|
||||
# First determine total memory of each GPU...
|
||||
@ -134,7 +134,7 @@ if [ "$1" = "config" ]; then
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "mem${nGpusCounter}.info Memory information for $gpuName"
|
||||
echo "${name}${nGpusCounter}.info Memory information for $gpuName"
|
||||
gpuMem=$(echo "$gpusTotalMemOutput"| sed -n $((nGpusCounter+1))p)
|
||||
gpusTotalMem="${gpusTotalMem}${gpuMem} for GPU ${nGpusCounter}"
|
||||
: $((nGpusCounter=nGpusCounter+1))
|
||||
@ -159,9 +159,9 @@ if [ "$1" = "config" ]; then
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "fan${nGpusCounter}.info Fan information for $gpuName"
|
||||
echo "${name}${nGpusCounter}.info Fan information for $gpuName"
|
||||
: $((nGpusCounter=nGpusCounter+1))
|
||||
done
|
||||
done
|
||||
;;
|
||||
power)
|
||||
echo 'graph_title GPU power consumption'
|
||||
@ -172,7 +172,7 @@ if [ "$1" = "config" ]; then
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "power${nGpusCounter}.info power consumption of $gpuName"
|
||||
echo "${name}${nGpusCounter}.info power consumption of $gpuName"
|
||||
: $((nGpusCounter=nGpusCounter+1))
|
||||
done
|
||||
;;
|
||||
@ -186,7 +186,7 @@ if [ "$1" = "config" ]; then
|
||||
while [ "$nGpusCounter" -lt "$nGpus" ]
|
||||
do
|
||||
gpuName=$(echo "$nGpusOutput" | sed -n $((nGpusCounter+1))p | cut -d \( -f 1)
|
||||
echo "utilization${nGpusCounter}.info GPU utilization information for $gpuName"
|
||||
echo "${name}${nGpusCounter}.info GPU utilization information for $gpuName"
|
||||
: $((nGpusCounter=nGpusCounter+1))
|
||||
done
|
||||
;;
|
||||
@ -255,6 +255,3 @@ do
|
||||
echo "${name}${nGpusCounter}.value $value"
|
||||
: $((nGpusCounter=nGpusCounter+1))
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user