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]}"
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