IBM Support

How to find out if an MQ queue manager was started with a specific environment variable

Troubleshooting


Problem

This document explains how to determine the environment variables that were set at the startup of an MQ queue manager.

Resolving The Problem

+++ Section 1: Linux and AIX, see file from runmqras: environ_mq.stdout
In Linux and AIX, the tool runmqras will generate a file that will have the environment variables that were present when MQ processes of the queue manager were started.
The file is called:
  environ_mq.stdout
It is located at the top directory (that is, not under any subdirectories from runmqras)
+++ Section 2: FDCs
If there are FDC files in /var/mqm/errors (Unix) or in C:\Program Files\IBM\MQ\errors (default location in Windows), then very likely the FDC files will have a section at the bottom that shows the list of Environment Variables that were in place at the time the queue manager was started, for example:

Environment Variables:
LANG=en_US
PATH=/aem/bin/sys:/usr/xpg4/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/s
bin:/usr/java14/jre/bin:/usr/java14/bin:/aem/bin/AIX:/usr/vac/bin:/usr/vacpp/bin
:/aem/bin:/aem/mq/tools/scripts:/usr/mqm/bin:/usr/mqm/java/bin:/usr/mqm/samp/bin
:/home/rivera/bin:.:
LOGNAME=rivera
MAIL=/usr/spool/mail/rivera
EXTSHM=ON
LOCPATH=/usr/lib/nls/loc
...

Unix

If you do not have an FDC file, you can generate one as follows:

  1. Identify the process id of the amqrrmfa process for the desired queue manager. In this example, the queue manager is QM2 and the process id is: 9568426

    % ps -ef | grep QM2
    rivera 9568426 14024936 0 11:33:44 - 0:00 /usr/mqm/bin/amqrrmfa -m QM2 -t2332800 -s2592000 -p2592000 -g5184000 -c3600
     
  2. Send the USR2 signal (see the notes in the Miscellaneous section, below). It is safe to issue this signal to the amqrrmfa process.

    % kill -USR2 9568426
     
  3. An FDC file will be generated for the amqrrmfa process in /var/mqm/errors

    % ls /var/mqm/errors/*.FDC
    AMQ9568426.0.FDC
     
  4. The FDC file may look like this. Scroll down the FDC file to reach the section for the Environment Variables:

| Probe Id          :- XC034255
| Application Name  :- MQM
| Component         :- xcsWaitEventSem
| Program Name      :- amqrrmfa
| Major Errorcode   :- OK
| Minor Errorcode   :- OK
| Probe Type        :- INCORROUT
| Probe Severity    :- 4
| Probe Description :- AMQ6109: An internal IBMe MQ error has occurred.
...
-------------------------------------
Environment Variables:
LANG=en_US
...


Caution for sending SIGUSR2
MQ uses SIGUSR2 as its debug signal. This signal terminates programs which do not specifically handle it. Although most MQ queue manager processes handle SIGUSR2, some do not catch the signal.

The sigdump script knows which processes can safely handle SIGUSR2 and goes to some lengths to ensure it does not terminate a process which does not support it. If you try to run sigdump against an unsafe process it will issue an error and skip over the process.

The format of the kill command with the SIGUSR2 flag is:

kill -USR2 <pid>
WINDOWS:

If you do not have an FDC file, you can generate one as follows:

1. Identify the process id of the amqrrmfa process for the desired queue manager. In this example, the queue manager is QM80 and the process id is: 16592
C:\> tasklist /nh /v /fo csv | findstr /i "amqrrmfa"
"amqrrmfa.exe","16592","Console","2","14,156 K","Unknown","UserIdCommentedOut","0:00:00","N/A"

2. Invoked the MQ utility "amqldbgn" with the process id indicated in step 1: 16592
C:\Windows\System32>amqldbgn -p 16592
3. An FDC file will be generated in the directory: %MQ_JAVA_DATA_PATH%\errors
.
See the section for Unix for the details of the FDC.
.
+++ end +++

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"Configuration","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"All versions","Edition":"","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"}}]

Product Synonym

WMQ MQ MQSeries

Document Information

Modified date:
19 February 2024

UID

swg21474630