Update dsmon.sh

This commit is contained in:
2025-06-14 14:44:23 -05:00
parent 942099c849
commit e1bef7a79e

View File

@@ -149,8 +149,7 @@ CHECK(){
started_hosts=0
for hostname in "${hostnames_sort[@]}"; do
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 &
unbuffer RUN_CHECK "$hostname" > /tmp/dscheck.${hostname}.results &
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 "")