ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Tivoli ITM6 define as MQ-Service

Post new topic  Reply to topic
 Tivoli ITM6 define as MQ-Service « View previous topic :: View next topic » 
Author Message
hmh
PostPosted: Thu Feb 23, 2012 1:37 am    Post subject: Tivoli ITM6 define as MQ-Service Reply with quote

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
View user's profile Send private message Visit poster's website
JasonE
PostPosted: Thu Feb 23, 2012 4:14 am    Post subject: Reply with quote

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
View user's profile Send private message
hmh
PostPosted: Thu Feb 23, 2012 4:54 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
hmh
PostPosted: Thu Feb 23, 2012 5:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
JasonE
PostPosted: Thu Feb 23, 2012 9:27 am    Post subject: Reply with quote

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
View user's profile Send private message
hmh
PostPosted: Tue Mar 13, 2012 5:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Tue Mar 13, 2012 5:36 am    Post subject: Reply with quote

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
View user's profile Send private message
hmh
PostPosted: Tue Mar 13, 2012 5:53 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Tue Mar 13, 2012 6:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Tivoli ITM6 define as MQ-Service
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.