Search This Blog

Monday, August 31, 2009

MQSeries - enable trace

To Enable WebSphere MQ tracing by executing the following command.
On Windows (Win32) systems: strmqtrc -t api -l 5
On Linux systems: strmqtrc -e -t api -l 5

The strmqtrc tool can be found under the bin directory located under the main MQ
installation directory.

To Stop tracing by executing the command below.
On Windows (Win32) systems: endmqtrc
On Linux systems: endmqtrc -a

The WebSphere MQ trace logs can be found under the (MQ_HOME)\trace directory ,(on AIX its under /var/mqm/trace)
and are all the files that end with extension ".TRC"

i just found a good article how to set trace and decode it
Tracing WebSphere MQ

enjoy
YanivT

MQSeries commands for queue manager and queues

The next post will show you how to create queue manager and Queues to start working with MQseries product and some tips to work from unix to windows via mqseries.
i hope you will find it useful for you.


1. MQ SERIAS SETTING

1.1 Create queue manager
crtmqm MY_QM

1.2 Creating the QUEUEIN and QUEUEOUT queue
strmqm MY_QM ( start the queue manger)
runmqsc MY_QM ( start the MQSeries command for MY_QM )
DEFINE QLOCAL(QUEUEIN) ( the rest is default)
DEFINE QLOCAL(QUEUEOUT) ( the rest is default)
// for setting maximum handles to the qmgr – for BenchMark
alter qmgr maxhands(1500)

1.3 Creating the Channel for MY_QM
runmqsc MY_QM ( start the MQSeries command for MY_QM )
DEFINE CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN) MCAUSER(‘mqm’)
End (exit from MQSeries command)

1.4 Setting the maximum user connection – optional
Edit the qm.ini file – for the specific queue manager that you created.
Add to the end:
CHANNELS:
MaxChannels = 200 ; Maximum number of Channels allowed.
MaxActiveChannels = 200 ; Maximum number of Channels allowed to be
; active at any time.

1.5 Mq Serias version 6
After creating the queue in version 6 we have to define permission on the queue manager and the queues .
Run the next commands for the queue manager
setmqaut -m MY_QM -t qmgr -p [username] +all
or
setmqaut -m MY_QM -t qmgr -g [Group Name] +all


Run the next commands for the queues:
setmqaut -m MY_QM -n QUEUEIN -t q -p [username] +all
setmqaut -m MY_QM -n QUEUEOUT -t q -p [username] +all

OR
setmqaut -m MY_QM -n QUEUEOUT -t q -g [Group Name] +all

• On the channel – not sure you can set permission too
setmqaut -m [q mgr] -n [channel name] -t chl -g [group name] +all - on the channel name

1.6 Connection from UNIX to MQ server on windows
If you are running your process under user name e.g. root.
Add an account on the windows where the mq server installed and add the user to the mqm group, restart the queue manager .
This way you can access from UNIX to mqserias on windows platform.

1.7 running the MY_QM MQSeries listener
endmqm –i MY_QM (Shut down MY_QM queue Manager)
strmqm MY_QM ( start the queue manger)
strmqcsv MY_QM (Restart the command queue server after restarting the queue manager)
runmqlsr -t tcp -p 1414 -m MY_QM


enjoy
YanivT