Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: is instance up???
In article <7kqu65$4tb$1_at_sloth.swcp.com>,
elufker_at_swcp.com (Ed Lufker) wrote:
> Hi All:
>
> Does anyone have a script for unix that will check to see if an
> instance is up. I need to run the script from a central location to
check
> many instances.
>
> thanks in advance for any help
> eddie lufker
>
My script goes like this..( for unix..)
cat > instances.lst << EOF
EOF
ORATAB=/var/opt/oracle/oratab
cat $ORATAB | while read LINE
do
case $LINE in
\#*) ;;
*)
if [ "`echo $LINE | awk -F: '{print $3}'`" = "Y" ] ; then echo $LINE | awk -F: '{print $1}'>> instances.lst fi ;;
for INSTANCE in `cat instances.lst`
do
STATUS=`ps -fu oracle|grep -e ora_ -e $INSTANCE | grep -v grep ` if [ $? != 0 ]; then echo "Oracle instance $INSTANCE is DOWN!!!" ; else echo "Oracle instance $INSTANCE is UP and RUNNING!!!" ; fi
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Jun 23 1999 - 13:08:16 CDT
![]() |
![]() |