Operating System - HP-UX
1837390 Members
3155 Online
110116 Solutions
New Discussion

How to configure a stand alone INFORMIX within a MCSG environment

 
SOLVED
Go to solution
yc_2
Regular Advisor

How to configure a stand alone INFORMIX within a MCSG environment

Hi,

Currently, there is a INFORMIX package running in MCSG environment. It is monitored using the process name called ONINIT.

If a test INFORMIX will to setup in the same node but does not configure in MCSG. Is there a way to configure the test INFORMIX process name to be different from ONINIT.


Rgds,
YC
12 REPLIES 12
Rainer von Bongartz
Honored Contributor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Not this way; all yout database processes will be called 'oninit'

you have to change your monitor script somewhat. Instead of just monitoring all oninit processes you have to monitor the 'master' oninit PID of your MC/SG controlled Database.

check for the function monitor_processes in your MC/SG script and determine the PID you have to monitor

onpid=`$INFORMIXDIR/bin/onstat -g glo | awk '/ vp /, / tot /' | awk '/^ 1 / { print $2 }' `

$onpid now contains the PID you have to monitor

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
yc_2
Regular Advisor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi Rainer,

I tried your script but nothing in response.

Could you explain what the script is trying to achieve.


Thanks for your time to look into the problem.

YC
Rainer von Bongartz
Honored Contributor

Re: How to configure a stand alone INFORMIX within a MCSG environment

you wrote

>Currently, there is a INFORMIX package running in MCSG >environment. It is monitored using the process name called ONINIT.

Please post your script which monitors ONINIT and I'll have a look at it

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
yc_2
Regular Advisor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi,

I have attached the script. It is the INFORMIX tool kit for MCSG from HP.

Rgds,
YC
Rainer von Bongartz
Honored Contributor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi,

The original script for INFX on MC/SG watches for all processes called oninit (array MONITOR_PROCESSES)

You can't use this script (especially the function 'monitor_processes' when you want to start another instances .

your script should only monitor the state of your master-pid of INFORMIX. This is the PID which starts the other oninit processes necessary .

I have included my customized monitor_process function from the MC/SG script
I' running four MC/SG controlled instances of INFORMIX and having no problem with this.
I can start/stop/move all packages without influence on the other db instances.

Regards
Rainer

He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
yc_2
Regular Advisor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi,

1) Am I correct to say that the master pid is actually 'one' pid not an array of pid.

eg:
In the following "onstat -g glo", am I correct to say that the master pid is 9574.

:
:
Individual virtual processors:
vp pid class usercpu syscpu total
1 9574 cpu 961.78 303.02 1264.80
2 9575 adm 3.38 7.58 10.96
3 9576 cpu 1270.74 308.29 1579.03
4 9577 cpu 689.80 189.63 879.43
5 9578 cpu 797.44 207.53 1004.97
6 9579 lio 2.26 6.72 8.98
7 9580 pio 0.39 1.28 1.67
:
:

2) If this is so, why the script is not grepping that particular master pid ? Something like:
onstat -g glo | sed -n '25p' | cut -c '8-13'

3) When "ps -ef | grep 9574" is issued, the following shown:

informix 9575 9574 0 02:06:27 ? 0:10 /informix_runt/bin/oninit
informix 9574 1 55 02:06:27 ? 21:24 /informix_runt/bin/oninit
root 2332 13078 1 14:49:03 pts/tb 0:00 grep 9574

There are quite a number of child spawn from pid 9575 not 9574. When the child of pid 9575 is killed, will the pkg fail over ?


YC
Rainer von Bongartz
Honored Contributor

Re: How to configure a stand alone INFORMIX within a MCSG environment

you wrote

>There are quite a number of child spawn from pid 9575 not 9574. When the child of pid 9575 is killed, will the pkg fail over ?

What happens when any of the childs fails depends on what INFORMIX is doing in this case.
When informix can recover from this error a new oninit process for the correspponding class is spawned and nothing changes for your DB.

In case the is no recovery possible INFORMIX will go down and your master PID will get killed.

In this case MC/SG will detect the crash and react according to your configuration ( restart/failover)

Regards
rainer
I
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
yc_2
Regular Advisor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi,

Would you be able to advice on point (1) and (2) of my last posting.



YC
Rainer von Bongartz
Honored Contributor

Re: How to configure a stand alone INFORMIX within a MCSG environment



1) fully correct

2) onstat -g glo | sed -n '25p' | cut -c '8-13'

would result in 9575 which is not the correct master PID

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
yc_2
Regular Advisor

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi,

Then which is the master pid ? Please advice.


YC
Rainer von Bongartz
Honored Contributor

Re: How to configure a stand alone INFORMIX within a MCSG environment

The master PID is is the thread with vp number 1; in your case

1 9574 cpu 961.78 303.02 1264.80
This master starts a thread of class adm; in yor case
2 9575 adm 3.38 7.58 10.96

this adm thread starts various threads (according to your $ONCONFIG) for the differtent thread classes (cpu,io,lio,pio)

Only check for the existence of the master ; failure of the other threads can by managed by the DB

Regards
Rainer


He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Kenneth Yap
Frequent Advisor
Solution

Re: How to configure a stand alone INFORMIX within a MCSG environment

Hi Leong,
Just do same sample steps then will solve your problem.

1. Create a link file for the informix instant start up command.
example,
#ln -s /{Informix_Home}/bin/oninit /{Informix_Home}/bin/db_1

2. Modify the MCSG monitor script so that its start&stop using "/{Informix_Home}/bin/db_1"

3. Modify the "set -A MONITOR_PROCESSES oninit" to "set -A MONITOR_PROCESSES db_1"

For another informix instant, just create another link file and use that link file to start your instant.
So it will difference out all the start up process name.