Thursday, June 16, 2011

Script for Checking Java Mailer Status

-----------------------------Script Start-----------------------------------
#!/bin/ksh
#Script to monitor WF Mailer Status
. .env
cd /tmp
sqlplus /nolog << EOF
connect apps/password
set heading off
set pages 0
set feedback off
spool monitor_mailer.lst
select COMPONENT_STATUS from FND_SVC_COMPONENTS
where COMPONENT_ID='10006';
spool off
EOF
MONITOR=`grep -v "SQL>" monitor_mailer.lstsed s/\ //g`

if [ $MONITOR != "RUNNING" ] ; then
echo $MONITOR mailx -s "WFMAILER: Check Workflow Mailer STATUS" appsdbafreelance@gmail.com
fi
/bin/rm -f /tmp/monitor_mailer.lst
-----------------------Script End -------------------------------------------------

Put this in crontab for every 10 min or so.
It will send a status whenever its not running. No more OAM checking !!!!


Apps Dba Free Lance

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.