1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fix multiple shellcheck issues

This commit is contained in:
Lars Kruse 2019-08-13 03:59:54 +02:00
parent 5b1099fb83
commit 7fed3b9765
18 changed files with 59 additions and 50 deletions

View file

@ -37,16 +37,16 @@ if [ "$1" = "autoconf" ]; then
fi
fi
labels=`$NFSSTAT -c | grep -iv "[0-9]" | grep -v ":" | sed 's/X\ /x_/' | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26}' | tr '[A-Z]' '[a-z]'`
values=`$NFSSTAT -c | grep -i "[0-9]" | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26}'`
labels=$("$NFSSTAT" -c | grep -iv "[0-9]" | grep -v ":" | sed 's/X\ /x_/' | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26}' | tr '[:upper:]' '[:lower:]')
values=$("$NFSSTAT" -c | grep -i "[0-9]" | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26}')
larray=( $labels )
varray=( $values )
read -r -a larray <<<"$labels"
read -r -a varray <<<"$values"
if [ "$1" = "config" ]; then
echo 'graph_title NFSv3 Client'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel requests / ${graph_period}'
echo "graph_vlabel requests / \${graph_period}"
echo 'graph_total total'
echo 'graph_category fs'
for a in $labels; do echo "$a.label $a" ; echo "$a.type DERIVE"; echo "$a.min 0"; done

View file

@ -37,16 +37,16 @@ if [ "$1" = "autoconf" ]; then
fi
fi
labels=`$NFSSTAT -c | grep -iv "[0-9]" | tail -n 2 | sed 's/BioRLHits/BioRL\ Hits/g' | awk '{print $1"_"$2,$1"_"$3,$4"_"$5,$4"_"$6,$7"_"$8,$7"_"$9,$10"_"$11,$10"_"$12}' | tr '\n' ' ' | tr '[A-Z]' '[a-z]'`
values=`$NFSSTAT -c | grep -i "[0-9]" | tail -n 2 | tr '\n' ' '`
labels=$("$NFSSTAT" -c | grep -iv "[0-9]" | tail -n 2 | sed 's/BioRLHits/BioRL\ Hits/g' | awk '{print $1"_"$2,$1"_"$3,$4"_"$5,$4"_"$6,$7"_"$8,$7"_"$9,$10"_"$11,$10"_"$12}' | tr '\n' ' ' | tr '[:upper:]' '[:lower:]')
values=$("$NFSSTAT" -c | grep -i "[0-9]" | tail -n 2 | tr '\n' ' ')
larray=( $labels )
varray=( $values )
read -r -a larray <<<"$labels"
read -r -a varray <<<"$values"
if [ "$1" = "config" ]; then
echo 'graph_title NFSv3 Client Cache'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel requests / ${graph_period}'
echo "graph_vlabel requests / \${graph_period}"
echo 'graph_total total'
echo 'graph_category fs'
for a in $labels; do echo "$a.label $a" ; echo "$a.type DERIVE"; echo "$a.min 0"; done

View file

@ -38,17 +38,17 @@ if [ "$1" = "autoconf" ]; then
fi
fi
labels=`$NFSSTAT -s | grep -iv "[0-9]" | grep -v ":" | sed 's/Server\ //' | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30}' | tr '[A-Z]' '[a-z]'`
values=`$NFSSTAT -s | grep -i "[0-9]" | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30}'`
labels=$("$NFSSTAT" -s | grep -iv "[0-9]" | grep -v ":" | sed 's/Server\ //' | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30}' | tr '[:upper:]' '[:lower:]')
values=$("$NFSSTAT" -s | grep -i "[0-9]" | tr '\n' ' ' | awk '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30}')
larray=( $labels )
varray=( $values )
read -r -a larray <<<"$labels"
read -r -a varray <<<"$values"
if [ "$1" = "config" ]; then
echo 'graph_title NFSv3 Server'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel requests / ${graph_period}'
echo "graph_vlabel requests / \${graph_period}"
echo 'graph_total total'
echo 'graph_category fs'
for a in $labels; do echo "$a.label $a" ; echo "$a.type DERIVE"; echo "$a.min 0"; done