[UNIX, Linux, Windows, IBM i]

dspmq (display queue managers)

Use the dspmq command to display names and details of the queue managers on a Multiplatforms system.

[z/OS]The equivalent utility to dspmq on z/OS® is CSQUDSPM.

Syntax

Read syntax diagramSkip visual syntax diagram dspmq   -m QMgrName  -s   -o all  -o default  -o installation  -o status -o standby-o ha-o dr-o nativeha-g -x -n -a -c

Required parameters

None

Optional parameters

-a
Displays information about the active queue managers only.
A queue manager is active if it is associated with the installation from which the dspmq command was issued and one or more of the following statements are true:
  • The queue manager is running
  • A listener for the queue manager is running
  • A process is connected to the queue manager
Success for dspmq -a is indicated by the return code 5.
-m QMgrName
The queue manager for which to display details. If you give no name, all queue manager names are displayed.
-n
Suppresses translation of output strings.
-s
The operational status of the queue managers is displayed. This parameter is the default status setting.

The parameter -o status is equivalent to -s.

-o all
The operational status of the queue managers is displayed, and whether any are the default queue manager.

[AIX, Linux, Windows]On AIX®, Linux®, and Windows, the installation name (INSTNAME), installation path (INSTPATH), and installation version (INSTVER) of the installation that the queue manager is associated with is also displayed.

[IBM MQ Advanced][IBM Cloud Pak for Integration]On Native HA configurations, the current HA role (ROLE), the name of this instance (INSTANCE), readiness to take over active role (INSYNC) and quorum status (QUORUM) are also displayed.

-o default
Displays whether any of the queue managers are the default queue manager.
[AIX, Linux, Windows]-o installation
[AIX, Linux, Windows]AIX, Linux, and Windows only.

Displays the installation name (INSTNAME), installation path (INSTPATH), and installation version (INSTVER) of the installation that the queue manager is associated with.

-o status
The operational status of the queue managers is displayed.
-o standby
Displays whether a queue manager currently permits starting a standby instance. The possible values are shown in Table 1.
Table 1. Standby values
Value Description
Permitted The queue manager is running and is permitting standby instances.
Not permitted The queue manager is running and is not permitting standby instances.
Not applicable The queue manager is not running. You can start the queue manager and this instance becomes active if it starts successfully.
-o ha | HA
Indicates whether a queue manager is an HA RDQM (high availability replicated data queue manager) or not. If the queue manager is an HA RDQM, one of the following responses is displayed:
HA(Replicated)
Indicates that the queue manager is an HA RDQM.
HA()
Indicates that the queue manager is not an HA RDQM.
For example:
dspmq -o ha 

QMNAME(RDQM8)                                      HA(Replicated)
QMNAME(RDQM9)                                      HA(Replicated)
QMNAME(RDQM7)                                      HA(Replicated)
QMNAME(QM7)                                        HA()
-o dr | DR
Indicates whether a queue manager is a DR RDQM (disaster recovery replicated data queue manager) or not. One of the following responses is displayed:
DRROLE()
Indicates that the queue manager is not configured for disaster recovery.
DRROLE(Primary)
Indicates that the queue manager is configured as the DR primary.
DRROLE(Secondary)
Indicates that the queue manager is configured as the DR secondary.
For example:
dspmq -o dr 

QMNAME(RDQM13)                                      DRROLE(Primary)
QMNAME(RDQM14)                                      DRROLE(Primary)
QMNAME(RDQM15)                                      DRROLE(Secondary)
QMNAME(QM27)                                        DRROLE()
[IBM MQ Advanced][IBM Cloud Pak for Integration]-o nativeha | NATIVEHA
Displays operational information for an instance in a Native HA configuration. Used on its own, displays ROLE, INSTANCE, INSYNC, QUORUM, GRPLSN, GRPNAME, and GRPROLE fields. (see Table 2). Combine with the -x parameter to view additional information on all the instances in the Native HA configuration (see Table 4). Combine with the -g parameter to view information about Native HA groups (see Table 5).
Table 2. Native HA instance values
Name Description
ROLE Specifies the current role of the instance and is one of Active, Replica, Unknown, Leader, or Not configured.
INSTANCE The name provided for this instance of the queue manager when it was created using the -lr option of the crtmqm command.
INSYNC Indicates whether the instance is able to take over as the active instance if required.
QUORUM Reports the quorum status in the form number_of_instances_in-sync/number_of_instances_configured.
[MQ 9.4.2 Feb 2025]GRPLSN Specifies the log sequence number (LSN) that has been replicated between a quorum of instances in the HA group, in nnnnn:nnnnn:nnnnn:nnnnn format. Blank if the LSN is not known.
[MQ 9.4.2 Feb 2025]GRPNAME Specifies the name of the HA group. Blank if a name has not been configured.
[MQ 9.4.2 Feb 2025]GRPROLE Specifies the current role of the HA group and is one of:

