Tracing the telemetry (MQXR) service

Follow these instructions to start a trace of the telemetry service, set the parameters that control the trace, and find the trace output.


Before you begin

Tracing is a support function. Follow these instructions if an IBM® service engineer asks you to trace your telemetry (MQXR) service. The product documentation does not document the format of the trace file, or how to use it to debug a client.


We can use the IBM MQ strmqtrc and endmqtrc commands to start and stop IBM MQ trace. strmqtrc captures trace for the telemetry (MQXR) service. When using strmqtrc, there is a delay of up to a couple of seconds before the telemetry service trace is started. For further information about IBM MQ trace, see Tracing. Alternatively, we can trace the telemetry service by using the following procedure:


Procedure

  1. Set the trace options to control the amount of detail and the size of the trace. The options apply to a trace started with either the strmqtrc or the controlMQXRChannel command.

    Set the trace options in the following files:

    • mqxrtraceOn.properties
    • trace.config

    The files are in the following directory:

    • On Windows: IBM MQ data directory\qmgrs\qMgrName\mqxr.
    • On AIX or Linux : var/mqm/qmgrs/qMgrName/mqxr.
  2. Open a command window in the following directory:

    • On Windows: IBM MQ installation directory\mqxr\bin.
    • On AIX or Linux: /opt/mqm/mqxr/bin.
  3. Run the following command to start an SYSTEM.MQXR.SERVICE trace:


    Starting an SYSTEM.MQXR.SERVICE trace

    ./controlMQXRChannel.shcontrolMQXRChannel.bat
  4. -qmgr= qMgrName -mode= starttracestoptrace
  5. -clientid=ClientIdentifier
    • Mandatory parameters

        qmgr=qmgrName
        Set qmgrName to the queue manager name
        mode=starttrace|stoptrace
        Set starttrace to begin tracing or to stoptrace to end tracing

      Optional parameters

        clientid=ClientIdentifier
        Set ClientIdentifier to the ClientIdentifier of a client. clientid filters trace to a single client. Run the trace command multiple times to trace multiple clients.

    For example:

    /opt/mqm/mqxr/bin/controlMQXRChannel.sh -qmgr=QM1 -mode=starttrace -clientid= 
    problemclient
    


Results

To view the trace output, go to the following directory:

  • On Windows: IBM MQ data directory\trace.
  • On AIX or Linux: /var/mqm/trace.

Trace files are named mqxr_PPPPP.trc, where PPPPP is the process ID.