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 » WebSphere Message Broker (ACE) Support » Check which installation a broker is associated with

Post new topic  Reply to topic
 Check which installation a broker is associated with « View previous topic :: View next topic » 
Author Message
jsware
PostPosted: Tue Jun 24, 2014 3:30 am    Post subject: Check which installation a broker is associated with Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

How can I check which installation a broker is associated with from within a script?

So if I have v8 and v9 of MQSI installed and create a broker using each version.

So in order to start them within a script, I need to execute mqsiprofile from the relevant version. I need to be able to determine which mqsiprofile to source in before executing mqsistart on the broker. Where can I find this information?
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
Tibor
PostPosted: Tue Jun 24, 2014 6:24 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

You can list all the mqsiprofile related environment variables with this command: set | grep MQSI and then you can choose the most appropriate one: MQSI_VERSION
Back to top
View user's profile Send private message
jsware
PostPosted: Tue Jun 24, 2014 12:39 pm    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

Tibor wrote:
You can list all the mqsiprofile related environment variables with this command: set | grep MQSI and then you can choose the most appropriate one: MQSI_VERSION
But I have not sourced in mqsiprofile yet so no MQSI environment variables are set. I want to work out which mqsiprofile to source in to start each broker on a machine
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Tue Jun 24, 2014 1:11 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

I am a little confused. When you create a broker, you are not creating it at a version i dont think.

in my case i can source 8.0.0.4 profile and start the broker and it runs as 8.0.0.4.

i can source 8.0.01 profile and start the broker to run it as 8.0.01 broker.

but when it comes to v8 and v9 not sure if i can do that.
Back to top
View user's profile Send private message Yahoo Messenger
zpat
PostPosted: Tue Jun 24, 2014 1:26 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

mqsilist -a
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
jsware
PostPosted: Thu Jul 03, 2014 11:48 pm    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

paustin_ours wrote:
I am a little confused. When you create a broker, you are not creating it at a version i dont think.

in my case i can source 8.0.0.4 profile and start the broker and it runs as 8.0.0.4.

i can source 8.0.01 profile and start the broker to run it as 8.0.01 broker.

but when it comes to v8 and v9 not sure if i can do that.
But if I have version 8.0.0.4 and 9.0.0.1 installed (because say, I am upgrading), I want to start it with the last started version similar to what Windows broker services do. only after you start a broker from the command line with a new version does the service get updated to the new program.

zpat wrote:
mqsilist -a
This tells me all the brokers installed (with some parsing), but not which version of the program was last used to start it. And I have to have chosen a version of mqsi to run this command with.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jul 04, 2014 12:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20700
Location: LI,NY

Code:
C:\Program Files\IBM\MQSI\9001>mqsilist -a -d 2
BIP1280I: The number of IBM Integration Bus runtime installations on this machine is '4'.

 8.0.0.1 : C:\Program Files\IBM\MQSI\8.0.0.1
 8.0.0.0 : C:\Program Files\IBM\MQSI\8.0.0.0
 7.0.0.3 : C:\Program Files\IBM\MQSI\7.0
 9.0.0.1 : C:\Program Files\IBM\MQSI\9001

BIP8221I: Broker: TEST (Version v7.0)  -  TEST
BIP8221I: Broker: TEST8 (Version v8.0)  -  TEST8
BIP8221I: Broker: TEST8001 (Version v8.0)  -  TEST8001

===================================
BIP1285I: Broker 'IIB9001' on queue manager 'IIB9001' is stopped.

Start the broker for more information.
BIP8071I: Successful command completion.

mqsilist -a -d 2 gives you plenty of information.
Now as to which version of mqsi to run looking at version 8, the only way to know is to check the level of the associated qmgr... TEST8 qmgr and TEST8001 qmgr.

For this use the latest version of the mq install and run
pathtolatestbin\setmqenv -m brokerqmgr
dspmqver

Thus you are able to distinguish which level of broker 8 to run against which broker at level 8. (8001 required a higher version of MQ than 8000).

By the way I inserted a little script in the place reserved for user scripts to run under mqsiprofile, that will check the level of the mqsiprofile being run and set the installation of MQ accordingly...

as directed under C:\ProgramData\IBM\MQSI\common\profiles
file mymqenv.cmd:
Code:
@echo off
rem setting mq environment

if "%mqsi_version%" geq "8.0.0.1" (c:\mq75\bin\setmqenv -n mq75)



Have fun.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jsware
PostPosted: Fri Jul 04, 2014 3:07 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

Thanks fjb_saber - useful information.

The problem with mqsilist is that it only works if you've sourced in an mqsiprofile, which means you cannot source in another without hacking the environment variables significantly

I did find a little hack - there seems to be a file called AdminAgentPIDPath in the broker registry that contains the version of the broker that has been run. Not overly happy with looking for an internal file which IBM may change, but it gets me so far at the moment.

I'm using that file as a basis, I then start the broker in a subshell using:

bash -c "source $path/bin/mqsiprofile && mqsistart $broker"

I like your idea of resetting the MQ environment using a broker-wide script in the profiles directory.

Thanks
John.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Check which installation a broker is associated with
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.