Author |
Message
|
hmh |
Posted: Thu Feb 23, 2012 1:37 am Post subject: Tivoli ITM6 define as MQ-Service |
|
|
 Apprentice
Joined: 31 Mar 2006 Posts: 29 Location: Germany
|
Hello,
trying to define the starting and stopping if Tivolis ITM6 as a MQ Service.
The definition as a MQ Service (command) is successfull, but I want to define this service as SERVTYPE(SERVER).
Plattform is Solaris 10 MQ is the Version 6.0.2.6
ITM6 Commands (have to run with user mqm)
/opt/IBM/ITM/bin/itmcmd agent -o <QMGRNAME> start mq
/opt/IBM/ITM/bin/itmcmd agent -o <QMGRNAME> stop mq
This definition works!
define service(<QMGRNAME>.ITM6.SERVICE) SERVTYPE(COMMAND) +
CONTROL(QMGR) +
STARTCMD('/opt/IBM/ITM/bin/itmcmd') +
STARTARG('agent -o <QMGRNAME> start mq') +
STOPCMD('/opt/IBM/ITM/bin/itmcmd') +
STOPARG('agent -o <QMGRNAME> stop mq') +
REPLACE
This one I tried, the Agend is started, but svstaus told me "not found" and the MQ-Explorer said Servicestatus is stopped.
define service(<QMGRNAME>.ITM6.SERVICE) SERVTYPE(SERVER) +
CONTROL(QMGR) +
STARTCMD('/opt/IBM/ITM/bin/itmcmd') +
STARTARG('agent -o <QMGRNAME> start mq') +
STOPCMD('/opt/IBM/ITM/bin/itmcmd') +
STOPARG('agent -o <QMGRNAME> stop mq -p +MQ_SERVER_PID+') +
REPLACE
dis SVSTATUS(<QMGRNAME>.ITM6.SERVICE)
6 : dis SVSTATUS(<QMGRNAME>.ITM6.SERVICE)
AMQ8147: WebSphere MQ object <QMGRNAME>.ITM6.SERVICE not found.
Any Idae or hint?
Kind regards
Michael _________________ Michael Hoppe
63067 Offenbach
+49 (0)170 / 9629 131
http://www.hmhcs.de |
|
Back to top |
|
 |
JasonE |
Posted: Thu Feb 23, 2012 4:14 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
So servtype command is usually used when you spawn a command and it ends, leaving something else running in the background. servtype server is when the thing you launch keeps running.
If the first definition works, then is it the case that itmcmd ends, in which case the second definition is inappropriate. The startcmd needs to stay running (ie not return) otherwise it will be reported as stopped because MQ needs something to monitor (if the command ends how does it know what it did?) |
|
Back to top |
|
 |
hmh |
Posted: Thu Feb 23, 2012 4:54 am Post subject: |
|
|
 Apprentice
Joined: 31 Mar 2006 Posts: 29 Location: Germany
|
Hy,
so the process I expected is this.
$ ps -ef |grep <QMGRNAME>
mqm 24411 2985 0 10:11:34 ? 0:10 /opt/IBM/ITM/sol283/mq/bin/kmqagent /opt/IBM/ITM/config/<ITM6CONFIG>_mq_<QMGRNAME>.cfg
I will try to start this directly ....
define service(<QMGRNAME>.ITM6.SERVICE) SERVTYPE(SERVER) +
CONTROL(QMGR) +
STARTCMD('/opt/IBM/ITM/sol283/mq/bin/kmqagent') +
STARTARG('/opt/IBM/ITM/config/<ITM6CONFIG>_mq_<QMGRNAME>.cfg') +
STOPCMD('/opt/IBM/ITM/bin/itmcmd') +
STOPARG('agent -o <QMGRNAME> stop mq') +
REPLACE _________________ Michael Hoppe
63067 Offenbach
+49 (0)170 / 9629 131
http://www.hmhcs.de |
|
Back to top |
|
 |
hmh |
Posted: Thu Feb 23, 2012 5:08 am Post subject: |
|
|
 Apprentice
Joined: 31 Mar 2006 Posts: 29 Location: Germany
|
ok, start works, but the stop-command won't _________________ Michael Hoppe
63067 Offenbach
+49 (0)170 / 9629 131
http://www.hmhcs.de |
|
Back to top |
|
 |
JasonE |
Posted: Thu Feb 23, 2012 9:27 am Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
Check what the start script actually does - it may do more than just launch an executable? Afraid I'm not sure from here... is there any evidence the stopcmd is actually being launched? |
|
Back to top |
|
 |
hmh |
Posted: Tue Mar 13, 2012 5:17 am Post subject: |
|
|
 Apprentice
Joined: 31 Mar 2006 Posts: 29 Location: Germany
|
Hi all,
I get a little bit forward.
The problem is, that the start command is a shellscript that ends after some time and so the PID is gone.
STARTCMD('/opt/IBM/ITM/bin/itmcmd') +
STARTARG('agent -o <QMGRNAME> start mq') +
works and during the script is running I get the status "running" and a valid PID.
Afer the script end the process
/opt/IBM/ITM/sol283/mq/bin/kmqagent /opt/IBM/ITM/config/<ITM6CONFIG>_mq_<QMGRNAME>.cfg
is up and running but with a different PID!
So now the question.
It is possible to give the Service-Devinition another PID during the start command?
The correct PID can be determined with one of the following commands
ps -ef |egrep 'kmqagent.*.<QMGRNAME>' | grep -v grep | awk '{print $2}'
/opt/IBM/ITM/bin/cinfo -R |grep <QMGRNAME> | awk '{print $3}'
Any Idea?
Kind regards
Michael _________________ Michael Hoppe
63067 Offenbach
+49 (0)170 / 9629 131
http://www.hmhcs.de |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Mar 13, 2012 5:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Again, you use "SERVTYPE(COMMAND)" when the command that is being launched will stop.
You use "SERVTYPE(SERVER)" when the command that is being launched will not stop.
Your Tivoli agent process is started by the itcmd process, but the itcmd process itself ends.
So you can't use SERVTYPE(SERVER). |
|
Back to top |
|
 |
hmh |
Posted: Tue Mar 13, 2012 5:53 am Post subject: |
|
|
 Apprentice
Joined: 31 Mar 2006 Posts: 29 Location: Germany
|
Hy,
so this I intended too, but I wasn't shure and hoped that anyone has another good idea to resolve this.
I think to start ITM6 as a command will be good enough.
Kind regards for this very quick answer,
Michael _________________ Michael Hoppe
63067 Offenbach
+49 (0)170 / 9629 131
http://www.hmhcs.de |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 13, 2012 6:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Has anybody given some thought as to the value of starting/stoping Tivoli with the qmgr?
Wouldn't you want Tivoli to report on qmgr down? It should be started with the OS and not the qmgr...
Just my $0.02  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|