Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RAC FAN Callout script issue

yakub21May 26 2010 — edited May 26 2010
In my script I have the following that script that is not providing me the information that I was expecting. Namely the following values I would like to have trapped and written to logfile

SERVICE
DATABASE
INSTANCE
HOST
STATUS
REASON
TIMSTAMP

However I'm only getting SERVICE, INSTANCE, and SERVICEMEMBER with no actual values assigned to them. Please advise on how to fix this. THanks.

#! /bin/ksh
AWK=/bin/awk
for ARGS in $*; do

PROPERTY=`echo $ARGS | $AWK -F"=" '{print $1}'`
VALUE=`echo $ARGS | $AWK -F"=" '{print $2}'`

#> map EVTTYPE to EVENT_TYP, NODE to HOST:
case $PROPERTY in
#> note: EVENT_TYP is one of: NODE, DATABASE, INSTANCE, SERVICE, SERVICEMEMBER
EVENT_TYP | event_typ) NOTIFY_EVENT_TYP=$VALUE ;;
VERSION | version) NOTIFY_VERSION=$VALUE ;;
SERVICE | service) NOTIFY_SERVICE=$VALUE ;;
DATABASE | database) NOTIFY_DBNAME=$VALUE ;;
INSTANCE | instance) NOTIFY_INSTANCE=$VALUE ;;
HOST | host) NOTIFY_HOST=$VALUE ;;
STATUS | status) NOTIFY_STATUS=$VALUE ;;
TIMESTAMP | timestamp) NOTIFY_SVRLOGDATE=$VALUE ;;
esac
done
FAN_LOGFILE=/tmp/fan`hostname`_uptime.log
echo ${1} >>${FAN_LOGFILE}
if [ ${NOTIFY_EVENTTYPE} = "INSTANCE" -a ${NOTIFY_STATUS} = "down" ]
then
${REFRESH_DIR}/rac_refresh >> ${FAN_LOGFILE} 2>&1
fi

How do you get the actual values for SERVICE, INSTANCE, DATABASE...? Thanks

Edited by: yakub21 on May 26, 2010 12:26 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2010
Added on May 26 2010
1 comment
1,379 views