Re: How to know the number of Informix Instances
Posted in 1999
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--------------5BBD635E5273
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-ID: <Pine.GSO.3.96.990225085425.19977H@osiris>
>From: sanjeev sagar <sanjeevsagar@yahoo.com>
>Date: Wed, 24 Feb 1999 11:49:13 -0800 (PST)
>
>onstat -g dis
>
>will tell you all the instances running on the host.
On my machine, running OnLine 7.24, IDS 7.30, IDS/UDO 9.14, I ran 'onstat -g dis' with the environment set to the 9.14 instance, and it said:
INFORMIX-Universal Server Version 9.14.UC4 -- On-Line -- Up 8 days 21:41:31 -- 8864 Kbytes
There are 1 servers found
Server : osiris_37
Server Number : 37
Server Type : ODS
Server Status : Up
Server Version: INFORMIX-Universal Server Version 9.14.UC4
Shared Memory : 0xa000000
INFORMIXDIR : /usr/informix/9.14.UC4
ONCONFIG : /usr/informix/9.14.UC4/etc/onconfig.osiris_37
SQLHOSTS : /usr/informix/9.14.UC4/etc/sqlhosts
Host : osiris
And with the environment set to 7.24, it said:
INFORMIX-OnLine Version 7.24.UC1 -- On-Line -- Up 13 days 21:12:44 -- 7208 Kbytes
There are 1 servers found
Server : osiris_23
Server Number : 23
Server Type : ODS
Server Status : Up
Server Version: INFORMIX-OnLine Version 7.24.UC1
Shared Memory : 0xa000000
INFORMIXDIR : /usr/informix/7.24.UC1
ONCONFIG : /usr/informix/7.24.UC1/etc/onconfig.osiris_23
SQLHOSTS : /usr/informix/7.24.UC1/etc/sqlhosts
Host : osiris
And with the environment set to 7.30, it said:
Informix Dynamic Server Version 7.30.UC3 -- On-Line -- Up 12 days 15:51:19 -- 9648 Kbytes
There are 1 servers found
Server : osiris_29
Server Number : 29
Server Type : ODS
Server Status : Up
Server Version: Informix Dynamic Server Version 7.30.UC3
Shared Memory : 0xa000000
INFORMIXDIR : /usr/informix/7.30.UC1
ONCONFIG : /usr/informix/7.30.UC1/etc/onconfig.osiris_29
SQLHOSTS : /usr/informix/7.30.UC1/etc/sqlhosts
Host : osiris
The conclusion I draw from this is that at most, "onstat -g dis" displays
the servers being run from the current INFORMIXDIR -- it clearly does not
display every OnLine instance on my machine. But my machine setup is not
all that common. Also, just in passing, if I'd had my 5.08 OnLine or the
4.12 OnLine running, there wouldn't have been an onstat (use tbstat), and
the '-g' option would be supported.
>---Markus Holzbauer <markus.holzbauer@mch.siemens.de> wrote:
>> Lyzander Marantal wrote:
>> > How will I be able to know the number of Informix instances
>> > currently running in a particular host?
>>
>> see IDS Release Notes:
>>
>> Informix Dynamic Server systems per computer...........255
With difficulty. In August 1996, there was a discussion about this on
Informix internal email aliases, and there was no definitive solution.
However, there are a number of scraps of code that could be assembled into
a complete solution. I've edited the message to reduce the repetition
(dropping it from over 600 lines to about 340 lines), but there's still a
lot of information to digest.
Yours,
Jonathan Leffler (jleffler@informix.com) #include <wish/I/was/skiing.h>
Guardian of DBD::Informix v0.60 (v0.61_02) -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn
--------------5BBD635E5273
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="identifying.servers"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.3.96.990225092309.19977J@osiris>
Content-Description:
From j.leffler@acm.org Thu Jan 1 00:00:00 1970
Date: Thu, 22 Aug 1996 08:34:36 +0200
From: Martin Jensen <martinj@informix.com>
To: June Tong <junet@informix.com>
Subject: Re: Identifying online instances and extrapolating to onconfig
At 09:38 21-08-96 PDT, June Tong wrote:
>> >- identify online instances running on the system (ps -ef is one I can
>> > think of)
>> >- AND extrapolate them back to their respective onconfig files.
>>
>> The onconfig file for a running engine can be found on the 4th line of
>> onstat -c (versions 7.2 and above I assume that this will work for
>> previous versions also). The engine has to have a reference in the
>> sqlhosts file to be usable (I think that this is a requirement to initialize
>> also but don't quote me on that!). I think that this ksh program does
>> the job very nicely and without all of the changing of the executables and
>> looking through the undocumented files in /tmp
>
>Okay, but it still only works on a single INFORMIXDIR. Needs tweaking if you
>have multiple versions installed in multiple directories.
>
>The /INFORMIXTMP files are not undocumented -- they are in the appendix of the
>DSA Administrator's Guide. In the copy I have (Version 7.2), they are on
>pages A-7 and A-11. I believe they were also documented in earlier versions
>of the manual, but were incorrectly listed as being in /tmp.
Well Here is a little more brutal script simply to establish where on an
unknown system we might find some Informix 'area':
# total-r.sh - Martin Jensen - Informix Software A/S
DIRS=/tmp/dir.$$
export DIRS
echo > $DIRS
# Loop for every valid tbinit or oninit environment
find / \\( -name tbinit -o -name oninit \\) -print 2>/dev/null | sort | \\
while read LINE
do
if test "x$LINE" = "x" ; then
break
fi
echo "Checking $LINE"
if test `echo $LINE | grep oninit` != $LINE ; then
echo "Online version < 7.* tbinit found at: $LINE"
else
echo "Online version 7.* oninit found at: $LINE"
INFORMIXDIR=`dirname $LINE`
INFORMIXDIR=`dirname $INFORMIXDIR`
if test "x`grep $INFORMIXDIR $DIRS`" != "x$INFORMIXDIR" ; then
echo $INFORMIXDIR >> $DIRS
if test -d $INFORMIXDIR/etc ; then
cd $INFORMIXDIR/etc
grep -l ROOTPATH * 2>/dev/null | sort | \\
while read ONCONFIG; do
echo "Checking OnLine $ONCONFIG"
cat $ONCONFIG
echo ""
if test -x $INFORMIXDIR/bi