- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Starting/Stopping package
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
06-15-2010 05:46 AM
06-15-2010 05:46 AM
I have trouble identifying the method of starting and stopping the package. I see that is is effected from tkit_module.sh.
#############################################################
#
# START FUNCTION
#
############################################################
function start_function
{
. $APP_TKIT_APP_START
exit_code=$?
}
#############################################################
#
# STOP FUNCTION
#
############################################################
function stop_function
{
. $APP_TKIT_APP_STOP
exit_code=$?
}
Where are these two environment variables defined and how do I get them to point to my start and stop scripts? I have tested the scripts using sh -x and they work fine.
SMH says the package has started and the /var/adm/cmcluste/log/... says it was successful, but the start script never ran.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2010 06:17 AM
06-15-2010 06:17 AM
Re: Starting/Stopping package
Generally, once I create a package, which I tend to keep at this path:
/etc/cmcluster/packages/
It creates two files, the ascii (HA Package Configuration File) and under it is put the path location of where to run:
RUN_SCRIPT /etc/cmcluster/packages/
HALT_SCRIPT /etc/cmcluster/packages/
Now those two files just mentioned come from that second file the pkg creation task created and it is called the HA Package Control Script.
In this .cntl or Control Script file you have a section called:
function customer_defined_run_cmds
and
function customer_defined_halt_cmds
Under these sections you put in the path/file names of the scripts that kick off your oracle environment or special scripts that need to run to start up (or stop) your processes.
The file systems would be defined in this file and would be mounted up as definined in that section.
All of this is covered at docs.hp.com under High Availability. Nothing works better than a good read to get you started in the right direction.
http://docs.hp.com/en/ha.html
Regards,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2010 05:27 AM
06-16-2010 05:27 AM
SolutionIf you have a software contract and access to the ITRC knowledge database, search for emr_na-c01987897
Title: "HPUX Serviceguard - Implementing external scripts in modular packages"
In summary, first, make a modular package configuration file:
cmmakepkg -n
Edit it and uncomment
#external_script
Example:
external_script /etc/cmcluster/
If you haven't already done so, copy the external script template to the target path:
# cd /etc/cmcluster/
# cp ../examples/external_script.template
The template gives specific instructions on how to edit it but basically:
function start_command
{
sg_log 5 "start_command"
# ADD your package start steps here
return 0
}
and
function stop_command
{
sg_log 5 "stop_command"
# ADD your package halt steps here
return 0
}
Finally, cmapplyconf the package configuration file (the one created with cmmakepkg) to update the cluster with this new package, then use cmrunpkg to test it.
The package start/stop log will be in /var/adm/cmcluster/logs unless you customized that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2010 05:46 AM
06-16-2010 05:46 AM
Re: Starting/Stopping package
I work overnite and I spent some time with SMH. While editing sg/external for the package, I was able to figure that out using SMH.
Your steps are very clear for the solution outside of SMH.
I did have a lot of trouble understanding Rita's answer - never did get it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2010 05:49 AM
06-16-2010 05:49 AM