IBM Support

Manually packaging IBM MQ data to send to IBM

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


  1. 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




  2. 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



  3. 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



  4. 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



  5. 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



  6. 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



  7. 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.tar

    Using gzip: creates a .tar.gz. file


    sh> gzip /tmp/12345.67R.890-mqdata.tar

    Using bzip2: creates a .tar.bz2 file


    sh> bzip2 /tmp/12345.67R.890-mqdata.tar



  8. 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.



  1. 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:




  2. 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"




  3. Add a directory or file by dragging it on top of the new compressed folder. Start by including the top-level MQ errors directory.


  4. If your system has only MQ V7.1 or later installed, drag the MQ ini files to the compressed folder.


  5. Drag the MQ configuration files and error logs for your queue managers to the compressed folder.


  6. Add any additional files recommended by the the IBM MQ MustGather documents, including files which contain output from MQ and system commands.


  7. If you gathered an MQ trace, add the trace files last of all.


  8. 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.



  1. 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)



  2. 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))



  3. Create a save file which includes the system history log:

    1. First, create a data base file:

      Create a data base file


      ===> CRTPF FILE(QGPL/QHIST) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(10000 1000 100)


    2. 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)


    3. Work with spool files to find the QPDSPLOG history log information:

      Find the history log spool file


      ===> WRKSPLF


    4. 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)


    5. 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)



  4. Create a save file which includes the MQ job logs:

    1. First, create a data base file:

      Create a data base file


      ===> CRTPF FILE(QGPL/JOBLOGS) RCDLEN(132) MAXMBRS(*NOMAX) SIZE(10000 1000 100)


    2. 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)


    3. 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)
           ...


    4. 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)



  5. 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)



  6. 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))



  7. 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.



  8. 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.


  1. Download the latest version of the sdcp tool:



  2. 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



  3. 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.



  1. 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]*.*;*



  2. 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



  3. 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



  4. 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



  5. 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]*.*;*



  6. 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;*

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Problem Determination","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF021","label":"OpenVMS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.0;7.5;7.1;7.0;6.0;5.3.1","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
22 June 2018

UID

swg21671892