Update dsmon.sh
This commit is contained in:
8
dsmon.sh
8
dsmon.sh
@@ -111,16 +111,16 @@ CHECK(){
|
|||||||
|
|
||||||
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
|
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
|
||||||
if [ "${checkhost}" != "false" ]; then
|
if [ "${checkhost}" != "false" ]; then
|
||||||
declare -A host_limits
|
declare -A host_limits_tmp
|
||||||
hostlimits=(${host_limits[${hostid}]})
|
hostlimits=(${host_limits[${hostid}]})
|
||||||
for hl in ${hostlimits[@]}; do
|
for hl in ${hostlimits[@]}; do
|
||||||
hlname=$(echo $hl | cut -d ":" -f1)
|
hlname=$(echo $hl | cut -d ":" -f1)
|
||||||
hllim=$(echo $hl | cut -d ":" -f2)
|
hllim=$(echo $hl | cut -d ":" -f2)
|
||||||
host_limits[$hlname]=$hllim
|
host_limits_tmp[$hlname]=$hllim
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
for x in "${!host_limits[@]}"; do printf "[%s]=%s\n" "$x" "${host_limits[$x]}" ; done
|
for x in "${!host_limits_tmp[@]}"; do printf "[%s]=%s\n" "$x" "${host_limits_tmp[$x]}" ; done
|
||||||
|
|
||||||
# DRIVEINFO=$(ssh root@${host_ip[$hostid]} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|nvme|localhost|shm|mmcblk|overlay|-volume|Music|media-data|Software' | awk '{ print $1 " " $2 " " $4 }')
|
# DRIVEINFO=$(ssh root@${host_ip[$hostid]} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|nvme|localhost|shm|mmcblk|overlay|-volume|Music|media-data|Software' | awk '{ print $1 " " $2 " " $4 }')
|
||||||
# DRIVEINFO=(${DRIVEINFO})
|
# DRIVEINFO=(${DRIVEINFO})
|
||||||
@@ -202,7 +202,7 @@ CHECK(){
|
|||||||
# echo -e "${idsCL[Cyan]} ${DRIVE}${spcA}:${idsCL[$fs_status_color]} ${DRIVEINFO_FREE[$DRIVE]} GB Free${spcB}${DRIVEINFO_FREEPER[$DRIVE]}%${spcC}(${DRIVEINFO_TOT[$DRIVE]} GB Total)${idsCL[Default]}"
|
# echo -e "${idsCL[Cyan]} ${DRIVE}${spcA}:${idsCL[$fs_status_color]} ${DRIVEINFO_FREE[$DRIVE]} GB Free${spcB}${DRIVEINFO_FREEPER[$DRIVE]}%${spcC}(${DRIVEINFO_TOT[$DRIVE]} GB Total)${idsCL[Default]}"
|
||||||
# done
|
# done
|
||||||
|
|
||||||
unset DRIVEINFO_TOT DRIVEINFO_FREE DRIVEINFO_FREEPER DRIVES DRIVEINFO host_limits
|
unset DRIVEINFO_TOT DRIVEINFO_FREE DRIVEINFO_FREEPER DRIVES DRIVEINFO host_limits_tmp
|
||||||
|
|
||||||
else
|
else
|
||||||
echo -e "${idsCL[Yellow]} ${host_name[$hostid]} is down${idsCL[Default]}"
|
echo -e "${idsCL[Yellow]} ${host_name[$hostid]} is down${idsCL[Default]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user