IBM Support

Cleaning up IBM MQ files

Question & Answer


Question

Which IBM MQ files should I clean up to maintain my system?

Cause

IBM MQ queue managers automatically maintain the files which belong to the queue manager.  MQ also creates files to help diagnose unexpected conditions when it detects them, and these files should be cleaned up periodically to ensure they do not build up over time.

Answer

IBM recommends cleaning up old diagnostic files before collecting information with the runmqras command (or on HPE Integrity NonStop, the sdcp command) to reduce the amount of data collected, speed up the transfer to IBM, and enable IBM support to analyze the problem more quickly.


Linux and UNIX

IBM MQ creates FFST™ (First Failure Support Technology) files in the /var/mqm/errors directory when it detects an unusual situation which may require investigation. On Linux and UNIX systems, these files are named AMQxxxxx.y.FDC, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0.

Cleaning up MQ FFST files older than 60 days

sh> find /var/mqm/errors -name "AMQ*.FDC" -mtime +60 -exec rm -f "{}" \;

 

If you traced MQ to diagnose a problem, those trace files will be in the /var/mqm/trace directory. Binary trace files are named AMQxxxxx.y.TRC, AMQxxxxx.y.TRS, and formatted traces are named AMQxxxxx.y.FMT, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0. Binary GSKit trace files are named AMQ.SSL.TRC and AMQ.SSL.TRC.x, where x is a sequence number, normally 1.

Cleaning up MQ trace files

sh> rm -f /var/mqm/trace/AMQ*

 

If you used the runmqras command to collect information for IBM support, it created a zip file containing diagnostic information for IBM, by default under the /tmp directory. Save your runmqras zip files until your IBM MQ problem is fully resolved, then delete them manually. For example:

Cleaning up a runmqras file

sh> rm -f /tmp/runmqras_190709_103353/TS123456789-hostname.zip

sh> rmdir /tmp/runmqras_190709_103353


Windows

IBM MQ files are always created under the directory given by the WorkPath registry key. To find the work path, use the amquregn program and the amquregn.ctl control file shipped with any MQ installation and ignore the double backslash characters in the result.

Finding 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"

 

IBM MQ creates FFST files in the errors subdirectory of the work path. On Windows, these files are named AMQxxxxx.y.FDC, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0. For certain serious errors, IBM MQ for Windows may also create AMQxxxxx.x.y.dmp files in the same directory, where x is a thread identifier number and y is a sequence number, normally 0.

Cleaning up MQ FFST and dump files older than 60 days

C:\> FORFILES /P "C:\ProgramData\IBM\MQ\errors" /M "AMQ*.*" /D -60 /C "CMD /C DEL @PATH"

 

If you traced MQ to diagnose a problem, those trace files will be in the trace subdirectory of the work path. Trace files are pre-formatted and are named AMQxxxxx.y.TRC and AMQxxxxx.y.TRS, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0. Binary GSKit trace files are named AMQ.SSL.TRC and AMQ.SSL.TRC.x, where x is a sequence number, normally 1.

Cleaning up MQ trace files

C:\> DEL "C:\ProgramData\IBM\MQ\trace\AMQ*.*"

 

If you used the runmqras command to collect information for IBM support, it created a zip file containing diagnostic information for IBM, by default under the current user's temporary directory (given by the TEMP environment variable). Save your runmqras zip files until your IBM MQ problem is fully resolved, then delete them manually. For example:

Cleaning up a runmqras file

C:\> DEL "%TEMP%\runmqras_Tue 07092019_1202638.38\TS123456789.runmqras_201907091206-hostname.zip"

C:\> RMDIR "%TEMP%\runmqras_Tue 07092019_1202638.38"


IBM i

IBM MQ creates FFST files in the /QIBM/UserData/mqm/errors directory. On IBM i, these files are named AMQxxxxx.y.FDC, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0. IBM MQ for IBM i also writes job log information to files named AMQxxxxx.x.y.JOB files in the same directory, where x is a thread identifier number and y is a sequence number, normally 0.

Cleaning up MQ FFST and job logs older than 60 days

===> CALL PGM(QMQM/FDCCLEAN) PARM('60')

Cleaning up MQ FFST and job logs older than 60 days (Qshell)

===> find /QIBM/UserData/mqm/errors \( -name "*.FDC" -o -name "*.JOB" \) -mtime +60 -exec rm -f "{}" \;

 

If you traced MQ to diagnose a problem, those trace files will be in the /QIBM/UserData/mqm/trace directory. Binary trace files are named AMQxxxxx.y.TRC, AMQxxxxx.y.TRS, and formatted traces are named AMQxxxxx.y.FMT, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0. Binary GSKit trace files are named AMQ.SSL.TRC and AMQ.SSL.TRC.x, where x is a sequence number, normally 1.

Cleaning up MQ trace files

===> WRKLNK OBJ('/QIBM/UserData/mqm/trace')

===> RMVLNK OBJLNK('/QIBM/UserData/mqm/trace/AMQ*.*')

