+

Search Tips | Advanced Search

Use trace with IBM MQ server on IBM i

Use the TRCMQM command to start and stop tracing and specify the type of trace that you require.

There are two stages in using trace:
  1. Decide whether you want early tracing. Early tracing lets you trace the creation and startup of queue managers. Note, however, that early trace can easily generate large amounts of trace, because it is implemented by tracing all jobs for all queue managers. To enable early tracing, use TRCMQM with the TRCEARLY parameter set to *YES.
  2. Start tracing work using TRCMQM *ON. To stop the trace, we have two options:

    • TRCMQM *OFF, to stop collecting trace records for a queue manager. The trace records are written to files in the /QIBM/UserData/mqm/trace directory.
    • TRCMQM *END, to stop collecting trace records for all queue managers and to disable early trace. This option ignores the value of the TRCEARLY parameter.
Specify the level of detail you want, using the TRCLEVEL parameter set to one of the following values:

Specify the type of trace output you want, using the OUTPUT parameter set to one of the following values:


Selective trace

We can reduce the amount of trace data being saved, improving runtime performance, using the command TRCMQM with F4=prompt, then F9 to customize the TRCTYPE and EXCLUDE parameters:

The options available on both TRCTYPE and EXCLUDE are:


Wrapping trace

Use the MAXSTG parameter to wrap trace, and to specify the maximum size of storage to be used for the collected trace records. The options are:


Formatting trace output

To format any trace output:

We can also specify dspmqtrc * to format all trace.