Tracing the New Web Console

The trace facilities in the New Web Console are provided to help IBM staff to diagnose customer problems. Various properties control the behavior of these facilities.


Before starting

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

  • The mqweb.xml file.
  • The contents of the directory that contains the mqweb server definition:

    • MQ_DATA_PATH/web/installations/installationName
    • The directory that was specified when the crtmqweb script ran to create the mqweb server definition. By default, this directory is /var/mqm/web/installation1.


The New Web Console consists of:

  • JavaScript, which runs inside a browser.
  • Back end code, written in Java, which runs inside the mqweb server.

For Continuous Delivery, it is only possible to trace the back end code for the New Web Console. See step 1 for instructions on how you trace the back end code for the New Web Console.

For Long Term Support before Version 9.2.0, Fix Pack 1, it was only possible to trace the back end code for the New Web Console. From Version 9.2.0, Fix Pack 1, we can also trace the JavaScript running inside a browser, as well as the back end code and JavaScript simultaneously. See:

  • Step 1 for instructions on how you trace the back end code for the New Web Console.
  • Step 2 for instructions on how you trace the JavaScript
  • Step 3 for instructions on how you trace the back end code and JavaScript simultaneously.

The browser trace is output only from the browser that it is enabled in. After you log out of the New Web Console, trace is automatically disabled.


Procedure

  1. To enable trace for the back end code that runs in the mqweb server, enter the following command on the command line:
    setmqweb properties -k traceSpec -v "*=info:com.ibm.mq*=all:com.ibm.mq.rest*=all:js.mq*=all"
  2. To trace the New Web Console JavaScript running inside a browser:
    1. Enter the following command on the command line:
      setmqweb properties -k traceSpec -v "*=info:js.mq*=all"
    2. To enable tracing in the IBM MQ web server:
      1. Start the mqweb server.
      2. Bring up a browser, and log into the New Web Console.
      3. Modify the URI that is being used to access the New Web Console, so that it includes the string
        ?trace=true
        as shown in the following example:

      • Original URI: https://localhost:9443/ibmmq/console/#/
      • New URI: https://localhost:9443/ibmmq/console/?trace=true#/

    3. To turn trace off, modify the URI and remove the string:
      ?trace=true

  3. To trace the New Web Console back end code and JavaScript running inside a browser:
    1. Enter the following command on the command line:
      setmqweb properties -k traceSpec -v "*=info:com.ibm.mq*=all:com.ibm.mq.rest*=all:js.mq*=all"
    2. To enable tracing in the IBM MQ web server:
      1. Start the mqweb server.
      2. Bring up a browser, and log into the New Web Console.
      3. Modify the URI that is being used to access the New Web Console, so that it includes the string
        ?trace=true

    3. To turn trace off, modify the URI and remove the string:
      ?trace=true


Results

Trace is output to a set of files. The directory where the trace files are created is:

  • MQ_DATA_PATH/web/installations/installationName/servers/mqweb/log
  • The subdirectory /servers/mqweb/log beneath the directory that was specified when the crtmqweb script ran to create the mqweb server definition. By default, this directory is /var/mqm/web/installation1.

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. By default, the maximum trace file size is 20 MB, and the maximum number of trace files is 2. For more information, see Configure logging.


Example

An example of the trace information generated by the New Web Console JavaScript code running inside a browser is shown in the following text:
[18/08/20 14:34:13:880 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i.componentDidMount"
[18/08/20 14:34:13:880 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i.componentWillUnmount"
[18/08/20 14:34:13:880 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i._getTopicsData"
[18/08/20 14:34:13:880 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i._showCreateTopic"
[18/08/20 14:34:13:880 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i._showDeleteTopic"
[18/08/20 14:34:13:881 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i._showTopicDetails"
[18/08/20 14:34:13:881 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i._showCreateSubscription"
[18/08/20 14:34:13:881 BST] 00000050 trace-patcher 1 js.mq.mq.lib.service.trace-patcher patchFn DATA [18/08/20 14:34:10:472 BST] User:[mqadmin] (@static) "Patching -> i.render"
Parent topic: Use trace


Related information