dspmq

dspmq is the ten-second health check for IBM MQ operations. Before you grep application logs or restart Java, run dspmq: is QM_PROD actually Running? Reason code 2059 from hundreds of clients often means the queue manager never started after last night host reboot, or endmqm completed but strmqm was never run after patching. dspmq answers at installation scope which queue managers exist and whether each is Running or Ended. It does not show queue depth or channel RETRY—that is DISPLAY QSTATUS and DISPLAY CHSTATUS inside runmqsc—but without dspmq you may debug the wrong layer for an hour. This tutorial explains dspmq output columns, filtering with -m, extended -o options, scripting and monitoring integration, relationship to strmqm and endmqm, multi-instance status fields at overview, container environments where dspmq runs inside the pod, and common misconceptions for beginners learning the operator command set.

Reading dspmq Output

A typical line shows QMNAME(QM1) STATUS(Running). Ended means the queue manager process is not active—applications cannot MQCONN. Running means the process is up; applications may still fail if listeners are down or authority is wrong, but 2059 due to stopped QM is ruled out. Multiple queue managers on one host each appear on their own line—know which name your application uses in MQSERVER or bindings connection.

shell
1
2
3
4
5
6
7
8
9
10
11
12
13
dspmq # Lists all queue managers on this installation dspmq -m QM1 # Filter to QM1 only — useful in scripts dspmq -m QM1 -o all # Extended attributes per your MQ version (paths, HA role, etc.) runmqsc QM1 <
Status troubleshooting flow
dspmq showsMeaningNext step
EndedQM process downstrmqm; check AMQERR if fails
RunningQM process upCheck listener, channels, 2035
QM not listedWrong host or not createdcrtmqm or connect to correct server
Running but apps failNot a stopped QMMQSERVER, CHLAUTH, queue name

Scripting and Monitoring

Nagios, Prometheus node scripts, and systemd health checks wrap dspmq -m QM1 and parse STATUS. Exit non-zero when not Running to page on-call. Combine with DISPLAY QSTATUS depth alerts only after dspmq passes—alerting on CURDEPTH when QM is Ended floods noise. Document expected Running hours for batch-only queue managers that legitimately stop daytime.

shell
1
2
3
4
5
6
7
8
9
#!/bin/bash # Example health check pattern if dspmq -m QM1 | grep -q 'STATUS(Running)'; then echo OK exit 0 else echo QM1 not running exit 2 fi

dspmq Versus DISPLAY QMGR

DISPLAY QMGR via runmqsc requires a running queue manager and returns configuration attributes: dead letter queue name, platform, version. dspmq does not need the QM running and does not show MAXDEPTH. Use dspmq for process state; use DISPLAY QMGR for configuration audit. dspmqver shows product version at installation level—another companion command during support cases.

Multi-Instance and Containers

Multi-instance queue managers may show Running on active and standby roles differently—read extended dspmq -o output for your HA setup. Kubernetes pods running MQ often expose dspmq in liveness probes after strmqm inside the container entrypoint. Host-level dspmq on the worker node may not see container QMs unless you exec into the pod—monitor at the correct namespace.

Common Mistakes

  • Assuming Running means all channels RUNNING—channels are separate.
  • Running strmqm on wrong host in cluster—dspmq on server A while apps point to server B.
  • Typo in queue manager name—dspmq -m QM1 versus application QM01.
  • Ignoring Ended after auto-patch reboot—automate strmqm in service unit.

Explainer: Is the Building Open?

dspmq is looking at the post office building lights from the street—open or closed. DISPLAY QMSTATUS is walking inside and checking each sorting belt once the doors are unlocked.

Explain Like I'm Five: dspmq

dspmq is asking which mail buildings on your street are open right now without going inside each one.

Practice Exercises

Exercise 1

Run dspmq before and after endmqm and strmqm; capture output in a ticket template.

Exercise 2

Write a shell script that alerts when STATUS is not Running.

Exercise 3

Given 2059 from app, list three dspmq and runmqsc checks in order.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. dspmq shows:

  • Queue manager Running or Ended
  • Message payload
  • Channel BATCHSZ
  • LDAP bind

2. Applications fail with 2059 when:

  • Queue manager not running
  • Message too long only
  • Topic wildcard
  • JCL error

3. dspmq -m filters:

  • One queue manager name
  • All channels
  • All messages
  • Log files

4. Detailed status inside QM uses:

  • DISPLAY QMSTATUS via runmqsc
  • dspmq only forever
  • amqsput
  • dltmqm
Published
Read time19 min
AuthorMainframeMaster
Verified: IBM MQ 9.4 documentation