IBM Support

Generating WebSphere MQ trace on HP NonStop Server

Question & Answer


Question

How do I generate a WebSphere MQ trace on HP NonStop Server systems in order to investigate a problem?

Cause

Traces can capture the root cause of many MQ problems. It is important to limit how long tracing is active in order to avoid affecting performance or generating excessively large trace files and filling up your disk. For other MQ traces and for WebSphere MQ client trace on HP Integrity NonStop Server refer to:





Answer

Generating Traces


  1. Start tracing with the strmqtrc command. The parameters passed to strmqtrc control which processes will generate trace files and what kinds of data they will trace. The strmqtrc command only starts trace for processes running on the same CPU as your OSS shell or TACL session, so be sure to use the run command to start trace on a specific CPU number. The examples below show TACL and OSS syntax:

    1. Starting a default detail trace of queue manager QMA running on CPU 1


      TACL> run /CPU 1/ strmqtrc -m QMA
        or
      oss> run -cpu=1 strmqtrc -m QMA

      Starting an API trace of queue manager QMB running on CPU 2


      TACL> run /CPU 2/ strmqtrc -m QMB -t api
        or
      oss> run -cpu=2 strmqtrc -m QMB -t api

      Starting a high detail trace of everything on CPU 3


      TACL> run /CPU 3/ strmqtrc -e -t all -t detail
        or
      oss> run -cpu=3 strmqtrc -e -t all -t detail


  2. Reproduce the problem while tracing is active, making every attempt to keep the trace as short as possible.


  3. As soon as the problem has occurred, stop tracing immediately! If you wait to stop the trace, the data IBM Support needs may be lost or overwritten. For example:

    1. Stopping all trace on CPU 3


      TACL> run /CPU 3/ endmqtrc -a
        or
      oss> run -cpu=3 endmqtrc -a

      Stopping a trace of queue manager QMA on CPU 1


      TACL> run /CPU 1/ endmqtrc -m QMA
        or
      oss> run -cpu=1 endmqtrc -m QMA


  4. The trace files generated by WebSphere MQ are binary, and must be formatted before they can be read. The binary trace files are named like AMQ*.TRC. In TACL each file in the WebSphere MQ trace directory must be formatted individually, while OSS supports formatting all the files at once:

    1. Formatting WebSphere MQ trace files



      TACL> dspmqtrc -o "/path/to/var/mqm/trace/AMQxxxxx.0.FMT" "/path/to/var/mqm/trace/AMQxxxxx.0.TRC"
      TACL> ...

        or

      oss> cd "$MQNSKVARPATH/trace"
      oss> dspmqtrc AMQ*.TRC


  5. Save a copy of the binary trace files as long as you are working with IBM support, but do not send both binary and formatted traces to IBM. Delete the binary trace files before sending your trace files to IBM.

    1. Deleting WebSphere MQ binary trace files


      oss> cd "$MQNSKVARPATH/trace"
      oss> rm -f AMQ*.TRC



  6. IBM provides the Service Data Collection and Packagaing (sdcp) tool to simplify the task of collecting files from HP NonStop Server systems to send to IBM. If the traces are very large, you may need to use the "-w" option to choose an OSS directory with plenty of free space in which to package your files. If you do not have sdcp, you can tar and compress the files before sending them to IBM:

    1. Using sdcp to collect WebSphere MQ traces and other data


      oss> sdcp -p 12345,67R,890 -m QMA -w /var/bigdata

      Packaging trace files manually


      oss> cd "$MQNSKVARPATH/trace"
      oss> tar -cvf PMR12356,67R,890-mqtrace.tar AMQ*.FMT
      oss> compress PMR12356,67R,890-mqtrace.tar


  7. After sending the formatted traces, clean up the trace directory to reclaim space and also to make sure you are ready to generate new traces in future, if necessary. For example:

    1. Cleaning up the trace directory


      oss> cd "$MQNSKVARPATH/trace"
      oss> rm -f AMQ*.FMT



Additional Information



[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Problem Determination","Platform":[{"code":"PF010","label":"HP-UX"}],"Version":"5.3.1;5.3","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WebSphere MQ WMQ

Document Information

Modified date:
22 June 2018

UID

swg21667375