- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to make package monitor other packages
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
11-29-2006 10:30 PM
11-29-2006 10:30 PM
I have three packages, one with oracle and other two with apps. I want my apps packages check if oracle runs, if no, wait till it's run, when oracle goes down they go too
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2006 11:57 PM
11-29-2006 11:57 PM
SolutionI suggest you make one package that starts multiple services in order.
Example, I need to start the database and then theapplication servver.
packge does thus:
starts the db
if the db is started correctly starts the app server.
It needs to do the reverse on the way down.
There is no rule that says a package can only do one thing.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2006 01:44 AM
11-30-2006 01:44 AM
Re: how to make package monitor other packages
Thanks a lot Steven
just to claryfi, in oracle package, in cu_def_functions except starting and stoping oracle put starting and stoping of ap package? does it cover every scenario?
the point is not to have ap's packages running without database accecible
thanks in advance
romek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2006 09:22 PM
11-30-2006 09:22 PM
Re: how to make package monitor other packages
I dont think that will work. However you can create a script to monitor your database when it goes down, will trigger app pakage (cmholdpkg) for that apps. Put this script in cron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2006 09:55 PM
11-30-2006 09:55 PM
Re: how to make package monitor other packages
what steven meant, if i well understand, is to join in ONE package ALL the functions, not to start other packages from one package: this is NOT good at all in my opinion.
I think that you should plan carefully what is your goal. You could have two solutions:
1. one package may do many things together, for instance starting a oracle server and a web server too. I usually create a different script for each function (like the rc scripts) and start them from the control script of the package checking each script return code. In this way you start/stop each function in a given order when the package start/stop and decide what to do if a function fails. The cons to this solution is that all the functions will run on the same node.
2. create a package for each function and, for package which depend from other, write a script like:
while true; do
if
done
That is to say a script which exit if the dependencies are not avilable
Configure the package to use this script as a SERVICE (see the control file of the package)
In this way if the first package is not avilable the second one will try first to switch node then will die automatically
This second solution is more difficult to configure and you must pay attention to the scripts: they must be really good working to avoid unwanted switch of the packages, but in this way you have packages running on different nodes and checking each other
Hope this helps, ciao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2006 10:52 PM
11-30-2006 10:52 PM
Re: how to make package monitor other packages
To avoid app startup before oracle:
===================================
Add a functionality to validate in your app startup script if oracle package status is "up". If the oracle package status is "starting", then wait till it is up and then start your app. If the oracle package status is "down", retry for a considerable amount of time then do not start your app, error out or start oracle package by issueing "cmrunpkg
If you feel it is not feasible to edit your app startup/halt scripts, you can write enough logic to the customer_defined_run/halt_cmds function in the package control scripts.
for ex:
function customer_defined_run_cmds
{
# script/logic to startup oracle database.
while :; do
status=`cmviewcl -p
if [[ $status = "up" ]] || [[ $status = "starting" ]]; then
continue
else
# error out or retry
# break
# cmmodpkg -e -n
# cmmodpkg -e
# do anything you wish
fi
done
}
To go down if oracle goes down:
===============================
Add another app monitor script (configured as another service - SERVICE_CMD), which will periodically check the status of oracle package. If the status is "down", retry for a considerable amount of time and get your app package down too.
Another alternative is to add the foll statements in the customer_defined_halt_cmds of oracle package control script.
function customer_defined_halt_cmds
{
# script to halt oracle database
cmhaltpkg app_pkg1
cmhaltpkg app_pkg2
}
The advantage of doing this:
There is no need to package oracle and other apps as a single package. This is in line to maintain data integrity.