endmqtrc

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.

Why Stopping Trace Matters

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.

endmqtrc usage patterns
Command patternEffectCaution
endmqtrc -m QM1Stop trace on named QMConfirm QM name spelling
endmqtrc -aStop trace on all tracing QMs on hostMay stop another team's trace
Queue manager endMay stop trace as side effectAvoid as deliberate method

Standard Stop Procedure

  1. Note end time in UTC in the ticket.
  2. Run endmqtrc -m QMNAME (or -a if that is your approved host standard).
  3. Verify trace files stopped growing (ls -l, watch size for 30 seconds).
  4. Copy trace set to case storage before formatting on production if policy requires.
  5. Run fmtmqver or platform formatter per IBM documentation.
  6. Grep formatted output for channel name, reason, USERID.
  7. Archive or delete raw trace per retention after case closure.
  8. Document in ticket: level, duration, path, who ran endmqtrc.
shell
1
2
3
4
5
6
7
8
# 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*

Using -a Safely

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.

Post-Trace Housekeeping

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.

When Trace Does Not Stop

  • Wrong queue manager name—endmqtrc reports no effect; trace continues elsewhere.
  • Another strmqtrc started immediately after—verify scripts do not auto-restart trace.
  • Different user lacks permission—run as mqm or privileged MQ admin per policy.
  • Platform bug—rare; collect dspmqver and contact IBM with evidence.

Explainer: Turning Off the Camera

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.

Incident Ticket Template

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.

Explain Like I'm Five: endmqtrc

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.

Practice Exercises

Exercise 1

Run strmqtrc and endmqtrc on lab QM; measure file size delta if you wait five extra minutes before endmqtrc.

Exercise 2

Add endmqtrc verification steps to your team's trace runbook.

Exercise 3

Scenario: engineer on vacation left trace running—write recovery steps without restarting QM.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. endmqtrc is paired with:

  • strmqtrc
  • strmqm
  • crtmqm
  • setmqaut

2. endmqtrc -a affects:

  • All tracing QMs on host
  • One channel only
  • Only clients
  • Archive logs

3. Format trace files:

  • After endmqtrc
  • Before strmqtrc
  • Never
  • During peak batch

4. Forgotten trace leads to:

  • Disk full and performance impact
  • Higher MAXDEPTH
  • Automatic channel fix
  • More FDC
Published
Read time16 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation