Every strmqtrc deserves an endmqtrc. The endmqtrc command stops IBM MQ trace and is as important as starting trace in the first place. Operations teams that document elaborate trace start procedures but forget stop procedures learn painfully when /var/mqm fills at 3 a.m. This tutorial explains endmqtrc options including stopping trace for one queue manager versus all queue managers on a host (-a), verification that trace actually stopped, post-trace steps (copy, format, secure, delete), how endmqtrc fits into change and incident tickets, and coordination when multiple engineers share a server.
While trace runs, the queue manager writes high-volume diagnostic data. Even moderate levels on busy systems consume CPU formatting buffers and disk I/O. Security-sensitive environments worry about trace content as much as disk—trace can include identities and partial payloads. endmqtrc ends the intentional flood so normal operations resume predictable performance. Treat forgotten trace as a production incident with its own severity if disk crosses thresholds.
| Command pattern | Effect | Caution |
|---|---|---|
| endmqtrc -m QM1 | Stop trace on named QM | Confirm QM name spelling |
| endmqtrc -a | Stop trace on all tracing QMs on host | May stop another team's trace |
| Queue manager end | May stop trace as side effect | Avoid as deliberate method |
12345678# Stop trace for one queue manager endmqtrc -m PROD.QM01 # Stop all trace on host (shared servers—coordinate first) endmqtrc -a # Verify file size stable ls -lh /var/mqm/trace/incident-chl-20260517* sleep 30 ls -lh /var/mqm/trace/incident-chl-20260517*
endmqtrc -a is convenient on dedicated MQ appliances where one team owns all queue managers. On consolidated servers running development and production queue managers, -a can stop a developer's long-running trace mid-experiment or vice versa. Before -a, run your site's status command if available, or check with teammates in chat. Prefer -m when you know which queue manager you started with strmqtrc.
Raw trace without formatting is hard to use. Formatted trace without redaction may violate policy. Compress large packages for IBM Support upload. Remove trace from production disks after upload—trace directories are not long-term archives. If strmqtrc used -b, older trace may exist in backup suffixes; include them if the incident spans rotation. Update monitoring to clear any trace-active flag your team maintains manually.
endmqtrc is pressing stop on the video camera. If you walk away without stopping, the camera keeps recording until the memory card is full and nothing else can be saved.
Include fields: Symptom, QM name, strmqtrc exact command, start UTC, reproduction steps, endmqtrc command, end UTC, trace path, formatted file checksum, related AMQERR lines, FDC filenames if any. Future you—and IBM Support—need the stop time to align trace timestamps with AMQERR.
endmqtrc tells the mail machine to stop writing down every tiny step. You always say stop when you are done watching, so the notebook does not use up all the paper.
Run strmqtrc and endmqtrc on lab QM; measure file size delta if you wait five extra minutes before endmqtrc.
Add endmqtrc verification steps to your team's trace runbook.
Scenario: engineer on vacation left trace running—write recovery steps without restarting QM.
1. endmqtrc is paired with:
2. endmqtrc -a affects:
3. Format trace files:
4. Forgotten trace leads to: