Update dsmon.sh

This commit is contained in:
2025-06-14 10:09:54 -05:00
parent 199d809560
commit f114fe0897

View File

@@ -111,8 +111,7 @@ CHECK(){
c=0; cw=${C_CW}; spc=''; spc1=$(expr ${cw} - ${#MSG}); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done c=0; cw=${C_CW}; spc=''; spc1=$(expr ${cw} - ${#MSG}); until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[LightCyan]}${MSG}${spc}: " echo -en "${idsCL[LightCyan]}${MSG}${spc}: "
fi fi
MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0" | MYSQL_PWD="sysmoninsert" ${mysqlcmd} ${mysql_conn} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0" | while read hostid hostname hostip hostlimits; do
while read hostid hostname hostip hostlimits; do
if [ "$hostid" != "id" ]; then if [ "$hostid" != "id" ]; then
hostip=$(echo $hostip | cut -d ";" -f1) hostip=$(echo $hostip | cut -d ";" -f1)
# echo "$hostid - $hostip - $hostname - $hostlimits" # echo "$hostid - $hostip - $hostname - $hostlimits"