Sunday, 19 June 2016




AIX FILE SYSTEM UTILIZATION CHECK :


echo FILE SYSTEM LARGER THAN 90% ON $h ARE
h=$(hostname)
df -gt |grep -v Filesystem|grep -v proc|while read out
do
fs=$(echo $out|awk '{print $5 }'|cut -f1 -d%)
if [ "$fs" -gt 90 ]; then
echo "***********************************"
echo $out
echo "***********************************"
fi
done

-v ---> exclude
while read out --> read that o/p to 'out' variable
cut -f1 -d% --> cut the o/p of first column ( ie. for eg 91%, it displays only 91% ) and -d% for eliminate % from that o/p ie. 91 is the value of fs.

No comments:

Post a Comment