Update dsmon.sh

This commit is contained in:
2024-01-26 11:28:07 -06:00
parent 056fb44b1c
commit fdc6b5dd17

View File

@@ -340,7 +340,8 @@ SETUPSSH(){
RUNCMD(){
start=`date +%s`
rm -f /tmp/.dsmon.runcmd.*
echo -en "\n${idsCL[White]}Iniating command to run on all nodes ... "
echo -e "\n${idsCL[White]}The following command will be run on all nodes:"
echo -e "${idsST[Bold]}'${idsCL[LightCyan]}here${idsCL[White]}'${idsCL[Default]}${idsST[Reset]}\n"
ncount=0
while read hostid hostname hostip hostlimits; do
if [ "${hostname}" != "host" ]; then
@@ -348,7 +349,6 @@ RUNCMD(){
((ncount++))
fi
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 ORDER BY host ASC")
echo -e "${idsCL[LightGreen]}Done\n"
nc_count=0; lcount=0; completed=false
until [ "${completed}" == "true" ]; do