From bbb56dee70f131c82edd26ba5094c9b35297d567 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 12 Dec 2019 23:28:10 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 8ac96f9d..7ba5e1b9 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -378,17 +378,22 @@ 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 - ${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do - freespace=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) - partition=$(echo $output | awk '{ print $2 }' ) - if [ "${ST_ACTION}" != "check" ]; then - c=0; cw=22; spc='' - spc1=${cw}-${#partition} - until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - echo -en " ${partition}$spc: " - echo -e "${idsCL[Green]}${freespace}${idsCL[Default]}" - fi - done + + freespace=`${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do $(echo $output | awk '{ print $1}' | cut -d'%' -f1 ); done` + echo ${freespace[*]} + + + # ${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do + # freespace=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 ) + # partition=$(echo $output | awk '{ print $2 }' ) + # if [ "${ST_ACTION}" != "check" ]; then + # c=0; cw=22; spc='' + # spc1=${cw}-${#partition} + # until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + # echo -en " ${partition}$spc: " + # echo -e "${idsCL[Green]}${freespace}${idsCL[Default]}" + # fi + # done nid=`expr $nid + 1` done