HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SG debug mode and resource management
Operating System - HP-UX
1833750
Members
3150
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2011 09:08 PM
04-30-2011 09:08 PM
SG debug mode and resource management
Hi
to start a cluster in "debug mode" one would have to place a file called "debug" in the /etc/cmcluster/ directory.
This would presumeably allow the package applications to be taken down without the package going down as well.
My questions are:
1. is it possible to put this in effect without restarting the whole cluster;
2. I have seen a scenario in the past where I placed a file called "debug" into the correct directory but the package didnt stay up when the underlying applications were down. The syslog complained of resource issues. I removed resource monitoring and the package stayed up without the applications running. Was this behaviour and solution normal ?
I assumed that simply putting the debug file in place was the cure-all for allowing the apps to be shutdown with the package following suit. .....or could I have achieved the same end by turning off the resource monitoring without the debug file .....or do both things (debug + resource monitoring off) need to be in effect ?
Thanks in advance !
to start a cluster in "debug mode" one would have to place a file called "debug" in the /etc/cmcluster/
This would presumeably allow the package applications to be taken down without the package going down as well.
My questions are:
1. is it possible to put this in effect without restarting the whole cluster;
2. I have seen a scenario in the past where I placed a file called "debug" into the correct directory but the package didnt stay up when the underlying applications were down. The syslog complained of resource issues. I removed resource monitoring and the package stayed up without the applications running. Was this behaviour and solution normal ?
I assumed that simply putting the debug file in place was the cure-all for allowing the apps to be shutdown with the package following suit. .....or could I have achieved the same end by turning off the resource monitoring without the debug file .....or do both things (debug + resource monitoring off) need to be in effect ?
Thanks in advance !
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2011 09:23 PM
04-30-2011 09:23 PM
Re: SG debug mode and resource management
Sorry ...I forgot to add..
When you do add the "debug" file in place, what exactly does it tell SG to do or not do?, that is the specific elements/ commands that are run or not run ...
When you do add the "debug" file in place, what exactly does it tell SG to do or not do?, that is the specific elements/ commands that are run or not run ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2011 03:07 AM
05-01-2011 03:07 AM
Re: SG debug mode and resource management
The "debug mode" is something implemented by the package startup/shutdown/service scripts, not by Serviceguard itself.
If you aren't using a toolkit, you can implement the debug file functionality yourself. Doing so would often be a good idea.
1.) Yes.
2.) In legacy-style Serviceguard configuration, resource monitoring is defined in the package configuration file. If RESOURCE_START is specified as AUTOMATIC, resource monitoring is started automatically and package scripts cannot affect it at all.
If RESOURCE_START is set to DEFERRED, I guess a customized package control script might be able to disable monitoring for these resources by not setting the corresponding DEFERRED_RESOURCE_NAME[n] variables when a debug file is detected. On the other hand, this might cause the package to remain in "starting" state, since the package configuration file tells Serviceguard to expect the package control script to activate monitoring for those resources.
Usually, the debug file would cause the package control script to skip any custom package startup/shutdown actions, and the service scripts to skip any application-related actions and just sleep instead. (To take the debug file into account, the service has to be a script or a Serviceguard toolkit component.)
If you have set up some resource monitoring conditions that won't be satisfied if the application isn't actually up, then I guess you would indeed have to turn off resource monitoring before shutting down the application.
If you have services monitoring the application (e.g. a service script that sleeps a while, then checks to make sure the application is still running), then the service script should check for the presence of the debug file, and skip all tests and just sleep when the debug file exists.
In other words, the service script would essentially have to be something like this:
-----
#!/bin/sh
INTERVAL=60 # sleep 60 s between checks
PKGNAME=
while true; do
sleep $INTERVAL
if [ -f /etc/cmcluster/$PKGNAME/debug ]; then
: # nothing, debug mode enabled
else
# add all application checks here
# if something is wrong, the script should exit
fi
done
-----
If you have both resource monitoring and services in your package, then yes, you'll have to both disable the resource monitoring and create the debug file before you can fiddle with the application.
MK
If you aren't using a toolkit, you can implement the debug file functionality yourself. Doing so would often be a good idea.
1.) Yes.
2.) In legacy-style Serviceguard configuration, resource monitoring is defined in the package configuration file. If RESOURCE_START is specified as AUTOMATIC, resource monitoring is started automatically and package scripts cannot affect it at all.
If RESOURCE_START is set to DEFERRED, I guess a customized package control script might be able to disable monitoring for these resources by not setting the corresponding DEFERRED_RESOURCE_NAME[n] variables when a debug file is detected. On the other hand, this might cause the package to remain in "starting" state, since the package configuration file tells Serviceguard to expect the package control script to activate monitoring for those resources.
Usually, the debug file would cause the package control script to skip any custom package startup/shutdown actions, and the service scripts to skip any application-related actions and just sleep instead. (To take the debug file into account, the service has to be a script or a Serviceguard toolkit component.)
If you have set up some resource monitoring conditions that won't be satisfied if the application isn't actually up, then I guess you would indeed have to turn off resource monitoring before shutting down the application.
If you have services monitoring the application (e.g. a service script that sleeps a while, then checks to make sure the application is still running), then the service script should check for the presence of the debug file, and skip all tests and just sleep when the debug file exists.
In other words, the service script would essentially have to be something like this:
-----
#!/bin/sh
INTERVAL=60 # sleep 60 s between checks
PKGNAME=
while true; do
sleep $INTERVAL
if [ -f /etc/cmcluster/$PKGNAME/debug ]; then
: # nothing, debug mode enabled
else
# add all application checks here
# if something is wrong, the script should exit
fi
done
-----
If you have both resource monitoring and services in your package, then yes, you'll have to both disable the resource monitoring and create the debug file before you can fiddle with the application.
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP