[HPADM] [SUMMARY] Scritping Questions

From: Deepak John Cutinha (deepak_cutinha@yahoo.com)
Date: Tue Jul 22 2003 - 04:58:20 EDT


Query :

I am trying to make a script to monitor my systems

Part of the script has to do the following:

- Run a df -k on the system
- Send me a mail only if any of the file system is
>85% full with details like system name and
Filesystem.

Kindly suggest if you have resources already doing
this kind of activity.

I will post the summary for everyones benefit.

Solution :

SYSMAX=85
for MNTPT in `cat /etc/mnttab | awk '{print $2}'|grep
-v net | grep -v home`
do
FILESYS=`bdf $MNTPT | grep -v avail | awk '{print $5}'
| tr -d "%"`
if [ $FILESYS -gt $SYSMAX ]
then
echo "WARNING: $MNTPT File System is using $FILESYS%
of diskspace allocated "
fi
done

Thanks Aynal Hossain, Danilo Israel, Baran YURDAGUL,
Beerse,_Corné and all the HP Gurus who responded

PS : That makes sure I have posted all the Summaries

This is a great knowledge base for HP-UX stuff ..

Regards

Deepak Cutinha
 

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:32 EDT