strmqm

strmqm is the command that turns an IBM MQ queue manager from offline to online. Every morning batch, every patch window, and every disaster recovery drill eventually runs strmqm QM_PROD—or its z/OS automation equivalent—before a single payment message moves. The command looks simple; the work underneath is not. strmqm validates data paths, opens logs, replays recovery if the previous stop was unclean, loads thousands of object definitions, and starts agents that accept MQSC and MQI. Beginners assume strmqm failed if applications cannot connect in five seconds; operators know a post-crash start may replay gigabytes of log while monitoring shows Running at ninety percent internal recovery. This utility-focused tutorial documents strmqm syntax and flags, relationship to dspmq and endmqm, automatic startup at OS boot, multi-instance standby starts, post-start checklist for listeners and channels, common failure modes, and coordination with application startup order—complementing the queue manager startup conceptual page with command-line depth.

Basic Syntax

strmqm queue_manager_name starts the named queue manager if it is not already running. The name must match crtmqm creation and dspmq output exactly—case sensitivity applies on Unix. Running strmqm without authority fails with platform permission errors. The mqm group on Linux typically has rights; production service accounts may be restricted deliberately.

shell
1
2
3
4
5
6
7
8
dspmq # Shows QM1 not running before start strmqm QM1 dspmq # QMNAME(QM1) STATUS(Running) — verify before apps connect runmqsc QM1 <
strmqm lifecycle companions
CommandRoleWhen
crtmqmCreate QM definition and directoriesInitial install
strmqmStart QM processAfter stop or boot
dspmqShow running or endedBefore/after start
endmqmStop QM processMaintenance
dltmqmDelete QMDecommission only

Internal Phases After strmqm

Phase one opens the queue manager directory and reads qm.ini parameters such as log paths and default queue manager services. Phase two performs media and log recovery—reading the log to redo committed persistent operations and undo uncommitted work. Phase three loads the object repository into memory structures the command server and MQI use. Phase four starts subagents: command server, channel initiators, trigger monitors as configured. Applications may receive MQRC 2009 queue manager quiescing or unavailable until the final ready state. DISPLAY QMSTATUS on a connected runmqsc session shows STARTED and connection counts when healthy.

Flags and HA Context

Consult IBM documentation for flags on your release. Multi-instance queue managers use strmqm with options to start active or standby roles; wrong role start can split brain if fencing is misconfigured. Native HA and RDQM products wrap strmqm in their own CLIs—follow product runbooks instead of only single-node habits. Containers often entrypoint strmqm inside the image; Kubernetes readiness probes should wait for MQ readiness, not only container running.

Automatic Startup

Register queue managers as OS services so strmqm runs at boot. On Linux systemd unit files reference strmqm; on Windows MQ services start configured queue managers. Automatic start after unclean host reboot triggers log replay without an operator present—monitor duration and alert if exceeds SLO. Pair with clean endmqm before host patching to shorten replay.

Post-Start Checklist

  1. dspmq shows Running.
  2. DISPLAY QMSTATUS—no critical errors.
  3. START LISTENER if not auto-started.
  4. START critical channels or verify auto-trigger.
  5. DISPLAY CHSTATUS for hub pairs—RUNNING.
  6. Application smoke test amqsput or health check queue.

Common Failures

  • Log path missing or permission denied—check qm.ini LOGPATH and filesystem mount.
  • Disk full—startup cannot extend log; free space urgently.
  • Port already in use—duplicate QM or listener conflict.
  • Corrupt log—media recovery messages; call IBM support with logs.
  • Already running—second strmqm harmless on some platforms; verify with dspmq.

z/OS Note

z/OS operators start queue managers through started tasks and CSQ commands rather than typing strmqm at an Unix shell—conceptually identical lifecycle. Coupling facility and queue sharing group members have additional verification after IPL. Cross-reference mq subsystem setup and CSQ commands tutorials when working on mainframe.

Explainer: Turning the Engine On

endmqm turned the engine off. strmqm turns it on and runs the pre-flight checklist—including fixing anything that was mid-flight when the engine last stopped abruptly.

Explain Like I'm Five: strmqm

strmqm is flipping the big switch that turns the post office building back on so mail can move again.

Practice Exercises

Exercise 1

Time strmqm after clean endmqm versus after kill -9; compare duration and AMQ messages.

Exercise 2

Write a post-start script: dspmq, DISPLAY QMSTATUS, START LISTENER.

Exercise 3

Document which applications must wait for strmqm before their own start command.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. strmqm starts:

  • Queue manager process
  • Only a listener
  • MQ Explorer
  • A single queue

2. After unclean shutdown strmqm may:

  • Replay logs for recovery
  • Skip all data
  • Delete channels
  • Disable OAM

3. Verify running with:

  • dspmq
  • dltmqm
  • amqsput only
  • DELETE QLOCAL

4. Listeners after strmqm:

  • May need START LISTENER separately
  • Always auto on all platforms
  • Never required
  • Replace strmqm
Published
Read time20 min
AuthorMainframeMaster
Verified: IBM MQ 9.4 documentation