Oracle AIX 11g:Automate archive destination notification in mail
Oracle AIX 11g:Automate archive destination notification in mail This post to get the notification when filesystem archive destination reach at threshold values. 1.Use below script.automate_arc.sh #!/usr/bin/ksh ######## For Automate disk untilization Mail#### set -a export ORACLE_SID=DBEXPERT export ORACLE_HOME=/oracle11g/11.2.0.4/products/apps/11.2.0.4 export PATH=$ORACLE_HOME/bin:$PATH cd /oracle11g/products/apps/11.2/scripts sqlplus -s / as sysdba <<EOF set lines 150; set pages 100; spool /oracle11g/products/apps/11.2/scripts/loc.log archive log list spool off EOF arc_loc=`cat /oracle11g/products/apps/11.2/scripts/loc.log|grep "Archive destination"` arc_dest=${arc_loc:21} echo $arc_dest df -gt $arc_dest > res.log capacity=`awk -F" " '{ print $5 }' res.log` echo $capacity perc=${capacity:5} perc1=`echo $perc| tr -d '%'` echo $perc1 if [[ $perc1 -gt 90 ]]; then echo "Dear TEAM," >/oracle11g/product...