Update dsmon.sh
This commit is contained in:
7
dsmon.sh
7
dsmon.sh
@@ -319,7 +319,7 @@ RUN_CHECK(){
|
|||||||
SETUPSSH(){
|
SETUPSSH(){
|
||||||
declare -A host_ip
|
declare -A host_ip
|
||||||
declare -A host_name
|
declare -A host_name
|
||||||
|
|
||||||
while read hostid hostname hostip hostlimits; do
|
while read hostid hostname hostip hostlimits; do
|
||||||
if [ "$hostid" != "id" ]; then
|
if [ "$hostid" != "id" ]; then
|
||||||
host_ip[${hostid}]=$(echo $hostip | cut -d ";" -f1)
|
host_ip[${hostid}]=$(echo $hostip | cut -d ";" -f1)
|
||||||
@@ -339,9 +339,8 @@ SETUPSSH(){
|
|||||||
|
|
||||||
RUNCMD(){
|
RUNCMD(){
|
||||||
start=`date +%s`
|
start=`date +%s`
|
||||||
|
|
||||||
rm -f /tmp/.dsmon.runcmd.*
|
rm -f /tmp/.dsmon.runcmd.*
|
||||||
|
echo -e "${idsCL[White]}Iniating commans on all nodes ... "
|
||||||
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
|
||||||
@@ -349,7 +348,7 @@ 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
|
||||||
for nodecmd in /tmp/.dsmon.runcmd.*.done; do
|
for nodecmd in /tmp/.dsmon.runcmd.*.done; do
|
||||||
|
|||||||
Reference in New Issue
Block a user