Use trace on Windows
Use the strmqtrc and endmqtrc commands or the IBM MQ Explorer interface to start and end tracing.
Windows uses the following commands for the client trace facility:
- strmqtrc
- to start tracing
- endmqtrc
- to end tracing
The output files are created in the MQ_DATA_PATH/trace directory.
Trace files on IBM MQ for Windows
Trace files are named AMQppppp.qq.TRC where the variables are:
- ppppp
- The ID of the process reporting the error.
- A sequence number, starting at 0. If the full file name exists, this value is incremented by one until a unique trace file name is found. A trace file name can exist if a process is reused.
Note:
- The process identifier can contain fewer, or more, digits than shown in the example.
- There is one trace file for each process running as part of the entity being traced.
To format or view a trace file, we must be either the creator of the trace file, or a member of the mqm group.
SSL trace files have the names AMQ.SSL.TRC and AMQ.SSL.TRC.1. We cannot format SSL trace files; send them unchanged to IBM support.
How to start and stop a trace
Enable or modify tracing using the strmqtrc control command (see strmqtrc ). To stop tracing, use the endmqtrc control command (see endmqtrc ).
In IBM MQ for Windows systems, we can also start and stop tracing using the IBM MQ Explorer, as follows:
- Start the IBM MQ Explorer from the Start menu.
- In the Navigator View, right-click the IBM MQ tree node, and select Trace.... The Trace Dialog is displayed.
- Click Start or Stop as appropriate.
Selective component tracing
Use the -t and -x options to control the amount of trace detail to record. By default, all trace points are enabled. We can specify the points that we do not want to trace using the -x option. So if, for example, we want to trace only data flowing over communications networks, use:strmqtrc -x all -t commsFor detailed information about the trace command, see strmqtrc.
Selective process tracing
Use the -p option of the strmqtrc command control to restrict trace generation to specified named processes. For example, to trace all threads that result from any running process called amqxxx.exe, use the following command:strmqtrc -p amqxxx.exeFor detailed information about the trace command, see strmqtrc. Parent topic: Use trace
Related concepts
- Use trace on UNIX and Linux systems
- Use trace with IBM MQ server on IBM i
- Use trace for problem determination on z/OS
- Tracing TLS: runmqakm, strmqiqm, and runmqckm functions
- Tracing additional IBM MQ Java components