Update dsmon.sh
This commit is contained in:
8
dsmon.sh
8
dsmon.sh
@@ -148,9 +148,9 @@ CHECK(){
|
|||||||
fi
|
fi
|
||||||
started_hosts=0
|
started_hosts=0
|
||||||
for hostname in "${hostnames_sort[@]}"; do
|
for hostname in "${hostnames_sort[@]}"; do
|
||||||
# while [ $(jobs -rp | wc -l) -ge 12 ]; do sleep 0.5; done
|
while [ $(jobs -rp | wc -l) -ge 12 ]; do sleep 0.5; done
|
||||||
unbuffer bash -c "/usr/local/bin/dsmon runcheck '${hostname}'" > /tmp/dscheck.${hostname}.results &
|
# unbuffer bash -c "/usr/local/bin/dsmon runcheck '${hostname}'" > /tmp/dscheck.${hostname}.results &
|
||||||
# unbuffer RUN_CHECK "$hostname" > /tmp/dscheck.${hostname}.results &
|
unbuffer RUN_CHECK "$hostname" > /tmp/dscheck.${hostname}.results &
|
||||||
((started_hosts++))
|
((started_hosts++))
|
||||||
[ "${1}" != "report" ] && printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts %s${idsCL[Default]}" "${started_hosts}" "${#hostnames_sort[@]}" $([[ "$started_hosts" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "")
|
[ "${1}" != "report" ] && printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts %s${idsCL[Default]}" "${started_hosts}" "${#hostnames_sort[@]}" $([[ "$started_hosts" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "")
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ CHECK(){
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
lc_count=${nc_count}
|
lc_count=${nc_count}
|
||||||
sleep 1s
|
# sleep 1s
|
||||||
done
|
done
|
||||||
|
|
||||||
end=`date +%s`; runtime=$((end-start)); echo -e "\nScript Runtime: ${runtime}s"
|
end=`date +%s`; runtime=$((end-start)); echo -e "\nScript Runtime: ${runtime}s"
|
||||||
|
|||||||
Reference in New Issue
Block a user