Cleaning up trace files (Qshell)

===> ls -l /QIBM/UserData/mqm/trace

===> rm -f /QIBM/UserData/mqm/trace/AMQ*.*

 

If you used the runmqras command to collect information for IBM support, it created a zip file containing diagnostic information for IBM, by default under the /tmp directory. Save your runmqras zip files until your IBM MQ problem is fully resolved, then delete them manually. For example:

Cleaning up a runmqras file

===> RMVDIR DIR('/tmp/runmqras_190709_121144') SUBTREE(*ALL)

Cleaning up a runmqras file (Qshell)

===> rm /tmp/runmqras_190709_121144/TS123456789-HOSTNAME.EXAMPLE.COM.zip

===> rmdir /tmp/runmqras_190709_121144

 

Delete unwanted spool files created by IBM MQ programs and make sure the spool files for the QMQM account are maintained. You can use WRKSPLF option 4 to delete spool files, or delete MQ spool files for a user based on job name.

Cleaning up selected spool MQ spool files for a user

===> DLTSPLF FILE(*SELECT) SELECT(QMQM *ALL *ALL STRMQM_R)

Cleaning up all spool files for a user

===> DLTSPLF FILE(*SELECT) SELECT(QMQM)

 

Optionally, you can configure IBM MQ job descriptors so they do not generate job logs except when there is an error. For example:

Changing an MQ job descriptor to suppress job logs

===> CHGJOBD JOBD(QMQM/QMQMJOBD) LOG(*SAME *SAME *NOLIST)

 

IBM MQ may log problems with IBM i when it detects an unusual situation. Review problems logged by IBM using WRKPRB option 8, then using option 20 to close resolved problems:

Reviewing and closing MQ problems

===> WRKPRB LICPGM(5724H72)


HPE Integrity NonStop

IBM MQ creates FFST™ (First Failure Support Technology) files in the var/mqm/errors sub-directory of the MQ OSS installation directory when it detects an unusual situation which may require investigation. MQ V8.x for HPE Integrity NonStop FFST files are named AMQnnnnnnnn.c.p.y.FDC, where nnnnnnnn is the name of the program that created the file, c is the CPU, p is the PIN number, and y is a sequence number, normally 0. WebSphere MQ V5.3 for HP NonStop Server FFST files are named AMQxxxxx.y.FDC, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0.

Cleaning up MQ FFST files older than 60 days

sh> find /path/to/var/mqm/errors -name "AMQ*.FDC" -mtime +60 -exec rm -f "{}" \;

 

If you traced MQ to diagnose a problem, those trace files will be in the var/mqm/trace sub-directory of the MQ OSS installation directory. MQ V8.x for HPE Integrity NonStop binary trace files are named AMQnnnnnnnn.c.p.y.TRC, AMQnnnnnnnn.c.p.y.TRS, and formatted traces are named AMQnnnnnnnn.c.p.y.FMT, where nnnnnnnn is the name of the program that created the file, c is the CPU, p is the PIN number, and y is a sequence number, normally 0. WebSphere MQ V5.3 for HP NonStop Server binary trace files are named AMQxxxxx.y.TRC, AMQxxxxx.y.TRS, and formatted traces are named AMQxxxxx.y.FMT, where xxxxx is the process identifier that created the file and y is a sequence number, normally 0.

Cleaning up MQ trace files

sh> rm -f /path/to/var/mqm/trace/AMQ*

 

If you used the sdcp command to collect information for IBM support, it created an archive file containing diagnostic information for IBM, by default in the current directory of the user who ran sdcp. Save your sdcp archive files until your IBM MQ problem is fully resolved, then delete them manually. For example:

Cleaning up an sdcp archive

sh> rm /path/to/TS123456789zz-SDCP-190709-141726-archive.tar.Z

 

If an MQ process or application terminates abnormally, DMON may create a SAVEABEND file named ZZSAxxxx in the volume and subvolume containing the program, where xxxx is a number chosen by DMON. After the cause of the abend is determined, delete the SAVEABEND files manually in TACL. For example:

Cleaning up MQ SAVEABEND files (TACL)

1> PURGE $VOL1.SUBVOL.ZZSA*

PURGE $VOL1.SUBVOL.ZZSA1234 (y/[n])? y

PURGE $VOL1.SUBVOL.ZZSA5678 (y/[n])? n

2>

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF031","label":"Ubuntu"},{"code":"PF033","label":"Windows"}],"Version":"9.1;9.0;8.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS5K6E","label":"IBM MQ Appliance"},"Component":"","Platform":[{"code":"PF004","label":"Appliance"}],"Version":"9.1;9.0;8.0","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSKM59","label":"IBM MQ for HPE NonStop"},"Component":"","Platform":[{"code":"PF011","label":"HPE NonStop"}],"Version":"8.1;8.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.5;7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Component":"","Platform":[{"code":"PF011","label":"HPE NonStop"}],"Version":"5.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
09 July 2019

UID

swg21670876