Question & Answer
Question
How do I package MQ data manually to send it to IBM?
Cause
IBM MQ V8.0, WebSphere MQ V7.5, V7.1.0.1 and later, and V7.0.1.8 and later include a tool called runmqras which automates the task of collecting diagnostic information. In most cases you should use the runmqras tool to collect data rather than doing so manually:
Manual instructions are provided for use with the MQ MustGather documents if you are running an older version of WebSphere MQ or cannot use runmqras for any reason. Consider cleaning up MQ files before packaging data in order to reduce the size the data and speed up its transfer to IBM:
Answer
Linux and UNIX
- Find a directory with enough free space to hold all the MQ data. The contents of the /var/mqm/errors and /var/mqm/trace directories typically make up most of the MQ data, so check the disk usage of those directories against the free space in your file systems using the du (disk usage) and df (display file systems) commands. For example:
Display MQ file usage and free file system space
sh> du -sk /var/mqm/errors /var/mqm/trace
384 /var/mqm/errors
189496 /var/mqm/trace
sh> df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 393216 256536 35% 8641 12% /
/dev/hd2 8257536 1072040 88% 70803 21% /usr
/dev/hd9var 393216 126792 68% 6694 16% /var
/dev/hd3 12582912 12441980 99% 5108 2% /tmp
/dev/hd1 1310720 162560 88% 439 2% /home
/proc - - - - - /proc
/dev/hd10opt 7208960 97180 99% 64796 65% /opt
/dev/fslv00 16777216 15405312 9% 12415 1% /var/mqm
- In the directory you chose, create a new tar file whose name begins with your IBM PMR number and add the contents of the MQ errors directory to it. For example:
Creating a new tar file containing MQ the errors directory
sh> tar -cf /tmp/12345.67R.890-mqdata.tar /var/mqm/errors - Add MQ configuration files to the tar file. Include the mqinst.ini file only if you have installed MQ V7.1 or later on the system:
Adding MQ configuration files
sh> tar -uf /tmp/12345.67R.890-mqdata.tar /var/mqm/mqs.ini /etc/opt/mqm/mqinst.ini - Add the MQ configuration files and error logs for your queue managers. For example:
Adding configuration files and error logs for queue manager QMA
sh> tar -uf /tmp/12345.67R.890-mqdata.tar /var/mqm/qmgrs/QMA/qm.ini /var/mqm/qmgrs/QMA/errors/*.LOG - Add any additional files recommended by the IBM MQ MustGather documents, including files which contain output from MQ and system commands. For example:
Adding additional files
sh> tar -uf /tmp/12345.67R.890-mqdata.tar /tmp/ps.txt /tmp/ipcs.txt /tmp/mqconfig.txt - If you gathered an MQ trace, add the trace files last of all:
Adding MQ trace files
sh> tar -uf /tmp/12345.67R.890-mqdata.tar /var/mqm/trace - Compress the tar file using any available compression tool on your system, for example:
Using compress: creates a .tar.Z file
sh> compress /tmp/12345.67R.890-mqdata.tarUsing gzip: creates a .tar.gz. file
sh> gzip /tmp/12345.67R.890-mqdata.tarUsing bzip2: creates a .tar.bz2 file
sh> bzip2 /tmp/12345.67R.890-mqdata.tar - After sending your data to IBM, back up a copy of your file until your PMR is resolved. Then delete the file from the system to save space.
Deleting the tar file
sh> rm /tmp/12345.67R.890-mqdata.*
Windows
There are a number of third party utilities for creating archives on Windows. Feel free to use one of these if you wish, but be sure to include the PMR number at the beginning of the file name, for example 12345.67R.890-mqdata.zip. The following instructions demonstrate how to package files using only the capabilities of Windows.
- Open the Windows Explorer and navigate to a directory where you will package the MQ files. For example, if you want to do so in your personal temporary directory, you can enter %TEMP% in the Windows Explorer location bar. Right-click in the directory and choose "New > Compressed (zipped) Folder". Include the PMR number at the beginning of the file name, for example 12345.67R.890-mqdata. Windows will automatically add the .zip extension:
- Open a second Windows Explorer window and use it to find the MQ directories and files you wish to include. Most MQ files will be located under a directory identified by the "WorkPath" registry key. To determine this directory, use the amquregn program shipped with MQ and ignore the double backslash characters in the path it returns:
Determining the MQ work path
C:\Program Files\IBM\MQ\bin> amquregn amquregn.ctl | FINDSTR WorkPath
.."WorkPath"="C:\\ProgramData\\IBM\\MQ"
...."WorkPath"="C:\\ProgramData\\IBM\\MQ"
If your system consists of a new installation of IBM MQ V8.0, the WorkPath may point to a directory under C:\ProgramData rather than C:\Program Files (x86). Windows hides the C:\ProgramData directory by default, so you must enter %PROGRAMDATA% in the Windows Explorer location bar to navigate to that directory. Alternatively, you can modify your personal settings in the Control Panel so that the Windows Explorer will show hidden files.
- Add a directory or file by dragging it on top of the new compressed folder. Start by including the top-level MQ errors directory.
- If your system has only MQ V7.1 or later installed, drag the MQ ini files to the compressed folder.
- Drag the MQ configuration files and error logs for your queue managers to the compressed folder.
- Add any additional files recommended by the the IBM MQ MustGather documents, including files which contain output from MQ and system commands.
- If you gathered an MQ trace, add the trace files last of all.
- After sending your data to IBM, back up a copy of your file until your PMR is resolved. Then use the Windows Explorer to delete the file from the system to save space.
IBM i
Run the following commands at the IBM i Command Line to package your MQ files for IBM. Include your IBM PMR number at the beginning of each save file name.
- Create a save file containing the top-level MQ configuration files and errors directory, which may include MQ FFST files, error logs, and JOB files:
Save the top-level configuration and error files
===> CRTSAVF FILE(QGPL/P12345A) TEXT('Top-level files for PMR 12345,67R,890')
===> SAV DEV('/QSYS.LIB/QGPL.LIB/P12345A.FILE') OBJ(('/QIBM/UserData/mqm/*.ini' *INCLUDE) ('/QIBM/UserData/mqm/errors/*' *INCLUDE)) DTACPR(*MEDIUM) - Create a save file which includes the qm.ini file and error logs of any queue managers involved in the problem. For example:
Save the queue manager configuration and error files
===> CRTSAVF FILE(QGPL/P12345B) TEXT('QMB files for PMR 12345,67R,890')
===> SAV DEV('/QSYS.LIB/QGPL.LIB/P12345B.FILE') OBJ(('/QIBM/UserData/mqm/qmgrs/QMB/qm.ini' *INCLUDE) ('/QIBM/UserData/mqm/qmgrs/QMB/errors/*' *INCLUDE))
===> CRTSAVF FILE(QGPL/P12345C) TEXT('QMC files for PMR 12345,67R,890')
===> SAV DEV('/QSYS.LIB/QGPL.LIB/P12345C.FILE') OBJ(('/QIBM/UserData/mqm/qmgrs/QMC/qm.ini' *INCLUDE) ('/QIBM/UserData/mqm/qmgrs/QMC/errors/*' *INCLUDE)) - Create a save file which includes the system history log:
- First, create a data base file:
Create a data base file
===> CRTPF FILE(QGPL/QHIST) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(10000 1000 100) - Display the system history log for the period you want to show. For example:
Display the history log
===> DSPLOG PERIOD(('12:00:00' '05/16/2014') ('23:59:59' '05/30/2014')) OUTPUT(*PRINT) - Work with spool files to find the QPDSPLOG history log information:
Find the history log spool file
===> WRKSPLF - Copy the history log spool file into the data base file. For example:
Copy the history log spool file
===> CPYSPLF FILE(QPDSPLOG) TOFILE(QGPL/QHIST) TOMBR(HISTORY) - Create a save file and save the data base file to it:
Save the history log to a save file
===> CRTSAVF FILE(QGPL/P12345H) TEXT('History log for PMR 12345,67R,890')
===> SAVOBJ OBJ(QHIST) LIB(QGPL) DEV(*SAVF) SAVF(QGPL/P12345H)
- First, create a data base file:
- Create a save file which includes the MQ job logs:
- First, create a data base file:
Create a data base file
===> CRTPF FILE(QGPL/JOBLOGS) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(10000 1000 100) - Work with the QMQM spool files, then press F11 twice to get the job log information (File Nbr, Job, User, and Number, listed in that order on the screen):
Get information on QMQM job logs
===> WRKSPLF SELECT(QMQM) - Copy each job log into the data base file. The JOB parameter for each job log should consist of the values Number/User/Job, while the SPLNBR parameter should contain just the File Nbr value. For example:
Copy the QMQM job logs
===> CPYSPLF FILE(QPJOBLOG) TOFILE(QGPL/JOBLOGS) JOB(135383/QMQM/RUNMQCHL) SPLNBR(1)
===> CPYSPLF FILE(QPJOBLOG) TOFILE(QGPL/JOBLOGS) JOB(135534/QMQM/AMQZXMA0) SPLNBR(1)
... - Create a save file and save the data base file to it. For example:
Save the job logs to a save file
===> CRTSAVF FILE(QGPL/P12345J) TEXT('Job logs for PMR 12345,67R,890')
===> SAVOBJ OBJ(JOBLOGS) LIB(QGPL) DEV(*SAVF) SAVF(QGPL/P12345J)
- First, create a data base file:
- Create a save file which includes the trace files, if you generated a trace:
Save the MQ trace files
===> CRTSAVF FILE(QGPL/P12345T) TEXT('Trace files for PMR 12345,67R,890')
===> SAV DEV('/QSYS.LIB/QGPL.LIB/P12345T.FILE') OBJ(('/QIBM/UserData/mqm/trace/*' *INCLUDE) DTACPR(*MEDIUM) - Add any additional files recommended by the the IBM MQ MustGather documents, including files which contain output from MQ and system commands.
Save any additional files and command outputs
===> CRTSAVF FILE(QGPL/P12345X) TEXT('Extra files for PMR 12345,67R,890')
===> SAV DEV('/QSYS.LIB/QGPL.LIB/P12345X.FILE') OBJ(('/tmp/QMA.mqsc.txt' *INCLUDE) ('/tmp/ipcs.txt' *INCLUDE)) - While sending your data to IBM, be sure to rename the files so they contain your full problem record number, e.g. from P12345A to P12345,67R,890A.SAVF and so on. This is necessary because IBM i libraries limit names to only ten characters, but the IBM ECuRep site needs the full PMR number to associate files with your problem record.
- After sending your data to IBM, back up a copy of your save files until your PMR is resolved. Then delete the save files using WRKOBJ option 4 to save space.
Deleting the save files
===> WRKOBJ OBJ(QGPL/P12345*)
HP NonStop Server
WebSphere MQ V5.3.1 on HP NonStop Server uses the service data collection and packaging (sdcp) tool for collecting information.
- Download the latest version of the sdcp tool:
- From an OSS prompt, run the sdcp tool as documented in the accompanying PDF file, being sure to provide a PMR number. By default the files will be written to the current directory and named like 12345.67R.890-SDCP-YYMMDD-HHMMSS-archive.tar.Z based on the current date and time. For example:
Running sdcp against queue manager QMA
oss> sdcp -m QMA -p 12345.67R.890 - After sending your data to IBM, back up a copy of your file until your PMR is resolved. Then delete the file from the system to save space.
Deleting the tar file
oss> rm 12345.67R.890-*-archive.tar.Z
HP OpenVMS
If you do not have a copy of the zip archiver on your system, the free Info-ZIP utility is available for OpenVMS systems.
- Create a new zip file whose name begins with your IBM PMR number and add the contents of the MQ errors directory to it. Be sure to enclose zip option flags in quotation marks. For example:
Creating a new zip file containing MQ the errors directory
$ ZIP "-V" 12345.67R.890-MQDATA.ZIP MQS_ROOT:[MQM.ERRORS]*.*;* - Add the MQS.INI file to the zip file:
Adding the MQS.INI file
$ ZIP "-V" 12345.67R.890-MQDATA.ZIP MQS_ROOT:[MQM]MQS.INI - Add the MQ configuration files and error logs for your queue managers. For example:
Adding configuration files and error logs for queue manager QMA
$ ZIP "-V" 12345.67R.890-MQDATA.ZIP MQS_ROOT:[MQM.QMGRS.QMA]QM.INI,MQS_ROOT:[MQM.QMGRS.QMA.ERRORS]*.LOG - Add any additional files recommended by the the IBM MQ MustGather documents, including files which contain output from MQ and system commands. For example:
Adding additional files
$ ZIP "-V" 12345.67R,890-MQDATA.ZIP SHOWPROC.TXT,SHOWDEV.TXT - If you gathered an MQ trace, add the trace files last of all:
Adding MQ trace files
$ ZIP "-V" 12345.67R.890-MQDATA.ZIP MQS_ROOT:[MQM.TRACE]*.*;* - After sending your data to IBM, back up a copy of your file until your PMR is resolved. Then delete the file from the system to save space.
Deleting the zip file
$ DELETE 12345.67R.890-MQDATA.ZIP;*
Was this topic helpful?
Document Information
Modified date:
22 June 2018
UID
swg21671892