Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -340,7 +340,8 @@ SETUPSSH(){
|
|||||||
RUNCMD(){
|
RUNCMD(){
|
||||||
start=`date +%s`
|
start=`date +%s`
|
||||||
rm -f /tmp/.dsmon.runcmd.*
|
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
|
ncount=0
|
||||||
while read hostid hostname hostip hostlimits; do
|
while read hostid hostname hostip hostlimits; do
|
||||||
if [ "${hostname}" != "host" ]; then
|
if [ "${hostname}" != "host" ]; then
|
||||||
@@ -348,7 +349,6 @@ RUNCMD(){
|
|||||||
((ncount++))
|
((ncount++))
|
||||||
fi
|
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")
|
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
|
nc_count=0; lcount=0; completed=false
|
||||||
until [ "${completed}" == "true" ]; do
|
until [ "${completed}" == "true" ]; do
|
||||||
|
|||||||
Reference in New Issue
Block a user