Update nodemgmt-scripts.sh

This commit is contained in:
2019-12-12 23:28:10 -06:00
parent 324efe2d33
commit bbb56dee70

View File

@@ -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]}" echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_NODETYPES[$NTYPE]}-Node${nid} (${nip})${idsST[Reset]}${idsCL[LightCyan]} ${idsCL[LightYello]}${LH}${idsCL[Default]}"
DIVIDER false green DIVIDER false green
fi 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 ) 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`
partition=$(echo $output | awk '{ print $2 }' ) echo ${freespace[*]}
if [ "${ST_ACTION}" != "check" ]; then
c=0; cw=22; spc=''
spc1=${cw}-${#partition} # ${NCMD} df -hBM | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done # freespace=$(echo $output | awk '{ print $1}' | cut -d'%' -f1 )
echo -en " ${partition}$spc: " # partition=$(echo $output | awk '{ print $2 }' )
echo -e "${idsCL[Green]}${freespace}${idsCL[Default]}" # if [ "${ST_ACTION}" != "check" ]; then
fi # c=0; cw=22; spc=''
done # 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` nid=`expr $nid + 1`
done done