onstat -g dis gives bad info
Posted in 2019
Topics: Installation, Setup & Upgrades, Server Administration, Networking & sqlhosts Configuration, Versions, Editions & End-of-Life
Hi All,
Where does 'onstat -g dis' gather its information from?
We have a server that is reporting an instance that should never have existed
on that server.
Server : legacy_tcp
Server Number : 9
Server Type : IDS
Server Status : Down
Server Version: IBM Informix Dynamic Server Version 12.10.FC4
Shared Memory : 0xa000000
INFORMIXDIR : /soft/prodinformix/foghorn
ONCONFIG : /soft/prodinformix/foghorn/etc/onconfig.legacy
SQLHOSTS : /soft/prodinformix/foghorn/etc/sqlhosts.legacy
Host : devdata2
Neither ONCONFIG nor SQLHOSTS file exists. Nor does the instance.
I looked at /INFORMIXTMP/.infdirs -- several directories listed, but there is
no reference to legacy_tcp in any of the etc/sqlhost* or etc/onconf* files
under any of the listed informix directories.
This leads me to believe that the info is stored somewhere else-- but since
the command can be run off-line, it can't be in sysmaster.
I really want to clean up these servers before we upgrade.
Any help would be appreciated.
Thanks,
Michael Hoffman
original post:
Hi All,
Where does 'onstat -g dis' gather its information from?
We have a server that is reporting an instance that should never have existed
on that server.
Server : legacy_tcp
Server Number : 9
Server Type : IDS
Server Status : Down
Server Version: IBM Informix Dynamic Server Version 12.10.FC4
Shared Memory : 0xa000000
INFORMIXDIR : /soft/prodinformix/foghorn
ONCONFIG : /soft/prodinformix/foghorn/etc/onconfig.legacy
SQLHOSTS : /soft/prodinformix/foghorn/etc/sqlhosts.legacy
Host : devdata2
Neither ONCONFIG nor SQLHOSTS file exists. Nor does the instance.
I looked at /INFORMIXTMP/.infdirs -- several directories listed, but there is
no reference to legacy_tcp in any of the etc/sqlhost* or etc/onconf* files
under any of the listed informix directories.
This leads me to believe that the info is stored somewhere else-- but since
the command can be run off-line, it can't be in sysmaster.
I really want to clean up these servers before we upgrade.
Any help would be appreciated.
Thanks,
Michael Hoffman
Response:
I believe onstat -g dis uses the /INFORMIXTMP/.infdirs to get a list of
directories to check. It then looks for files named ".conf.<something>" in the
etc directory Note the "." That file is not a plain text file. I believe it's
getting all that information from those .conf files it finds in all the
informix dirs listed in the .infdirs file. One way you can verify this would
be to use strace or truss and send the output to a file for the onstat -g dis
command...so run something like this:
strace -o trace.out onstat -g dis
In that trace.out file you would see opens for the $INFORMIXDIR/etc/.conf.####
files.
I'm trying to recall this off the top of my head so I might be a tad off, but
I'm pretty sure that's what it is doing and where it's getting it's info from.
Jacques Renaut
HCL Informix advanced Support
Thanks Jacques. That was it! There was a .conf.legacy_tcp file in one of the directories listed in /INFORMIXTMP/.infxdirs I deleted the file and '-g dis' doesn't show that instance. So now I know how to clean up the rest. Oh, 'strings .conf....' will show you the contents of the file, which matches what '-g dis' reports. Thanks, Michael
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g