Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -148,14 +148,14 @@ CHECK(){
|
||||
fi
|
||||
started_hosts=0
|
||||
for hostname in "${hostnames_sort[@]}"; do
|
||||
while [ $(jobs -rp | wc -l) -ge 15 ]; do sleep 0.5; done
|
||||
# while [ $(jobs -rp | wc -l) -ge 15 ]; do sleep 0.5; done
|
||||
unbuffer bash -c "/usr/local/bin/dsmon runcheck '${hostname}'" > /tmp/dscheck.${hostname}.results &
|
||||
((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 "")
|
||||
|
||||
done
|
||||
[ "${1}" != "report" ] && echo -e "\r\033[2K${idsCL[LightCyan]}${MSG}${spc}: ${idsCL[LightGreen]}Done${idsCL[Default]}"
|
||||
echo
|
||||
|
||||
shopt -s nullglob
|
||||
nc_count=0; lc_count=0; completed=false; scanstart=$(date +%s)
|
||||
until [ "${completed}" == "true" ]; do
|
||||
|
||||
Reference in New Issue
Block a user