Tracing the telemetry (MQXR) service

The trace facility provided by the IBM® MQ telemetry (MQXR) service is provided to help IBM Support diagnose customer issues related to the service.

About this task

There are two ways to control trace for the IBM MQ telemetry service:
  • By using the strmqtrc and endmqtrc commands to start and stop trace. Enabling trace, using the strmqtrc command, generates trace information for the entire queue manager where the IBM MQ telemetry service is running. This includes the IBM MQ telemetry service itself, and the underlying Java Message Queuing Interface (JMQI) that the service uses to communicate with other queue manager components.
  • By running the controlMQXRChannel command. Note, that turning trace on using the controlMQXRChannel command traces only the IBM MQ telemetry service.

If you are unsure which option to use, contact your IBM Support representative and they will be able to advise you on the best way to collect trace for the issue that you are seeing.

Procedure

  1. Method one
    1. Bring up a command prompt and navigate to the directory:
      MQ_INSTALLATION_PATH\bin
    2. Run the strmqtrc command to enable trace.
      strmqtrc -m qmgr_name
      where qmgr_name is the name of the queue manager where the IBM MQ MQXR service is running.
    3. Reproduce the issue.
    4. Stop trace, by running the command:
      endmqtrc -m qmgr_name
  2. Method two.
    1. Bring up a command prompt and navigate to the directory:
      MQ_INSTALLATION_PATH\mqxr\bin
    2. Run the following command to enable trace:
      • [Windows]
        controlMQXRChannel -qmgr=qmgr_name -mode=starttrace [clientid=ClientIdentifier]
      • [UNIX][Linux]
        ./controlMQXRChannel.sh -qmgr=qmgr_name -mode=starttrace [clientid=ClientIdentifier]
      where qmgr_name is the name of the queue manager where the MQXR Service is running.
      Set ClientIdentifier to the client identifier of an MQTT client. If you specify the clientid parameter, the IBM MQ telemetry service trace captures activity for only the MQTT client with that client identifier.

      If you want to trace the IBM MQ telemetry service activity for more than one specific MQTT client, you can run the command multiple times, specifying a different client identifier each time.

    3. Reproduce the issue.
    4. When the issue occurs, stop trace by running the following command:
      • [Windows]
        controlMQXRChannel -qmgr=qmgr_name -mode=stoptrace
      • [UNIX][Linux]
        ./controlMQXRChannel.sh -qmgr=qmgr_name -mode=stoptrace [clientid=ClientIdentifier]
      where qmgr_name is the name of the queue manager where the MQXR Service is running.

Results

To view the trace output, go to the following directory:
  • [Windows]MQ_DATA_PATH\trace.
  • [UNIX][Linux]/var/mqm/trace.

The trace files containing the information from the MQXR service are called mqxr_N.trc, where N is a number.

Trace information generated by the JMQI is written to a trace file called mqxr_PPPPP.trc, where PPPPP is the process identifier for the MQXR Service.