Live - A live group

Recovery - A recovery group

Pending live - A group waiting to become Live

Pending recovery - A group waiting to become Recovery

Unknown - The current role cannot be determined

Not configured - Native HA has not been configured

For examples of dspmq output for Native HA instances, see Viewing the status of Native HA queue managers for IBM MQ containers.
-x
Information about multi-instance queue manager instances is displayed. [IBM Cloud Pak for Integration]Displays information about Native HA queue manager instances if combined with the -o nativeha parameter.
The possible values for multi-instance queue manager instances are shown in Table 3.
Table 3. Instance values
Value Description
Active The instance is the active instance.
Standby The instance is a standby instance.
[IBM Cloud Pak for Integration]The possible values for Native HA queue manager instances are shown in Table 4.
Table 4. Native HA instance values when -x specified
Name Description
REPLADDR The replication address of the queue manager instance.
CONNACTV Indicates whether the instance is connected to the active instance.
BACKLOG Indicates the number of KB that the instance is behind the active instance.
CONNINST Indicates whether the named instance is connected to this instance.
ALTDATE Indicates the date on which this information was last updated. Blank if it has never been updated.
ALTTIME Indicates the time at which this information was last updated. Blank if it has never been updated.

[MQ 9.4.2 Feb 2025]ACKLSN

Indicates the LSN that the instance has acknowledged as having been written to the recovery log, in nnnnn:nnnnn:nnnnn:nnnnn format. Blank if the LSN value is not known.

[MQ 9.4.2 Feb 2025]HASTATUS

Indicates the operational status of this instance and is one of the following values:

Normal - the instance is operating normally.

Checking - the instance is being checked to ensure the consistency of the recovery log.

Synchronizing - the instance is being sent data to bring it in-sync.

Rebasing - a new recovery log is being sent to the instance.

Disk full - the instance has a full disk.

Disconnected - cannot communicate with the instance.

Unknown - the instance status is unknown.

[MQ 9.4.2 Feb 2025]SYNCTIME

Indicates the time when this instance was last in-sync with the active queue manager, in ISO 8601 format. Blank if the time is not known, or if this instance has not been in-sync with the active queue manager.
[MQ 9.4.2 Feb 2025]-g
Displays information about Native HA groups if combined with the -o nativeha parameter. One line is output for each configured group. If Native HA is not configured, there is no output.
Table 5. Native HA instance values when -g specified
Name Description

[MQ 9.4.2 Feb 2025]GRPNAME

Specifies the name of the HA group. Blank if a name has not been configured.

[MQ 9.4.2 Feb 2025]GRPROLE

Specifies the current role of the HA group and is one of:

Live - A live group

Recovery - A recovery group

Pending live - A group waiting to become Live

Pending recovery - A group waiting to become Recovery

Unknown - The current role cannot be determined

Not configured - Native HA has not been configured

[MQ 9.4.2 Feb 2025]GRPADDR

The IP address of the group. The IP address is Unknown if the group has not received a connection.

[MQ 9.4.2 Feb 2025]GRPVER

Indicates the version of the current group leader.

[MQ 9.4.2 Feb 2025]CONNGRP

This attribute is displayed only for groups other than the local group. Indicates whether the group is connected to the local group and is one of:

yes - the group is connected.

no - the group is disconnected.

unknown - the connection status is unknown.

suspended - the group is connected, but the group cannot replicate data until a configuration incompatibility between the groups is resolved. (This can occur if there is a version incompatibility, for example.)

