Using trace on UNIX and Linux systems
Use the strmqtrc and endmqtrc commands to start and end tracing, and dspmqtrc to display a trace file
- strmqtrc
- to start tracing
- endmqtrc
- to end tracing
- dspmqtrc filename
- to display a formatted trace file
- One file for each entity being traced, in which trace information is recorded
- One additional file on each machine, to provide a reference for the shared memory used to start and end tracing
- One file to identify the semaphore used when updating the shared memory
Files associated with trace are created in a fixed location in the file tree, which is
/var/mqm/trace
.
All client tracing takes place to files in this directory.
You can handle large trace files by mounting a temporary file system over this directory.
On AIX® you can use AIX system trace in addition to using the strmqtrc and endmqtrc commands. For more information, see Tracing with the AIX system trace.
Trace files on IBM MQ for UNIX and Linux systems
Trace files are created in the directory /var/mqm/trace.
/var/mqm/trace
to a different directory. - 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.
- 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, you 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. You cannot format SSL trace files; send them unchanged to IBM support.
How to start and stop a trace
In IBM MQ for UNIX and Linux systems, you enable or modify tracing using the
strmqtrc control command (see strmqtrc ). To stop tracing, you
use the endmqtrc control command (see endmqtrc ). On IBM MQ for Linux
(x86 and x86-64 platforms) systems, you can alternatively use the IBM MQ Explorer to start and stop tracing. However, you can trace only
everything using the function provided, equivalent to using the commands strmqtrc
-e
and endmqtrc -e
.
dspmqtrc *.TRC
For detailed information about the
control command, dspmqtrc, see dspmqtrc. Selective component tracing on IBM MQ for UNIX and Linux systems
strmqtrc -m QM1 -t ssl
For detailed information about the trace command,
see strmqtrc. Selective component tracing on IBM MQ for AIX
Use the environment variable MQS_TRACE_OPTIONS to activate the high detail and parameter tracing functions individually.Because MQS_TRACE_OPTIONS enables tracing to be active without high detail and parameter tracing functions, you can use it to reduce the effect on performance and trace size when you are trying to reproduce a problem with tracing enabled.
Only set the environment variable MQS_TRACE_OPTIONS if you have been instructed to do so by your service personnel.
Typically MQS_TRACE_OPTIONS must be set in the process that starts the queue manager, and before the queue manager is started, or it is not recognized. Set MQS_TRACE_OPTIONS before tracing starts. If it is set after tracing starts it is not recognized.
Selective process tracing on IBM MQ for UNIX and Linux systems
strmqtrc -p amqxxx
For detailed information about the trace command, see
strmqtrc.