- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to monitor unix process via mcsg control scrip...
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
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
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
тАО08-03-2006 05:38 AM
тАО08-03-2006 05:38 AM
Need to use mcsg pkg control script to monitor
certain processes ?
What do I put for SERVICE NAME ?
script to start process : "/sbin/init.d/nimbus_boot stop"
process to monitor by using ps is:
"./nimbus /opt/nimbus"
Need to restart once if not failover to secondary node
===================
I am assuming SERVICE command in mcsg pkg control script will work but dont know seems to be working . see log below.
SERVICE_NAME[0]="nimbus"
SERVICE_CMD[0]="./nimbus /opt/nimbus"
SERVICE_RESTART[0]="r 1"
I get following in the log.
Aug 3 10:21:03 - Node "ojrdhes3": Starting service nimbus using
"./nimbus /opt/nimbus"
cmrunserv : Service name nimbus does not exist.
ERROR: Function start_services
ERROR: Failed to start service nimbus
Aug 3 10:21:03 - Node "ojrdhes3": Halting service nimbus
cmhaltserv : Service name nimbus is not running.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2006 05:41 AM
тАО08-03-2006 05:41 AM
Re: how to monitor unix process via mcsg control script ?
This thread seems familiar.
Can you post your monitor script please.
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
тАО08-03-2006 06:15 AM
тАО08-03-2006 06:15 AM
Re: how to monitor unix process via mcsg control script ?
Thanks for replying again.
Well, Your question makes realize i am doing something wrong. I dont have a monitoring script.
I was thinking (maybe wrongly) that if I specify the parameters below in my pkg control script
1) app. startup script for SERVICE NAME
2) app process to monitor for SERVICE CMD
3) times to restart for SERVICE RESTART,
then if if kill SERVICE CMD process, the mcsg will try to restart on the same node using SERVICE NAME script once and then failover to other node based on SERVICE RESTART.
Maybe I am totally off base.
here is what i had:
SERVICE_NAME[0]="nimbus"
SERVICE_CMD[0]="./nimbus /opt/nimbus"
SERVICE_RESTART[0]="r 1"
How does monitoring of the process work and make the pkg failover to other box if the process fails?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-03-2006 08:50 AM
тАО08-03-2006 08:50 AM
SolutionYour service monitoring requires a script, usually in the package sub-directory, that is run when the the package is started.
This script does NOT start an application, it should start a process that goes out to monitor the application process(es) you are concerned about.
For example
SERVICE_NAME[0]=myservice
SERVICE_CMD[0]=/etc/cmcluster/mypkg/myscript
SERVICE_RESTART[0]="r 1"
and the script /etc/cmcluster/mypkg/myscript basically would do something like an infinite loop, checking for the existance of the process you are worried about. If this process is NOT there, then the servcei dies, and the package manager halts the package and switches it to the other node.
I recommend you read the Managing Serviceguard manual at:
htpp://docs.hp.com/en/ha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2006 01:50 AM
тАО08-04-2006 01:50 AM
Re: how to monitor unix process via mcsg control script ?
Make sense now but What would SERVICE NAME be ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2006 01:57 AM
тАО08-04-2006 01:57 AM
Re: how to monitor unix process via mcsg control script ?
/sbin/init.d/nimbus_boot start
and the customer_defined_halt_cmds to stop the application, such as:
/sbin/init.d/nimbus_boot stop
Define a Service Name for the application monitor in the package configuration file, such as:
SERVICE_NAME nimbusmon
cmapplyconf the pkg config file so that SG will have a link to the SERVICE_NAME and SERVICE_CMD that the package control script runs.
Use the same SERVICE_NAME reference in the package control script.
In the SERVICE_CMD parameter, reference the script that will periodically check for the existence of the nimbus process (see Melvyn's description above). The script should exit when it does not find the nimbus process. This exit signals Serviceguard to look at the SERVICE_RESTARTS, and if set to SERVICE_RESTART[0]="-r 1", it performs the SERVICE_CMD one more time before faulting the package and potentially failing it to an adoptive node.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2006 02:35 AM
тАО08-04-2006 02:35 AM
Re: how to monitor unix process via mcsg control script ?
Thanks