1833898 Members
1997 Online
110063 Solutions
New Discussion

HP-UX Shell Scripts

 
SOLVED
Go to solution
harry_7
Frequent Advisor

HP-UX Shell Scripts

Hi All,

Please help me to pass some unix sheel scripts.

I would like to monitor the daily disk space utilisation i.e. if it is more than 80% I will get alert via pager or email. ---- and other

System Utilities also (monitoring the Cluster, Tape drive is online before backup etc etc..


((( GET 10 Points ))) ((( as a Thanks )))

With Regards

Harry
8 REPLIES 8
Ian Dennison_1
Honored Contributor
Solution

Re: HP-UX Shell Scripts

Look in this posting for 'filesys'.

Share and Enjoy! Ian
Building a dumber user
Ian Dennison_1
Honored Contributor

Re: HP-UX Shell Scripts

Steve Steel
Honored Contributor

Re: HP-UX Shell Scripts

Hi

Script samples

http://www.introcomp.co.uk/hpux/index.html

http://forums.itrc.hp.com/cm/TopSolutions/1,,CA592260!1!answers,00.html


Hope it helps


steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Nick Wickens
Respected Contributor

Re: HP-UX Shell Scripts

Heres the one I use (Hacked from some contractor that was here some years back so I can't claim authorship - Hi Stefan :@) - Change the variables to fit.

LOW=75
HIGH=90
DATE=$(date)
OUTFILE=/tmp/bdfrep
:>$OUTFILE

(bdf |egrep -v '(cdrom|vg12temp)' |sed -e "1d"|sed -e "/^.*:.*$/d"|sed -e "/^[
] [ ]*.*$/d"|
while read LVOL SIZE USED AVAIL PERCENTAGE MOUNT_PT
do
BREAK=PAUSE
PERCENTAGE=$(echo $PERCENTAGE | sed -e "s/%//")

if [ $PERCENTAGE -ge $HIGH ]; then
echo " $DATE - WARNING - The percentage of used space on filesystem $MOU
NT_PT is greater than $HIGH percent"
echo "TO:sysadm
FROM:root@system.com
SUBJECT:Check Filesystem Space
$DATE - WARNING - The percentage of used space on filesystem $MOU
NT_PT is greater than $HIGH percent"|sendmail -t
elif [ $PERCENTAGE -ge $LOW ]; then
echo " $DATE - WARNING - The percentage of used space on filesystem $MO
UNT_PT is greater than $LOW percent"
fi
done
) >> $OUTFILE
Hats ? We don't need no stinkin' hats !!
harry d brown jr
Honored Contributor

Re: HP-UX Shell Scripts


I'd start here:

http://www.bb4.com/

live free or die
harry
Live Free or Die
Ricardo Bassoi
Regular Advisor

Re: HP-UX Shell Scripts



Hi Harry,

Here follows a script that I did in order to check the file system.

Regards,

Ricardo
If you never try, never will work
Rainer von Bongartz
Honored Contributor

Re: HP-UX Shell Scripts

Harry,

The most elegant way to do this is using HP's event monitoring services.

If not already installed download it from

ftp://software.hp.com/dist/swdepot/downloads/3596858471/B7609BA_11.11.depot

Configure it from SAM; its very easy a reliable.


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Marco Santerre
Honored Contributor

Re: HP-UX Shell Scripts

I was just wondering if you are building these scripts cause you have no tools for monitoring?

Here we are using OVO (IT/O, VPO, or however you wanna call it) for all that stuff. Basically, it does all of that monitoring for us. I'm sure there is a cost associated to it, and was wondering if that's the reason you are looking for scripts. Cause if cost is not an issue, I would suggest to talk to HP about OVO.
Cooperation is doing with a smile what you have to do anyhow.