Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

cheating MC/Service Guard

Go to solution
Ionut Grigorescu_2
Super Advisor

cheating MC/Service Guard


Does anybody know a method to "cheat" MC/Service Guard not to start some Oracle processes? I need to test a new software and that implies to shutdown the database - but MC/ServiceGuard restarts it immediately. I don't want to halt the MC/SG cluster.

Thank you in advance,
If it weren't for STRESS I'd have no energy at all
Mark van Hassel
Respected Contributor

Re: cheating MC/Service Guard


Can't you just halt the package where the database resides in, in stead of halting the entire cluster ? Or are there multiple databases in one package ?
The surest sign that life exists elsewhere in the universe is that none of it has tried to contact us
Stefan Farrelly
Honored Contributor

Re: cheating MC/Service Guard

The oracle startup commands for SG are under /etc/cmcluster/ so if you edit these files to not start whatever then when SG tries to autorestart it then it shouldnt work.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Ionut Grigorescu_2
Super Advisor

Re: cheating MC/Service Guard

I have some instructions from the software release binder:

"Cheat" the MC/SG so that it does not restart Oracle processes:
as root user on the database server, enter:
#touch /tmp/ora_smon_omc_cheating
#tail -f /tmp/ora_smon_omc_cheating &

...that seems weird for me - I simply don't understand how can I cheat the MC/SG with that..
If it weren't for STRESS I'd have no energy at all

Re: cheating MC/Service Guard

this implies that your new software has some other details you are not giving.
Essentialy, your package startup script will be looking for the file that you touch, and if it finds it assumes that you want to do something other than the normal startupp, e.g. start Oracle processes but not teh database.

I suggest you read the instructions further, or contact whoever supplied you with this new software/instructions
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Ionut Grigorescu_2
Super Advisor

Re: cheating MC/Service Guard

Unfortunately the guy from the supplier's helpdesk wasn't so sure :-).
But thank you anyway for your help!

Have a nice day,

If it weren't for STRESS I'd have no energy at all
Robert Gamble
Respected Contributor

Re: cheating MC/Service Guard

I would rewrite the MC/SG scripts to allow for a 'maintenance mode'. This mode would check for the state of a flag. If set for maintenance, MC/SG would not monitor the critical processes, allowing for maintenace to be performed with out MC/SG restarting them or failing over to the other node(s).

Good Luck!
Geoff Wild
Honored Contributor

Re: cheating MC/Service Guard

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
raymond lei
Occasional Contributor

Re: cheating MC/Service Guard

Hi, Ionut:

Sounds like you want to shut down oracle instance without shuting down the package. Here is my two cents.

Mc/ServiceGuard monitors the processes in the pacakge by a monitor_service scrpit defined in the package control file. You need to disable this service monitor script in this case, otherwise, mc/sg will automatically start it again once the process it monitors disappears from system.

1, Edit /etc/cmcluster//.cntl
2, Find the "Start_Services" line and comment out the script definition following this line.
(The name of the scripts usually is " monitor" but could be another name)
3, Shut down the package: cmhaltpkg -n
4, Restart the package: cmrunpkg -n
5, Shut down oracle instance, and it should not be restarted again. If not, there must be another scripts is monitoring it. And we need detail configure file to analyze it.


Ionut Grigorescu_2
Super Advisor

Re: cheating MC/Service Guard

Finaly I performed the test stopping the db package. But I found the script who start and monitor Oracle - it's /etc/cmcluster/ on my system. But none of the tests in the script which decide to start oracle again is based on checking a line containing ora_smon_omc_cheating .. When oracle runs there is a process ora_smon_omc running too, but the db package restarts oracle without looking at this process. However the software supplier gave me green light to test stopping the db package. Thank you all. case closed
If it weren't for STRESS I'd have no energy at all
Frequent Advisor

Re: cheating MC/Service Guard


I don't suggest you to alter the MCSG package scripts for your testing ....

Just halt the package .....
Mount the File systems manually .....
Start your database ....
play all your testing games .....
stop your database ... restart your database ....

once u finished all your testing,
unmount the file systems ....

run MCSG package to resume your normal work ...

i hope this helps ...

Jehad Al-Tuwairiki
Occasional Visitor

Re: cheating MC/Service Guard

Hi ionut

you can change your monitoring script to check for a maintenance flag, if that flag exists then MC/serviceGuard will NOT run the package on the other node.

for example change your script as follows:
while true
# checking for maint flag
if [ -f /etc/cmcluster/pkg name/maint_flag ]
sleep 30

# your normal monitor script



then when you want to test your software
just do this:
in /etc/cmcluster/pkg name/
# touch maint_flag

and take your application down, and MC/service guard will not switch the package to the other node.