Advertisement

03.01.2007 at 06:43AM PST, ID: 22421432
[x]
Attachment Details

df ksh and exclude a filesystem

Asked by ethanjohnsons in IBM AIX Unix

Tags: ,

I have df -k file system monitor script below.  What I need is to exclude /backup filesystem because it is always around 98 or 99%.   How do you put the line for excluding the /backup?

bla...

ALERT_ADMIN () { mail -s "${MAIL_SUBJ}"  $DIST_LIST  << EOF
Filesystem $fsname has reached $sz% of its capacity.
EOF
return
}

cd . > $WORKDIR/freespace.lst
exec 8< $WORKDIR/freespace.lst

df -k | grep -v -i filesystem | grep -v ":" | awk '{print $7,substr($4,1,2)}' |
grep -v "%" | grep -v proc > $WORKDIR/freespace.lst

if [ -f $WORKDIR/freespace.lst ]
then
 while read -u8 fsname sz ;
   do
   if [[ $sz -gt $WARNLEVEL ]]
     then
        ALERT_ADMIN
    fi
done
fi


thx much

      Start Free Trial
[+][-]03.01.2007 at 12:06PM PST, ID: 18635193

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.01.2007 at 12:09PM PST, ID: 18635228

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.01.2007 at 12:11PM PST, ID: 18635236

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.04.2007 at 06:09PM PST, ID: 18652141

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: IBM AIX Unix
Tags: df, exclude
Sign Up Now!
Solution Provided By: iskhan
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32