[HPADM] [SUMMARY] Scritping Questions
From: Deepak John Cutinha (deepak_cutinha_at_yahoo.com)
Date: 07/22/03
- Previous message: Deepak John Cutinha: "[HPADM] [Summary] Packaging Query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 22 Jul 2003 01:58:20 -0700 (PDT) To: hpux-admin@DutchWorks.nl
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)
- Previous message: Deepak John Cutinha: "[HPADM] [Summary] Packaging Query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|