on 01-28-2010 4:07 PM
I'm looking for a UNIX script that is probably very common. I'm not a great UNIX script programmer.
The script I'm looking for would to the following and be runned in crontab:
If the saparch (or oraarch) directory is greater than 70% then send an email
Any advice on how to get such a common script?
Thanks in advance.
Hello Bill,
why not using CCMS for that?
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the begiining of the df -g command on the AIX 6.1 O/S
$ df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 1.00 0.76 24% 12625 7% /
/dev/hd2 4.00 2.05 49% 43817 9% /usr
/dev/hd9var 2.00 1.12 44% 7462 3% /var
/dev/hd3 1.00 0.88 13% 171 1% /tmp
/dev/hd1 1.00 0.64 36% 953 1% /home
/dev/hd11admin 1.00 0.99 1% 13 1% /admin
you can use this as base if you are on HPUX system
********************************
#!/usr/bin/ksh
SID=<YOUR System SID>
while true
do
ARCH=`bdf /oracle/$SID/oraarch | awk '/2/{ if (( $5 * 1 ) > 70) print "TRUE"}'`
if [ "$ARCH" ]; then
mail -s "Archive is above 70%" email@email
echo email sent `date`
fi
sleep 60
done
****************************
Edited by: Imtiaz.Karedia on Jan 28, 2010 12:19 PM
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.