diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index ca716dad..11e7a80a 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -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