Update dsmon.sh
This commit is contained in:
3
dsmon.sh
3
dsmon.sh
@@ -187,7 +187,6 @@ RUN_CHECK(){
|
|||||||
|
|
||||||
DRIVEINFO=$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${host_ip[$hostid]} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|localhost|shm|overlay|-volume|Music|Software|//|AFS' | awk '{ print $1 " " $2 " " $4 }')
|
DRIVEINFO=$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${host_ip[$hostid]} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|localhost|shm|overlay|-volume|Music|Software|//|AFS' | awk '{ print $1 " " $2 " " $4 }')
|
||||||
DRIVEINFO=(${DRIVEINFO})
|
DRIVEINFO=(${DRIVEINFO})
|
||||||
echo ${DRIVEINFO[@]}
|
|
||||||
|
|
||||||
# for x in "${!DRIVEINFO[@]}"; do printf "[%s]=%s\n" "$x" "${DRIVEINFO[$x]}" ; done
|
# for x in "${!DRIVEINFO[@]}"; do printf "[%s]=%s\n" "$x" "${DRIVEINFO[$x]}" ; done
|
||||||
|
|
||||||
@@ -202,7 +201,7 @@ RUN_CHECK(){
|
|||||||
dname=${dname//\/dev\//}
|
dname=${dname//\/dev\//}
|
||||||
dname_short=${dname#*vg-}
|
dname_short=${dname#*vg-}
|
||||||
dname_short=${dname_short%*_v}
|
dname_short=${dname_short%*_v}
|
||||||
|
echo "${host_ip[$hostid]} - $dname_short"
|
||||||
[ "$dname_short" = "" ] && dname_short=$dname
|
[ "$dname_short" = "" ] && dname_short=$dname
|
||||||
|
|
||||||
if [[ "${ia}" = *"sda"* ]] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
if [[ "${ia}" = *"sda"* ]] && [ ${DRIVEINFO[$((${ii}+1))]//M/} -lt 1024 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user