Natura deficit, fortuna mutatur, deus omnia cernit.
The WebSphere MQ for OS/400 Trace
NOTE: Use TRCEARLY *YES for problems with CRTMQM and STRMQM.
NOTE: If TRCEARLY(*YES) was specified at the start of trace, then it MUST be specified on termination.
where nnnnn is the pmr number
The MQSC commands in the instructions below are prefixed with "/cpf ", where cpf is the command prefix defined for the subsystem.
Follow the instructions listed below to start, stop and format WebSphere MQ for OS/390 GTF trace.
Notes:
This may include the MSTR, CHIN, batch, CICS, IMS, or TSO job names. Include the jobs that do the MQPUT and MQGET. Up to 5 job names can be listed.
Example:
Where
Start GTF Trace as listed above with additional parameters of MODE(INT) and REGION=1000K. Additionally, GTF parameter SADMP, SDUMP, or ABDUMP should be set to at least 10M, depending on the type of dump.
o Stop GTF trace Example:
Where yy is the identifier used on the START GTF command.
For additional details regarding trace, refer to the publication: WebSphere MQ for z/OS Problem Determination Guide.
Follow the instructions listed below to start, stop and format WebSphere MQ for z/OS MSTR Internal trace.
For MQ V5.3.x, the MSTR trace table size is specified in the CSQ6SYSP parameter TRACTBL (defaults to 99 4K blocks). You must recycle the queue manager if you make a change to this value.
For MQ V6, you can increase the size of the trace by issuing a SET SYSTEM TRACTBL(nn) command. nn is in 4K blocks, and the range is 1 to 999 with a default of 99. If there is any trace currently in effect, the existing trace table continues to be used, and its size is unchanged. A new global trace table is only obtained for a new START TRACE command. If a new trace table is created with insufficient storage, the old trace table continues to be used, and the message CSQW153E is displayed.
o Dump the MQ MSTR address space. See Figure 3 or Figure 5 in the Problem Determination Guide for example dump commands.
o MSTR trace information can be displayed by entering the IPCS command:
Where ssnm is the subsystem name.
For additional details regarding trace, refer to the publication: WebSphere MQ for z/OS Problem Determination Guide
When searching for RCs and CCs in FMT files, keep in mind they are written in Hex, this is d'2035 is x'07F3, and d'2085 is x'0825. Gracias, Dani ! [03-2009]
Follow the instructions listed below to start, stop and format WebSphere MQ for z/OS CHIN trace.
For MQ V5.3.x, the CHIN trace table size is specified in the CSQ6CHIP parameter TRAXTBL (defaults to 2M). You must recycle the CHIN if you make a change to this value.
For MQ V6, you can increase the size of the trace dataspace by issuing an ALTER QMGR TRAXTBL(nn) command. nn is in MB, and the smallest value you can have is 2 (default value). Issuing this command causes a message to be sent to the CHIN, which will free the existing trace dataspace (if there is one) and allocate a new one of the new size.
to start both MSTR and CHIN internal trace
OR
to start CHIN internal trace only
Start trace (v6.0):
Note that you cannot issue START TRACE(CHINIT) if the command server or the channel initiator is not running.
Dump the channel initiator (CHIN) address space. The dump must include the trace data space (CSQXTRDS), which contains the trace information. See Figure 4 or Figure 5, in the Problem Determination Guide for example dump commands.
V5.3.x:
v6.0:
CHIN trace information can be displayed by entering the IPCS command:
Where ssnm is the subsystem name.
or the command:
For additional details regarding trace, refer to the publication: WebSphere MQ for z/OS Problem Determination Guide
If you are diagnosing a problem with the keyring read by SSL, then the trace MUST be started just prior to the channel initiator. Otherwise the required trace information will not be collected.
If you are diagnosing a problem with the certificate exchange during the channel handshake then the trace MUST be started just prior to the secure channel being started; otherwise the required trace information will not be collected.
The following will trace MQ initialization and will show what certificates were read off of the keyring:
At this point, you can either copy the dataset that the above trace was written to or write this next trace to a different dataset.
This next trace will capture the an error at channel start (GSKSRVR should still be started before the ssidCHIN job):
To format the trace in IPCS, ensure the following load library is in the STEPLIB concatenation:
Issue the IPCS command:
Refer to the z/OS System SSL Programming manual
Follow the instructions listed below to start, stop and format the AIX trace on V5.3.
Note: WebSphere MQ 6.0 customers should review the second part of this section. The additional trace function described in part two is only available at WebSphere MQ V6.0.
The following command starts a trace of WebSphere MQ data which will grow to approximately 50MB in size before wrapping. You can change the maximum size, but be aware that a small size may prevent useful information from being captured. The larger you make the file size the better chance of capturing the trace you need. You can choose any output file name you wish, but be sure there is ample storage for the trace:
Because AIX traces wrap by default, it is important to stop tracing as soon as the problem occurs. If you delay in stopping the trace, or if your trace file size is too small, the information you hope to gather may be overwritten by new trace data
For additional details regarding trace, refer to the publication: WebSphere MQ System Administration Guide
Full information on AIX trace options is available in the General Programming Concepts: Writing and Debugging Programs
Follow the instructions listed below to start, stop and format WebSphere MQ for AIX trace. Trace files are written to the directory /var/mqm/trace, so delete or relocate old trace files before beginning a new trace.
Or format wrapping trace files:
The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT.
If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above.
For additional details regarding trace, refer to the publication WebSphere MQ System Administration Guide
Follow the instructions listed below to start, stop and format WebSphere MQ for HP-UX trace. Trace files are written to the directory /var/mqm/trace/, so delete or relocate old trace files before beginning a new trace.
Or format wrapping trace files:
The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT.
If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above.
For additional details regarding trace, refer to the publication: WebSphere MQ System Administration Guide
Examples: This command enables tracing of data from common services and the local queue manager, for a queue manager called QM1:
Optional parameters:
Examples: This command ends tracing of data for a queue manager called QM1:
Required parameters: InputFileName
Specifies the name of the file containing the unformatted trace.
For example MQS_ROOT:[MQM.TRACE]AMQ20202345.TRC.
Optional parameters
Example: The following command shows the redirection of output:
For further details see WebSphere MQ for HP OpenVMS System Administration Guide, Chapter 14, Using WebSphere MQ trace.
Examples:
This command enables tracing of processing flow
from common services and local queue manager agents
for a queue manager called QM1.
Trace data is generated at the default level of detail.
The command enables tracing only for those server processes
of the queue manager that are running in CPU 3.
This is how to enter the command at an OSS shell command prompt:
This is how to enter the command at a TACL command prompt:
Examples:
This command ends tracing
for those server processes of queue manager QM1
that are running in the same CPU as the OSS shell or TACL session
in which the command is entered.
The tracing of the server processes of queue manager QM1
that are running in other CPUs is unaffected.
This command ends tracing for those server processes of queue manager QM2 that are running in CPU 3. The tracing of the server processes of queue manager QM2 that are running in other CPUs is unaffected. This is how to enter the command at an OSS shell command prompt:
This is how to enter the command at a TACL command prompt:
Required parameter:
InputFileName
The name of the file containing the unformatted trace;
for example, var_installation_path/var/mqm/trace/AMQ1200345.TRC.
If you provide one input file,
dspmqtrc formats it either to stdout or to the output file you name.
If you provide more than one input file,
any output file name you specify is ignored,
and each output file has the same name as the corresponding input file,
but with an extension of .FMT instead of .TRC.
Optional parameters:
For further details see: WebSphere MQ for HP NonStop Server: System Administration Guide, Chapter 16, Tracing
Follow the instructions listed below to start, stop and format WebSphere MQ for Linux trace. Trace files are written to the directory /var/mqm/trace/, so delete or relocate old trace files before beginning a new trace.
Or format wrapping trace files:
The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT. If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above.
For additional details regarding trace, refer to the publication: WebSphere MQ System Administration Guide.
Follow the instructions listed below to start, stop and format WebSphere MQ for Solaris trace. Trace files are written to the directory /var/mqm/trace/, so delete or relocate old trace files before beginning a new trace.
Or format wrapping trace files:
The trace formatter program converts binary files named AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) into readable files named AMQppppp.FMT. If you used a wrapping trace, then each time a .TRC reaches the size limit MQ renames it to a .TRS extension and starts a new .TRC file. The trace formatter can convert both files to a single formatted file, but only if you format the .TRC and .TRS files at the same time, as shown above.
For additional details regarding trace, refer to the publication: WebSphere MQ System Administration Guide.
Follow the instructions listed below to start, stop and format WebSphere MQ for Windows trace.
The trace records are written to the following directory where <mqmwork> is the directory where WebSphere MQ was installed.
On Windows, the trace files are readable without formatting. However, they are still called AMQppppp.TRC (where ppppp is the process identifier or pid which created the file) rather than AMQppppp.FMT.
For additional details regarding trace, refer to the publication: WebSphere MQ System Administration Guide.
A complete script shall look like this one :
Follow the instructions listed below to run trace for the WebSphere MQ for Windows v6.0 Explorer using the MQ Java API.
Add the following line, which specifies the properties file in C:\TEMP\internal.properties
Note: The command must be typed on ONE LINE in the runmqcfg.cmd and runmqcfg_rcp.cmd files and BEFORE the statement:
Follow the instructions listed below to run trace for the WebSphere MQ for Linux v6.0 Explorer using the MQ Java API.
Modify the line:
And add the single line:
Note: If you want, you can include the above line in the user's profile.
Follow the instructions listed below to start, stop and format trace for the WebSphere MQ base Java classes.
WebSphere MQ base Java classes includes a trace facility which you can use to produce diagnostic output if you suspect that there might be a problem with the code. Your program must control tracing using the enableTracing and disableTracing methods of the MQEnvironment class.
The trace records are by default written to the Java console, but if you specify an output file name the trace output will be written there instead.
For additional details regarding trace, refer to the publication: WebSphere MQ Using Java.
Follow the instructions listed below to start, stop and format JMS trace.
WebSphere MQ JMS applications normally invoke trace by using command line arguments to the 'java' command. For example:
Sometimes this is not possible and you may need to invoke trace from within the source code. This can be done as follows:
The value of MQJMS_TRACE_DIR may also be controlled programmatically:
The trace records are written to a file called mqjms.trc in the current directory if the MQJMS_TRACE_DIR property is not set. Although the directory can be changed, the file name is always mqjms.trc.
For additional details regarding trace, refer to the publication: WebSphere MQ Using Java.
For details on how to enable JCA Resource adapter trace, refer to the WebSphere MQ Using Java manual. The ra.xml file provided with the 6.0.2.1 resource adapter has these properties defined, so they just need editing to enable trace..
Note : MQ JMS/Java trace needs enabling as above, how this is done will depend on the application server in use. Two files will need collecting mqjms.trc from the JMS client, and the trace file created by the JCA RA.
Follow the instructions listed below to enable JMS trace under WebLogic.
Enabling JMS trace for releases of WebSphere Application Server
Note: You must switch the OLDS/OLPS in IMS and save the one that contains current IMS trace. If OLDS/OLPS too big, then cut 6701 recs and send those.
MS0P -
provides a mechanism to format Event messages and to aggregate the Statistics and Accounting reports generated by MQ.
The SupportPac also implements the Trace Route function, reporting on the route that messages take through a network.
MH06 - provides simple command line tools (mqtrcfrmt, mqoptions, and mqapitrcstats) to aid in using MQ traces