Detect a Instance out of multiple instance
Posted in 2004
Topics: General Discussion
Hi Informix Guru,
I have one question for you.
A server is configured to run multiple Informix Instances. Is it possible to
detect specific Instance, which has gone down.
This is possible in oracle because every process has distinct instance name.
But in case of Informix all the processes seen are oninit.
Is there anyway in Informix by which I can detect the specific instance.
Regards,
Shailesh M
Hi Shailesh,
This is simple..... what you need to do is indentify each pair of
INFORMIXSERVER and ONCONFIG variables that is specified for each of the
instance you may have running....... it could also be done by polling shared
memory because each instance does have its own intance number as well as
name.
so having identified the above variables you can do an onstat -b > /dev/null
and check the return code. this will tell you if the instance is down or
up....
cheers
John
----- Original Message -----
From: "More, Shailesh" <Shailesh_More@bmc.com>
To: <ids@iiug.org>
Sent: Thursday, October 28, 2004 11:32
Subject: Detect a Instance out of multiple instance [3596]
> Hi Informix Guru,
>
> I have one question for you.
>
> A server is configured to run multiple Informix Instances. Is it possible
to
> detect specific Instance, which has gone down.
> This is possible in oracle because every process has distinct instance
name.
> But in case of Informix all the processes seen are oninit.
>
> Is there anyway in Informix by which I can detect the specific instance.
>
>
> Regards,
> Shailesh M
>
>
----LNX_Fri_Oct_29_2004_09:19:57_V3.33--
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
>Datum: 2004.10.29 05:42:07
>Sender: More, Shailesh <Shailesh_More@bmc.com>
>
>A server is configured to run multiple Informix Instances. Is it possibl=
e to
>detect specific Instance, which has gone down.
>This is possible in oracle because every process has distinct instance n=
ame.
>But in case of Informix all the processes seen are oninit.
>
>Is there anyway in Informix by which I can detect the specific instance.=
=
You get the process IDs of an instance with
onstat -g gloTherefore setting INFORMIXDIR and INFORMIXSERVER for the existing
instances an polling everyone with
onstat -g gloyou can tell which oninit belongs to which instance. The down instance
will return an error normally. But sometimes the shared memory of a crash=
ed
instance still exists - you could check the PIDs of onstat -g glo with th=
e
running processes.
=
Just for checking if an instance is online it is enough to do an
onstat -
=
In most cases a server crash is noticed in the message log file - therefo=
re
you can examine the log files of your instances.
=
Regards,
Andreas Kutsche
=
------------------------------------------------
SPAR Oesterreichische Warenhandels-AG
Hauptzentrale
Europastra=DFe 3
A-5015 Salzburg
=
Telefon : +43 662 4470 24223
E-Mail : Andreas.KUTSCHE@spar.at
Internet: http://www.spar.at
------------------------------------------------
=
----LNX_Fri_Oct_29_2004_09:19:57_V3.33----
--0__=08BBE5AFDFC368368f9e8a93df938690918c08BBE5AFDFC36836
Content-type: multipart/alternative;
Boundary="1__=08BBE5AFDFC368368f9e8a93df938690918c08BBE5AFDFC36836"
--1__=08BBE5AFDFC368368f9e8a93df938690918c08BBE5AFDFC36836
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable
You could also use "onstat -g dis"...lots of info.
Mark.
Mark Scranton
WW Tech Enablement - Informix Products
IBM Denver
IBM Software Group - Information Management
Cell: 303-929-0914
email: mscranto@us.ibm.com
=
"Andreas.KUT...." =
<andreas.kutsche@ =
spar.at> =
To
Sent by: ids@iiug.org =
forum.subscriber@ =
cc
iiug.org =
Subj=
ect
Antw: IDS: Detect a Instance out=
of
10/29/2004 01:24 multiple instance [3598] =
AM =
=
=
=
=
=
----LNX_Fri_Oct_29_2004_09:19:57_V3.33--
Content-Type: text/plain; charset=3D"iso-8859-1"
Content-Transfer-Encoding: quoted-printable
>Datum: 2004.10.29 05:42:07
>Sender: More, Shailesh <Shailesh_More@bmc.com>
>
>A server is configured to run multiple Informix Instances. Is it possi=
bl=3D
e to
>detect specific Instance, which has gone down.
>This is possible in oracle because every process has distinct instance=
n=3D
ame.
>But in case of Informix all the processes seen are oninit.
>
>Is there anyway in Informix by which I can detect the specific instanc=
e.=3D
=3D
You get the process IDs of an instance with
onstat -g gloTherefore setting INFORMIXDIR and INFORMIXSERVER for the existing
instances an polling everyone with
onstat -g gloyou can tell which oninit belongs to which instance. The down instanc=
e
will return an error normally. But sometimes the shared memory of a cra=
sh=3D
ed
instance still exists - you could check the PIDs of onstat -g glo with =
th=3D
e
running processes.
=3D
Just for checking if an instance is online it is enough to do an
onstat -
=3D
In most cases a server crash is noticed in the message log file - there=
fo=3D
re
you can examine the log files of your instances.
=3D
Regards,
Andreas Kutsche
=3D
------------------------------------------------
SPAR Oesterreichische Warenhandels-AG
Hauptzentrale
Europastra=3DDFe 3
A-5015 Salzburg
=3D
Telefon : +43 662 4470 24223
E-Mail : Andreas.KUTSCHE@spar.at
Internet: http://www.spar.at
------------------------------------------------
=3D
----LNX_Fri_Oct_29_2004_09:19:57_V3.33----
=
--1__=08BBE5AFDFC368368f9e8a93df938690918c08BBE5AFDFC36836
Content-type: text/html; charset=US-ASCII
Content-Disposition: inline
Content-transfer-encoding: quoted-printable
<html><body>
<p>You could also use "onstat -g dis"...lots of info. <br>
<br>
Mark. <br>
<br>
Mark Scranton<br>
WW Tech Enablement - Informix Products<br>
IBM Denver<br>
<br>
IBM Software Group - Information Management<br>
Cell: 303-929-0914<br>
email: mscranto@us.ibm.com<br>
<br>
<br>
<img src=3D"cid:10__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.com" width=3D=
"16" height=3D"16" alt=3D"Inactive hide details for "Andreas.KUT..=
.." <andreas.kutsche@spar.at>">"Andreas.KUT...." &=
lt;andreas.kutsche@spar.at><br>
<br>
<br>
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=
<tr valign=3D"top"><td style=3D"background-image:url(cid:20__=3D08BBE5A=
FDFC368368f9e8a93df938@us.ibm.com); background-repeat: no-repeat; " wid=
th=3D"40%">
<ul>
<ul>
<ul>
<ul><b><font size=3D"2">"Andreas.KUT...." <andreas.kutsche=
@spar.at></font></b><font size=3D"2"> </font><br>
<font size=3D"2">Sent by: forum.subscriber@iiug.org</font>
<p><font size=3D"2">10/29/2004 01:24 AM</font></ul>
</ul>
</ul>
</ul>
</td><td width=3D"60%">
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">=
<tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3=
0__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.com" border=3D"0" height=3D"=
1" width=3D"58" alt=3D""><br>
<div align=3D"right"><font size=3D"2">To</font></div></td><td width=3D"=
100%"><img src=3D"cid:30__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.com" =
border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">ids@iiug.org</font></td></tr>
<tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3=
0__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.com" border=3D"0" height=3D"=
1" width=3D"58" alt=3D""><br>
<div align=3D"right"><font size=3D"2">cc</font></div></td><td width=3D"=
100%"><img src=3D"cid:30__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.com" =
border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
</td></tr>
<tr valign=3D"top"><td width=3D"1%" valign=3D"middle"><img src=3D"cid:3=
0__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.com" border=3D"0" height=3D"=
1" width=3D"58" alt=3D""><br>
<div align=3D"right"><font size=3D"2">Subject</font></div></td><td widt=
h=3D"100%"><img src=3D"cid:30__=3D08BBE5AFDFC368368f9e8a93df938@us.ibm.=
com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><br>
<font size=3D"2">Antw: IDS: Detect a Instance out of multiple instance =
[3598]</font></td></tr>
</table>
<table border=3D"0" cellspacing=3D"0" cellpadding=3D"0">
<tr valign=3D"top"><td width=3D"58"><img src=3D"cid:30__=3D08BBE5AFDFC3=
68368f9e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt=
=3D""></td><td width=3D"336"><img src=3D"cid:30__=3D08BBE5AFDFC368368f9=
e8a93df938@us.ibm.com" border=3D"0" height=3D"1" width=3D"1" alt=3D""><=
/td></tr>
</table>
</td></tr>
</table>
<br>
<tt>----LNX_Fri_Oct_29_2004_09:19:57_V3.33--<br>
Content-Type: text/plain; charset=3D"iso-8859-1"<br>
Content-Transfer-Encoding: quoted-printable<br>
<br>
>Datum: 2004.10.29 05:42:07<br>
>Sender: More, Shailesh <Shailesh_More@bmc.com=
><br>
><br>
>A server is configured to run multiple Informix Instances. Is it po=
ssibl=3D<br>
e to<br>
>detect specific Instance, which has gone down.<br>
>This is possible in oracle because every process has distinct insta=
nce n=3D<br>
ame.<br>@@NL@
You
could consider using 'onstat -g dis' as a sufficiently privileged
user.
It should list all the IDS instances (and any XPS instances) plus their
up/down status.
Alternatively, set up your system so that you can tell which server
instance is running. For example:
Instance 1 uses INFORMIXDIR=/usr/informix/instance1 and is started with
$INFORMIXDIR/bin/oninit
Instance 2 uses INFORMIXDIR=/usr/informix/instance2 and is started with
$INFORMIXDIR/bin/oninit
These INFORMIXDIRs need not be complete copies of each other; they could
be rigged with symbolic links (and if I were doing it, would be rigged
with symbolic links).
--
Jonathan Leffler (jleffler@us.ibm.com)
STSM, Informix Database Engineering, IBM Data Management
4100 Bohannon Drive, Menlo Park, CA 94025
Tel: +1 650-926-6921 Tie-Line: 630-6921
"I don't suffer from insanity; I enjoy every minute of it!"
forum.subscriber@iiug.org wrote on 10/28/2004 08:32:56 PM:
> Hi Informix Guru,
>
> I have one question for you.
>
> A server is configured to run multiple Informix Instances. Is it
possible to
> detect specific Instance, which has gone down.
> This is possible in oracle because every process has distinct instance
name.
> But in case of Informix all the processes seen are oninit.
>
> Is there anyway in Informix by which I can detect the specific instance.
>
>
> Regards,
> Shailesh M
>
>