funktion aus schleife entfernt

This commit is contained in:
Michael Grote 2021-09-21 16:27:45 +02:00
parent 51ac0ebcd6
commit f45b35654c

View file

@ -198,6 +198,12 @@ function get_cpu_detail_label {
}
function get_cpu_detail_value {
echo multigraph cpu_load_detail_$name
while read -r line; do
echo $line | awk '/cpu-load:/{
gsub(/%/,"",$2);
print "cpu_total.value " $2
}'
done <<< "$data"
c=0
while [ "$c" -lt "$anzahl_cpu" ]; do
while read -r line; do
@ -209,10 +215,6 @@ function get_cpu_detail_value {
print "cpu"'"$c"'"_irq.value " $4
print "cpu"'"$c"'"_disk.value " $5
}'
echo $line | awk '/cpu-load:/{
gsub(/%/,"",$2);
print "cpu_total.value " $2
}'
done <<< "$data"
c=$(( $c + 1 ))
done