[MQ 9.4.2 Feb 2025]INSYNC

Indicates whether the group could become Live with no loss of data if a failover occurred. (Note that a Recovery group might not be in-sync with the Live group very often because the log is replicated asynchronously. Use the RCOVLSN and RCOVTIME values to indicate if data loss might occur on an unplanned failover). Only displayed for a group when GRPROLE is Unknown, Recovery, or Pending live.

[MQ 9.4.2 Feb 2025]SYNCTIME

Indicates the time when this group was last in-sync with the Live group, in ISO 8601 format. Blank if the time is not known, or if the group has not been in-sync with the Live group. (Note that a Recovery group might not be in-sync with the Live group very often because the log is replicated asynchronously. Use the RCOVLSN and RCOVTIME values to indicate if data loss might occur on an unplanned failover.)

[MQ 9.4.2 Feb 2025]BACKLOG

Indicates the number of KB that the group is behind the Live group. This is only displayed when GRPROLE is Recovery or Pending live.

[MQ 9.4.2 Feb 2025]GRSTATUS

Indicates the operational status of this group and is one of the following values:

Normal - the group is operating normally.

Checking - the group is being checked to ensure the consistency of the recovery log.

Synchronizing - the group is being sent data to bring it in-sync.

Rebasing - the group is being sent a new recovery log.

Waiting for connection - the group is waiting for a connection from a group with the role Live or Pending Recovery.

Disconnected - cannot communicate with the group.

Partitioned - two groups believe they are the Live group (that is, a 'split brain' status).

Unknown - the group status is unknown.

[MQ 9.4.2 Feb 2025]RCOVLSN

A log sequence number (LSN) that the group could recover to, in nnnnn:nnnnn:nnnnn:nnnnn format. Any data written to the recovery log after this point might be lost if an unplanned failover occurs. This value can be passed into the -s option of the dmpmqlog command.

[MQ 9.4.2 Feb 2025]RCOVTIME

A time that the group could recover to, in ISO 8601 format. Any data written to the recovery log after this time might be lost if an unplanned failover occurs. This value can be passed into the -t or -u options of the dmpmqlog command.

[MQ 9.4.2 Feb 2025]INITLSN

The log sequence number (LSN) of the last log record recovered when the Native HA group initially became live, in the format nnnnn:nnnnn:nnnnn:nnnnn. Only displayed when GRPROLE is Live or Pending recovery.

[MQ 9.4.2 Feb 2025]INITTIME

The time of the last log record recovered when the Native HA group initially became live, in ISO 8601 format. Blank, if the group is not live or not known. Only displayed when GRPROLE is Live or Pending recovery.

[MQ 9.4.2 Feb 2025]LIVETIME

The time the group first became the live group, in ISO 8601 format. Only displayed when GRPROLE is Live or Pending recovery.

[MQ 9.4.2 Feb 2025]ALTDATE

Indicates the date when this information was last updated or blank if never updated.

[MQ 9.4.2 Feb 2025]ALTTIME

Indicates the time when this information was last updated or blank if never updated.
-c
Shows the list of processes currently connected to the IPCC, QMGR, and PERSISTENT subpools for a queue manager.
For example, this list typically includes:
  • Queue manager processes
  • Applications, including those that are inhibiting shutdown
  • Listeners

Queue manager states

The different states that a queue manager can be in are as follows:
  • Starting
  • Running
  • Running as standby
  • Running elsewhere
  • Recovery group leader
  • Quiescing
  • Ending immediately
  • Ending pre-emptively
  • Ended normally
  • Ended immediately
  • Ended unexpectedly
  • Ended pre-emptively
  • Status not available

Return codes

Table 6. Return code identifiers and descriptions
Return code Description
0 Command completed normally
5 Queue manager running
36 Invalid arguments supplied
58 Inconsistent use of installations detected
71 Unexpected error
72 Queue manager name error

Examples

  1. The following command displays queue managers on this server:
    dspmq -o all
    
  2. The following command displays standby information for queue managers on this server that have ended immediately:
    dspmq -o standby
    
  3. The following command displays standby information and instance information for queue managers on this server:
    dspmq -o standby -x