Update nodemgmt-scripts.sh

This commit is contained in:
2019-12-12 23:34:58 -06:00
parent 8e9497fb45
commit 009e578a67

View File

@@ -378,9 +378,13 @@ STATUS(){
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
DIVIDER false green
fi
freespace=`${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do echo $output | awk '{ print $2 }'; done`
echo ${freespace[*]}
declare -A partitions
partitions=`${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do echo $output | awk '{ print $2 }'; done`
for partition in "${partitions[@]}"; do
freespace=`${NCMD} df -hPBM ${partition} | awk '{print $5}' |tail -1|sed 's/%$//g'`
echo -en " ${partition}$spc: "
echo -e "${idsCL[Green]}${freespace}${idsCL[Default]}"
done
# ${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do