+

Search Tips | Advanced Search

Tracing the IBM MQ Console and REST API

The trace facilities in the IBM MQ Console and REST API are provided to help IBM staff to diagnose customer problems. Various properties control the behavior of these facilities.

The IBM MQ Console and REST API consist of three functional areas, each with their own trace mechanisms:


Enabling trace for the IBM MQ Console JavaScript code that runs in the browser

This trace is output only from the browser that it is enabled in. After you log out of the IBM MQ Console, trace is automatically disabled.

To enable trace for the IBM MQ Console JavaScript code that runs in the browser:
  1. Log on to the IBM MQ Console
  2. Click the dashboard menu icon, and select Diagnostics.
  3. Select Enable for the IBM MQ Console browser trace, and click OK.
  4. Follow the steps that are outlined to enable trace for the IBM MQ Console and REST API code running in the mqweb server.

Actions that are performed in your browser then start to be traced. This trace is periodically sent to the IBM MQ Console code that runs in the mqweb server, and is output in the mqweb server trace logs.


Enabling trace for the IBM MQ Console and REST API code that runs in the mqweb server

  1. Locate the mqwebuser.xml file in one of the following directories:

    • MQ_DATA_DIRECTORY/web/installations/installationName/servers/mqweb
    • WLP_user_directory/servers/mqweb

      Where WLP_user_directory is the directory that was specified when the crtmqweb.sh script ran to create the mqweb server definition.

  2. Add the following XML to the mqwebuser.xml file, between the server tags:

    <variable name="traceSpec" value="*=info:com.ibm.mq*=all:com.ibm.mq.rest*=all:js.mq*=all" />

    If the traceSpec variable exists in the mqwebuser.xml file, add the value attributes to the variable. Separate each value attribute with a colon.

If the mqweb server is running, trace is immediately enabled.

Trace is output to a set of files. The active file is called trace.log. Historical trace is kept in files that are called trace_timestamp.log. The size of these trace files, and the number of historical files that are kept can be configured by setting the maxTraceFileSize and maxTraceFiles variables. For more information, see Configure logging.


Enabling trace for the IBM MQ Classes for JMS code that runs in the mqweb server

  1. Create a file called jmstrace.config in one of the following directories:

    • MQ_DATA_DIRECTORY/web/installations/installationName/servers/mqweb
    • WLP_user_directory/servers/mqweb

      Where WLP_user_directory is the directory that was specified when the crtmqweb.sh script ran to create the mqweb server definition.

  2. Add the following lines to the jmstrace.config file:
    com.ibm.msg.client.commonservices.trace.outputName=PATH/logs/jmstrace.txt
    com.ibm.msg.client.commonservices.trace.limit=104857600
    com.ibm.msg.client.commonservices.trace.count=10
    com.ibm.msg.client.commonservices.trace.status=ON

    Where PATH specifies the full path to the directory where you want the jmstrace.txt file to be written.

    These lines set the maximum trace file size to 100 MB, and set the maximum number of trace files to 10. Ensure that we have disk space available for these files.

  3. In the same directory as the jmstrace.config file, open or create the jvm.options file.
  4. Add the following lines to the jvm.options file:
    -Dcom.ibm.msg.client.commonservices.trace.startup=TRUE
    -Dcom.ibm.msg.client.config.location=CONFIG_PATH/jmstrace.config

    Where CONFIG_PATH specifies the full path to the directory where the jmstrace.config file is located, as a URL. For example, file:c:/ProgramData/IBM/MQ/web/installations/Installation2/servers/mqweb/.

  5. Restart the mqweb server by using the endmqweb and strmqweb commands on the command line.


Information to provide to IBM Service

Include the following files and directories when you gather diagnostic information for IBM Service: