strmqtrc (Start trace)
Start trace at a specified level of detail, or report the level of tracing in effect.
Purpose
You can use the strmqtrc command to enable tracing. You can specify the
tracing that you want:
- You can trace one or more queue managers.
- You can trace one or more processes. The processes can be either part of the product or customer applications that use the IBM® MQ API.
- You can trace specific threads within customer applications, either by thread number or by operating system thread number.
- You can trace events. These events can be either the entry or exit from internal functions or the occurrence of a first failure data capture (FDC).
- You can choose from different levels of trace detail.
Syntax
Parameters
- -m QMgrName
- Specifies the name of the queue manager to trace.
- -e
- Specifies that any process that belongs to any component of any queue manager traces its early processing.
- -t TraceType -t TraceLevel
- Specifies the points to trace and the amount of trace detail to record.
- -x TraceType
- Specifies the points to exclude from trace.
- -l MaxSize
- Specifies the maximum size of a trace file in megabytes (MB).
- -d 0
- Specifies that no user data is traced.
- -d -1
- Specifies that all user data is traced.
- -d NumOfBytes
- Specifies the number of bytes of data to trace.
- -i PidTids
- Specifies the process identifier (PID) and thread identifier (TID) to which the trace generation is restricted.
- -p Apps
- Specifies the named processes to which the trace generation is restricted.
- -s
- Specifies that the tracing options that are currently in effect are reported.
- -b Start_Trigger
- Specifies the FDC probe IDs for which tracing must be turned on.
- -c Stop_Trigger
- Specifies the FDC probe IDs for which tracing must be turned off, or interval in seconds after which tracing must be turned off.
- -w
- Allow any application to trigger trace.
Usage notes
- This command must be run from the IBM MQ administration mode. If the system is in the IBM MQ administration mode the prompt includes
mqa(mqcli)#. To enter the IBM MQ administration mode, entermqclion the command line. To exit the IBM MQ administration mode, enterexiton the command line. - Each combination of parameters on an individual invocation of the command are interpreted as having a logical AND between them. You can start the command multiple times, regardless of whether tracing is already enabled. If tracing is already enabled, the trace options that are in effect are modified to those options specified on the most recent invocation of the command.
- Multiple invocations of the command, without an intervening enqmqtrc command, are interpreted as having a logical OR between them. The maximum number of concurrent strmqtrc commands that can be in effect at one time is 16.
- When a trace file reaches the specified maximum, it is renamed to
AMQppppp.qq.TRSand a newAMQppppp.qq.TRCfile is started. If a previous copy of anAMQppppp.qq.TRSfile exists, it is deleted. - For more information about this command in IBM MQ, see strmqtrc in the IBM MQ documentation.
Examples
- The following command enables tracing of processing flow from common services and the local
queue manager for a queue manager called
exampleQM. Trace data is generated at the default level of detail.strmqtrc -m exampleQM -t csflows -t lqmflows -t parms - The following command disables tracing of SSL activity on a queue manager called
exampleQM. Other trace data is generated at theparmslevel of detail.strmqtrc -m exampleQM -x ssl -t parms - The following command enables high-detail tracing of the processing flow for all components:
strmqtrc -t all -t detail - The following command enables tracing when FDC KN34650 occurs, and stops tracing when FDC
KN346080 occurs. In both cases the FDC must occur on a process that is using queue manager
exampleQM:strmqtrc -m exampleQM -b FDC=KN346050 -c FDC=KN346080
The next examples use the -p and -m flags to show how a combination of parameters on an
individual invocation of the command are interpreted as having a logical AND between them. The
examples also show how multiple invocations of the command, without an intervening mq
enqmqtrc command, are interpreted as having a logical OR between them:
- The following command enables tracing for all threads that result from any executing process
that is called amqxxx.exe:
strmqtrc -p amqxxx.exe -
- If you start the following command after the command in step 1, without an intervening
endmqtrc command, then tracing is limited to all threads that result from any
running process that is called amqxxx.exe and that are using queue manager
exampleQM2:strmqtrc -p amqxxx.exe -m exampleQM2 - If you start the following command after the command in step 1, without an intervening
endmqtrc command, then tracing is limited to all processes and threads that
result from running amqxxx.exe or that are using queue manager
exampleQM2:strmqtrc -m exampleQM2
- If you start the following command after the command in step 1, without an intervening
endmqtrc command, then tracing is limited to all threads that result from any
running process that is called amqxxx.exe and that are using queue manager
