If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > How do I return a list of Informix instances

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-04-04, 16:26
shangers shangers is offline
Registered User
 
Join Date: Aug 2004
Posts: 8
How do I return a list of Informix instances

Hello All,

Please may I have your assistance?
This is probably trivial to an Informix DBA?
I would like to be able to return a list of Informix instances running on a Unix machine.

The objective is to script the monitoring of the status of all the instances. I would like to make this generic. Normally to return the status we need to set up our environment variables
INFORMIXSERVER
INFORMIXDIR
ONCONFIG
etc
then run onstat -
however my objective is to script this to retreive automatically all the possible values of the above variables and check each instance.
Any ideas how this can be done?
Your help would be greatly appreciated
Reply With Quote
  #2 (permalink)  
Old 10-04-04, 17:09
pan_indy pan_indy is offline
Registered User
 
Join Date: May 2004
Posts: 3
we have alias's for each informix instance that set up all the informix environs and it has worked very well for us.
Reply With Quote
  #3 (permalink)  
Old 10-05-04, 10:00
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
There is no way to programatically determine this unless you have been extreamly consistant in your naming of everything.

Assuming that you only have one INFORMIXDIR (certainly not always the case) you could look at you sqlhosts files to determine instance names. You would then have to tie them to the onconfig somehow - either by a naming standard or search for files with DBSERVERNAME, etc.

All said, it would probibly just be easier to maintain a list of instances with the path to their environment shell script. After all, you have to start and stop them somehow. Are they not indirectly started though inittab and shutdown?
__________________
Fred Prose
Reply With Quote
  #4 (permalink)  
Old 10-05-04, 11:42
shangers shangers is offline
Registered User
 
Join Date: Aug 2004
Posts: 8
Many thanks for your response.
The objective is to create a single capability to monitor more than one customer. Hence I cannot make any assumptions about naming convention or startup scripts.
It looks as if I will need to design this so that the customer configures which instances I want to monitor.
Reply With Quote
  #5 (permalink)  
Old 10-23-04, 13:27
vpshriyan vpshriyan is offline
Registered User
 
Join Date: Nov 2003
Location: Mumbai, India
Posts: 92
make use of the output generated by DIScovery keyword of onstat command:

onstat -g dis
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On