Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -98,12 +98,12 @@ CHECK(){
|
||||
fi
|
||||
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h mysqldb.scity.us -P 3306 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts")
|
||||
|
||||
IFS=$'\n' sorted=($(sort <<<"${hostnames_sort[*]}"))
|
||||
IFS=$'\n' hostnames_sort=($(sort <<<"${hostnames_sort[*]}"))
|
||||
unset IFS
|
||||
|
||||
for x in "${!hostnames[@]}"; do printf "[%s]=%s\n" "$x" "${hostnames[$x]}" ; done
|
||||
echo
|
||||
for x in "${!sorted[@]}"; do printf "[%s]=%s\n" "$x" "${sorted[$x]}" ; done
|
||||
for x in "${!hostnames_sort[@]}"; do printf "[%s]=%s\n" "$x" "${hostnames_sort[$x]}" ; done
|
||||
|
||||
|
||||
# for hostid in "${!host_ip[@]}"; do
|
||||
|
||||
Reference in New Issue
Block a user