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
- If your system has more than one IBM MQ
installation, use the setmqenv command to choose the installation with the problem before
proceeding:
![[UNIX]](ngunix.gif)
On UNIX and Linux®:sh> . /path/to/mqm/bin/setmqenv -n InstallationX
On Windows:C:\> "C:\Program Files\IBM\MQ\bin\setmqenv" -n InstallationX
- 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.
- 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.
- 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.
- Save the IBM MQ configuration information, for example, registry keys and .ini files.
- If your system has more than one IBM MQ
installation, use the dspmqinst command to record your IBM MQ installation details:
![[UNIX]](ngunix.gif)
On UNIX and Linux:sh> dspmqinst > /tmp/dspmqinst.txt
On Windows:C:\>dspmqinst > %TEMP%/dspmqinst.txt
- On IBM MQ server installations, use the dspmq command
to record the status of your queue managers.
![[UNIX]](ngunix.gif)
On UNIX and Linux:sh> dspmq -a > /tmp/dspmq.txt
On Windows:C:\> dspmq -a > %TEMP%/dspmq.txt
On IBM i (command
line):===> WRKMQM
On IBM i
(Qshell):===> /QSYS.LIB/QMQM.LIB/DSPMQ.PGM -a > /tmp/dspmq.txt
- 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]](ngunix.gif)
On UNIX and Linux:sh> ps -ef | grep mq > /tmp/ps.txt
On Windows:C:\> TASKLIST /V > %TEMP%/tasklist.txt
On IBM i (command
line):===> WRKACTJOB SBS(QMQM)
On IBM i
(Qshell):===> ps -ef | grep mq > /tmp/ps.txt
For a logging or recovery
problem only, collect the following troubleshooting information:
On UNIX, Linux, and Windows, list the
contents of the queue manager LogPath directory. For example:![[UNIX]](ngunix.gif)
On UNIX and Linux:sh> ls -ltR /var/mqm/log/QMA > /tmp/QMA.logfiles.txt
On Windows:C:\> DIR /s "C:\ProgramData\IBM\MQ\log\QMA" > %TEMP%/QMA.logfiles.txt
On UNIX, Linux, and Windows, make sure that
the file system or disk holding the logs is not full. For example:![[UNIX]](ngunix.gif)
On UNIX and Linux:sh> df -k > /tmp/filesystems.txt
On Windows:C:\> DIR C: > %TEMPT/diskuage.txt
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]](ngunix.gif)
On UNIX and Linux:sh> amqldmpa -m QMA -c H -d 8 -f /tmp/QMA.amqldmpa.logger.txt
On Windows:C:\> amqldmpa -m QMA -c H -d 8 -f %TEMP%\QMA.amqldmpa.logger.txt
- 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]](ngunix.gif)
On UNIX and Linux:sh> amqldmpa -m QMA -c A -d 8 -f /tmp/QMA.amqldmpa.dap.txt
On Windows:C:\> amqldmpa -m QMA -c A -d 8 -f %TEMP%\QMA.amqldmpa.dap.txt
On IBM i
(Qshell):===> /QSYS.LIB/QMQM.LIB/AMQLDMPA.PGM -m QMA -c A -d 8 -f /tmp/QMA.amqldmpa.dap.txt
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]](ngunix.gif)
On UNIX and Linux:/var/mqm/log/QMA/active/amqhlctl.lfh
On Windows:C:\ProgramData\IBM\MQ\Log\QMA\active\amqhlctl.lfh
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 libraryQM*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*)
- To display the library for a given queue manager, for example
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)
- 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]](ngunix.gif)
On UNIX and Linux:sh> dmpmqcfg -m QMA >/tmp/QMA.config.txt
On Windows:C:\> dmpmqcfg -mQMA>%TEMP%\QMA.config.txt
On IBM i
(Qshell):===> /QSYS.LIB/QMQM.LIB/DMPMQCFG.PGM -mQMA > /tmp/QMA.config.txt
- 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 - 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.
- 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 - 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]](ngunix.gif)
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
To dump the cluster repository cache for queue manager QMA on Windows:C:\> amqrfdm -m QMA < %TEMP%\cluster-win.txt > %TEMP%\QMA.cluster.txt
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
- Use the runmqsc command to record information about cluster objects known to the
queue manager.
- For problems with publish/subscribe only,
complete the following steps:
- 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]](ngunix.gif)
On UNIX and Linux:sh> amqldmpa -m QMA -c T -d 8 -f /tmp/QMA.amqldmpa.topic.txt
On Windows:C:\> amqldmpa -m QMA -c T -d 8 -f %TEMP%\QMA.amqldmpa.topic.txt
On IBM i
(Qshell):===> /QSYS.LIB/QMQM.LIB/AMQLDMPA.PGM -m QMA -c T -d 8 -f /tmp/QMA.amqldmpa.topic.txt
- 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
- On all systems, run the amqldmpa program against the queue manager
to gather details about the topics.
- 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]](ngunix.gif)
To display network connections on UNIX and Linux:sh> netstat -an
To display network connections on Windows:C:\>NETSTAT -AN
To display IPv4 and IPv6 network connections at the IBM i command line:===> NETSTAT OPTION(*CNN) ===> NETSTAT OPTION(*CNN6)
- Manually package your files for IBM: