Home

 

strmqtrc (Start trace)

 

 

Purpose

Use the strmqtrc command to enable tracing. This command can be run regardless of whether tracing is enabled. If tracing is already enabled, the trace options in effect are modified to those specified on the latest invocation of the command.

 

Syntax

The syntax of this command in WebSphere MQ for UNIX systems is as follows:


>>-strmqtrc--+----------------+--+------+----------------------->     '- -m --QMgrName-' '- -e -'       .---------------------.        V |     >----+-----------------+-+--+-----------------+----------------->     '- -t --TraceType-' '- -x --TraceType-'    >--+---------------+--+---------------------+------------------><    '- -l --MaxSize-' '- –d--+-0----------+-'        +- -1--------+         '-NumOfBytes-'    

The syntax of this command in WebSphere MQ for Windows is as follows:


    .---------------------.         V |     >>-strmqtrc----+-----------------+-+--+-----------------+------->     '- -t --TraceType-' '- -x --TraceType-'    >--+---------------+--+---------------------+------------------><    '- -l --MaxSize-' '- –d--+-0----------+-'        +- -1--------+         '-NumOfBytes-'    

 

Description

We can request different levels of trace detail. For each tracetype value you specify, including -t all, specify either -t parms or -t detail to obtain the appropriate level of trace detail. If you do not specify either -t parms or -t detail for any particular trace type, only a default-detail trace is generated for that trace type.

We can use the -x flag with tracetype values to exclude those entry points you do not want to record. This is useful in reducing the amount of trace produced.

In WebSphere MQ for Windows, the output file is created in the \<mqmwork>\trace directory, where <mqmwork> is the directory selected to hold WebSphere MQ data files.

In WebSphere MQ for AIX, HP-UX, Solaris, and Linux, the output file is always created in the directory /var/mqm/trace.

For examples of trace data generated by this command see Tracing.

 

Optional parameters

-m QMgrName

The name of the queue manager to trace.

A queue manager name and the -m flag can be specified on the same command as the -e flag. If more than one trace specification applies to a given entity being traced, the actual trace includes all the specified options.

It is an error to omit the -m flag and queue manager name, unless you specify the -e flag.

This parameter is not valid in WebSphere MQ for Windows.

-e

Requests early tracing, making it possible to trace the creation or startup of a queue manager. If you include this flag, any process belonging to any component of any queue manager traces its early processing. The default is not to perform early tracing.

This parameter is not valid in WebSphere MQ for Windows.

-t TraceType

The points to trace and the amount of trace detail to record. By default all trace points are enabled and a default-detail trace is generated.

Alternatively, we can supply one or more of the options in the following list.

If you supply multiple trace types, each must have its own -t flag. We can include any number of -t flags, provided that each has a valid trace type associated with it.

It is not an error to specify the same trace type on multiple -t flags.

  all Output data for every trace point in the system (the default). The all parameter activates tracing at default detail level.
  api Output data for trace points associated with the MQI and major queue manager components.
  commentary Output data for trace points associated with comments in the WebSphere MQ components.
  comms Output data for trace points associated with data flowing over communications networks.
  csdata Output data for trace points associated with internal data buffers in common services.
  csflows Output data for trace points associated with processing flow in common services.
  detail Activate tracing at high-detail level for flow processing trace points.
  Explorer Output data for trace points associated with the WebSphere MQ Explorer.
  lqmdata Output data for trace points associated with internal data buffers in the local queue manager.
  lqmflows Output data for trace points associated with processing flow in the local queue manager.
  otherdata Output data for trace points associated with internal data buffers in other components.
  otherflows Output data for trace points associated with processing flow in other components.
  parms Activate tracing at default-detail level for flow processing trace points.
  remotedata Output data for trace points associated with internal data buffers in the communications component.
  remoteflows Output data for trace points associated with processing flow in the communications component.
  servicedata Output data for trace points associated with internal data buffers in the service component.
  serviceflows Output data for trace points associated with processing flow in the service component.
  soap Output data for trace points associated with WebSphere MQ Transport for SOAP.
  ssl Output data associated with using GSKit to enable Secure Sockets Layer (SSL) channel security.
  versiondata Output data for trace points associated with the version of WebSphere MQ running.

-x TraceType

The points not to trace. By default all trace points are enabled and a default-detail trace is generated. The trace points we can specify are those listed for the -t flag.

If you supply multiple trace types, each must have its own -x flag. We can include any number of -x flags, provided that each has a valid trace type associated with it.

-l MaxSize

The maximum size of a trace file (AMQppppp.qq.TRC) in millions of bytes. For example, if you specify a MaxSize of 1, the size of the trace is limited to 1 MB.

When a trace file reaches the specified maximum, it is renamed to AMQppppp.qq.TRS and a new AMQppppp.qq.TRC file is started. If a previous copy of an AMQppppp.qq.TRS file exists, it is deleted.

The highest value that MaxSize can be set to is 2048 MB.

-d 0

Trace no user data.

-d -1

Trace all user data.

-d NumOfBytes

  • For a communication trace; trace the specified number of bytes of data including the transmission segment header (TSH).

  • For an MQPUT or MQGET call; trace the specified number of bytes of message data held in the message buffer.

 

Return codes

AMQ7024 Non-valid arguments supplied to the command.
AMQ8304 Nine concurrent traces (the maximum) already running.

 

Examples

This command enables tracing of processing flow from common services and the local queue manager for a queue manager called QM1 in WebSphere MQ for UNIX systems. Trace data is generated at the default level of detail.

strmqtrc -m QM1 -t csflows -t lqmflows -t parms

This command disables tracing of SSL activity on a queue manager called QM1 in WebSphere MQ for UNIX systems. Other trace data is generated at the parms level of detail.

strmqtrc -m QM1 -x ssl -t parms

This command enables high-detail tracing of the processing flow for all components in WebSphere MQ for Windows:

strmqtrc -t all -t detail

 

Related commands

dspmqtrc Display formatted trace output
endmqtrc End trace

 

Parent topic:

The control commands


fa16100_


 

Home