[UNIX, Linux, Windows, IBM i]

Collecting troubleshooting information manually

In some cases, you might need to collect troubleshooting information manually, for example if you are running an older version of IBM® MQ or cannot use the runmqras command to collect troubleshooting information automatically.

About this task

If you need to collect troubleshooting information for a support case, you should in most cases use the runmqras tool, which automates the task of collecting troubleshooting information, rather than collecting this information manually.

These manual instructions are provided for you to use if you are unable to use the runmqras tool to collect the information automatically, for example if you are running an older version of IBM MQ or cannot use runmqras for any other reason.

Tip: Consider cleaning up IBM MQ files before packaging data in order to reduce the size the data and speed up its transfer to IBM. For more information, see Cleaning up IBM MQ files.

Procedure

  1. If your system has more than one IBM MQ installation, use the setmqenv command to choose the installation with the problem before proceeding:
    • [UNIX][Linux]On UNIX and Linux®:
      sh> . /path/to/mqm/bin/setmqenv -n InstallationX
    • [Windows]On Windows:
      C:\> "C:\Program Files\IBM\MQ\bin\setmqenv" -n InstallationX 
  2. Record the IBM MQ version and maintenance level.
    You can use the dspmqver command to display these details. For more information, see Displaying the IBM MQ version. If you are collecting troubleshooting information for an AMS, channel, data conversion, dead-letter queue, error message and FFST, security, or TLS channel problem, record the version and maintenance level on both sides of the channel. Alternatively, collect the IBM MQ data manually on both sides of the channel.
  3. Record the Operating System version and maintenance level.
    If you are collecting troubleshooting information for an AMS, channel, data conversion, dead-letter queue, error message and FFST, security, or TLS channel problem, record this information for both sides of the channel.
  4. If you are collecting troubleshooting information for an AMS, channel, data conversion, dead-letter queue, error message and FFST, security, or TLS channel problem, record the IP addresses and hostnames of the systems on both sides of the channel.
  5. Save the IBM MQ configuration information, for example, registry keys and .ini files.
  6. If your system has more than one IBM MQ installation, use the dspmqinst command to record your IBM MQ installation details:
    • [UNIX][Linux]On UNIX and Linux:
      sh> dspmqinst > /tmp/dspmqinst.txt 
    • [Windows]On Windows:
      C:\>dspmqinst > %TEMP%/dspmqinst.txt
  7. On IBM MQ server installations, use the dspmq command to record the status of your queue managers.
    This step does not apply to hang and high cpu, publish/subscribe, or triggering problems.
    • [UNIX][Linux]On UNIX and Linux:
      sh> dspmq -a > /tmp/dspmq.txt
    • [Windows]On Windows:
      C:\> dspmq -a > %TEMP%/dspmq.txt
    • [IBM i]On IBM i (command line):
      ===> WRKMQM
    • [IBM i]On IBM i (Qshell):
      ===> /QSYS.LIB/QMQM.LIB/DSPMQ.PGM -a > /tmp/dspmq.txt
  8. On IBM MQ server installations, record the IBM MQ processes that are active on your system.
    This step does not apply to triggering problems.
    • [UNIX][Linux]On UNIX and Linux:
      sh> ps -ef | grep mq > /tmp/ps.txt
    • [Windows]On Windows:
      C:\> TASKLIST /V > %TEMP%/tasklist.txt
    • [IBM i]On IBM i (command line):
      ===> WRKACTJOB SBS(QMQM)
    • [IBM i]On IBM i (Qshell):
      ===> ps -ef | grep mq > /tmp/ps.txt
  9. [UNIX, Linux, Windows]For a logging or recovery problem only, collect the following troubleshooting information:
    1. [UNIX, Linux, Windows]On UNIX, Linux, and Windows, list the contents of the queue manager LogPath directory.
      For example:
      • [UNIX][Linux]On UNIX and Linux:
        sh> ls -ltR /var/mqm/log/QMA > /tmp/QMA.logfiles.txt
      • [Windows]On Windows:
        C:\> DIR /s "C:\ProgramData\IBM\MQ\log\QMA" > %TEMP%/QMA.logfiles.txt
    2. [UNIX, Linux, Windows]On UNIX, Linux, and Windows, make sure that the file system or disk holding the logs is not full.
      For example:
      • [UNIX][Linux]On UNIX and Linux:
        sh> df -k > /tmp/filesystems.txt
      • [Windows]On Windows:
        C:\> DIR C: > %TEMPT/diskuage.txt
    3. [UNIX, Linux, Windows]On UNIX, Linux, and Windows, run the amqldmpa program against the queue manager to gather details about the logger.
      The command must be run by an IBM MQ administrator and the output file should be in a location to which the queue manager has permission to write. For example:
      • [UNIX][Linux]On UNIX and Linux:
        sh> amqldmpa -m QMA -c H -d 8 -f /tmp/QMA.amqldmpa.logger.txt
      • [Windows]On Windows:
        C:\> amqldmpa -m QMA -c H -d 8 -f %TEMP%\QMA.amqldmpa.logger.txt
    4. On all systems, run the amqldmpa program against the queue manager to gather details about the persistence layer.
      The command must be run by an IBM MQ administrator and the output file should be in a location to which the queue manager has permission to write. For example:
      • [UNIX][Linux]On UNIX and Linux:
        sh> amqldmpa -m QMA -c A -d 8 -f /tmp/QMA.amqldmpa.dap.txt
      • [Windows]On Windows:
        C:\> amqldmpa -m QMA -c A -d 8 -f %TEMP%\QMA.amqldmpa.dap.txt
      • [IBM i]On IBM i (Qshell):
        ===> /QSYS.LIB/QMQM.LIB/AMQLDMPA.PGM -m QMA -c A -d 8 -f /tmp/QMA.amqldmpa.dap.txt
    5. [UNIX, Linux, Windows]On UNIX, Linux, and Windows, collect the log file header, amqhlctl.lfh, which is found in the active subdirectory of the queue manager's LogPath.
      For example:
      • [UNIX][Linux]On UNIX and Linux:
        /var/mqm/log/QMA/active/amqhlctl.lfh
      • [Windows]On Windows:
        C:\ProgramData\IBM\MQ\Log\QMA\active\amqhlctl.lfh
    6. [IBM i]On IBM i, find the Library attribute from the queue manager's qm.ini file and display its contents. For more information about the queue manager library, see Object names on IBM i.
      Alternatively, display the library QM* and select your queue manager from the list to display its contents.
      • To display the library for a given queue manager, for example QMA:
        ===> WRKLIB LIB(QMQMA)
      • To display the library for all queue managers:
        ===> WRKLIB LIB(QM*)
    7. [IBM i]On IBM i, use the same Library value to work with the queue manager's journals.
      Save the output, then use F17 to display attached journal receivers and save the output from those screens as well. For example, to display the journals and journal receivers for queue manager QMA:
      ===> WRKJRNA JRN(QMQMA/AMQAJRN)
  10. On IBM MQ server installations, use the dmpmqcfg command to record the queue manager configuration:
    This step does not apply to logging or recovery problems.
    • [UNIX][Linux]On UNIX and Linux:
      sh> dmpmqcfg -m QMA >/tmp/QMA.config.txt 
    • [Windows]On Windows:
      C:\> dmpmqcfg -mQMA>%TEMP%\QMA.config.txt
    • [IBM i]On IBM i (Qshell):
      ===> /QSYS.LIB/QMQM.LIB/DMPMQCFG.PGM -mQMA > /tmp/QMA.config.txt
  11. On IBM MQ server installations, use the runmqsc command to record status information from the queue manager. For more information, see Saving IBM MQ MQSC output.
    This step does not apply to logging or recovery problems.
    If any command returns an error, carry on with the others:
    DISPLAY PUBSUB ALL
    DISPLAY QMSTATUS ALL
    DISPLAY CHSTATUS(*) ALL
    DISPLAY LSSTATUS(*) ALL
    DISPLAY SVSTATUS(*) ALL
    DISPLAY SBSTATUS(*) ALL
    DISPLAY CONN(*) TYPE(*) ALL
    DISPLAY QSTATUS(*) TYPE(QUEUE) ALL
    DISPLAY QSTATUS(*) TYPE(HANDLE) ALL
    DISPLAY TPSTATUS('#') TYPE(PUB) ALL
    DISPLAY TPSTATUS('#') TYPE(SUB) ALL
    DISPLAY TPSTATUS('#') TYPE(TOPIC) ALL 
  12. For an IBM MQ clustering or hang and high CPU problem only, record information about the cluster objects known to the queue manager.
    For an IBM MQ clustering problem, also dump the contents of the cluster repository cache.
    1. Use the runmqsc command to record information about cluster objects known to the queue manager.
      If any command returns an error, carry on with the others:
      DISPLAY CLUSQMGR(*) ALL
      DISPLAY QCLUSTER(*) ALL
      DISPLAY TCLUSTER(*) ALL
    2. Dump the contents of the cluster repository cache using the amqrfdm utility.
      Be sure to use the correct input file for your platform. For example:
      • [UNIX][Linux]To dump the cluster repository cache for queue manager QMA on UNIX and Linux:
        sh> amqrfdm -m QMA < cluster-unix.txt > /tmp/QMA.cluster.txt
      • [Windows]To dump the cluster repository cache for queue manager QMA on Windows:
        C:\> amqrfdm -m QMA < %TEMP%\cluster-win.txt > %TEMP%\QMA.cluster.txt
      • [IBM i]To dump the cluster repository cache for queue manager QMA on IBM i (Qshell):
        ===> /QSYS.LIB/QMQM.LIB/AMQRFDM.PGM -m QMA < cluster-IBMi.txt > /tmp/QMA.cluster.txt
  13. For problems with publish/subscribe only, complete the following steps:
    1. On all systems, run the amqldmpa program against the queue manager to gather details about the topics.
      The command must be run by an IBM MQ administrator and the output file should be in a location to which the queue manager has permission to write. For example:
      • [UNIX][Linux]On UNIX and Linux:
        sh> amqldmpa -m QMA -c T -d 8 -f /tmp/QMA.amqldmpa.topic.txt
      • [Windows]On Windows:
        C:\> amqldmpa -m QMA -c T -d 8 -f %TEMP%\QMA.amqldmpa.topic.txt
      • [IBM i]On IBM i (Qshell):
        ===> /QSYS.LIB/QMQM.LIB/AMQLDMPA.PGM -m QMA -c T -d 8 -f /tmp/QMA.amqldmpa.topic.txt
    2. If your system has queued publish/subscribe enabled, browse the publish subscribe system queues by using a program like the amqsbcg sample.
      For example:
      amqsbcg SYSTEM.PENDING.DATA.QUEUE QMA > QMA.PENDING.DATA.browse.txt
      amqsbcg SYSTEM.JMS.ND.SUBSCRIBER.QUEUE QMA > QMA.JMS.ND.SUB.browse.txt
      amqsbcg SYSTEM.JMS.ND.CC.SUBSCRIBER.QUEUE QMA > QMA.JMS.ND.CC.SUB.browse.txt
      amqsbcg SYSTEM.JMS.D.SUBSCRIBER.QUEUE QMA > QMA.JMS.D.SUB.browse.txt
      amqsbcg SYSTEM.JMS.D.CC.SUBSCRIBER.QUEUE QMA > QMA.JMS.D.CC.SUB.browse.txt
  14. For a problem where a channel or client application is having difficulty connecting, use your operating system tools to list network connections on both sides immediately before and after the connection attempt.
    This step applies to collecting troubleshooting information for the following types of problem: AMS, channel, client application, data conversion, dead-letter queue, error message and FFST, Java and JMS, security, or TLS channel.
    • [UNIX][Linux]To display network connections on UNIX and Linux:
      sh> netstat -an
    • [Windows]To display network connections on Windows:
      C:\>NETSTAT -AN
    • [IBM i]To display IPv4 and IPv6 network connections at the IBM i command line:
      ===> NETSTAT OPTION(*CNN) 
      ===> NETSTAT OPTION(*CNN6) 
  15. Manually package your files for IBM: