Re: How to check if remote db is up or down?
Posted in 2004
what i did was trying to perform a dummy remote
database connection via dbaccess.
INFORMIXCONTIME=5 ; export INFORMIXCONTIME
INFORMIXCONRETRY=2 ; export INFORMIXCONRETRY
dbaccess <DATABASENAME>@<REMOTE SERVERNAME>
if [ $? -ne 0 ]; then
echo "remote database is not accessible"
fi
hope this will help.
--miyaki--
--- Curtis Crowson <curtis@crowson1.com> wrote:
> > Is it possible to remotely check and see if a
> particular instance is
> > up/down? Perhaps using telnet to log into the
> server port number and
> > see if anything is listening?
>
> Yes. I suppose that you would also want to know how.
>
>
> telnet to informix server machine run the "onstat -"
> command look at
> the return code ( $? ). The following table is what
> is going on:
>
> Fast Recovery: 2
> Online: 5
> Single User ( Quiescent ): 1
> Shared Memory Not Initialized: 255
>
> If your sophisticated ( I haven't done it but we are
> thinking about
> it) Informix supports the SNMP protocol. So I think
> that you can query
> health through that mechanism.
>
> You can also look at the unix ports, but I can't
> remember the command.
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
sending to informix-list