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.
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.
12345678910111213dspmq # 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 <
| dspmq shows | Meaning | Next step |
|---|---|---|
| Ended | QM process down | strmqm; check AMQERR if fails |
| Running | QM process up | Check listener, channels, 2035 |
| QM not listed | Wrong host or not created | crtmqm or connect to correct server |
| Running but apps fail | Not a stopped QM | MQSERVER, CHLAUTH, queue name |
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.
123456789#!/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
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 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.
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.
dspmq is asking which mail buildings on your street are open right now without going inside each one.
Run dspmq before and after endmqm and strmqm; capture output in a ticket template.
Write a shell script that alerts when STATUS is not Running.
Given 2059 from app, list three dspmq and runmqsc checks in order.
1. dspmq shows:
2. Applications fail with 2059 when:
3. dspmq -m filters:
4. Detailed status inside QM uses: