Channel Statistics

Channel statistics measure how much traffic flows through IBM MQ message channels—messages and bytes moved between queue managers or into the enterprise from partners. While queue statistics explain application queue hot spots, channel statistics explain whether PARIS.TO.LONDON actually carries the load or sits RUNNING with idle counters because XMITQ depth grows on the sender side. Enable STATCHL on tier-1 SDR and RCVR pairs, read MSGS and BYTES from DISPLAY CHSTATUS, and export counters to Prometheus for trend lines. This tutorial covers enabling channel statistics, interpreting counters by channel type, RESET CHSTATS, batching efficiency signals, correlating with transmission queue depth and network metrics, monitoring in Grafana, and capacity reviews before bandwidth upgrades or channel limit changes.

Enable Statistics on Channel Definitions

shell
1
2
3
4
5
6
7
8
ALTER CHANNEL('PARIS.TO.LONDON') CHLTYPE(SDR) STATCHL(ENABLED) DISPLAY CHANNEL('PARIS.TO.LONDON') STATCHL DISPLAY CHSTATUS('PARIS.TO.LONDON') ALL * MSGS, BYTES, LASTMSGDT, STATUS — fields per version RESET CHSTATS('PARIS.TO.LONDON') * Use per IBM syntax for instance vs definition

STATCHL applies to the channel definition; active instances inherit behavior when started. Cluster channels and sender-receiver pairs both benefit. SVRCONN client channels may have separate statistics attributes on some releases—verify documentation before alerting.

CHSTATUS fields for capacity (typical)
FieldMeaningIf abnormal
MSGSMessages moved on this instanceFlat while XMITQ grows — investigate flow
BYTESPayload volume movedHigh bytes low msgs — large messages
LASTMSGDTTime last message transferredStale while RUNNING — zombie session
STATUSRUNNING, RETRY, etc.Not RUNNING — channel runbook
BATCHSZ / batch indicatorsBatching config (definition)Tune with channel batching guide

Sender vs Receiver Perspective

On a sender channel, MSGS often reflects messages sent toward the partner; on a receiver, messages received. During incidents compare both sides of a pair at the same timestamp—large mismatch suggests partial transfer, in-doubt batches, or monitoring reading different instances. Network teams want BYTES rate; middleware teams want MSGS rate and STATUS together.

Throughput and Batch Efficiency

Low MSGS with high BYTES implies few large messages—consider message splitting or compression if policy allows. High MSGS with low BYTES implies small chatter—batching may reduce overhead if latency SLAs permit. Channel batching tutorial covers MAXMSGL and batch attributes; statistics prove whether tuning helped after change.

Monitoring Pipeline

  1. STATCHL on critical channels only to limit PCF load.
  2. Exporter maps MSGS and BYTES to counters with channel and qmgr labels.
  3. PromQL rate() on bytes for bandwidth dashboards.
  4. Alert: STATUS not RUNNING OR bytes rate zero for fifteen minutes on tier-1 SDR.
  5. Monthly capacity report: top five channels by byte volume.

Correlate with XMITQ and Network

XMITQ depth rising while channel MSGS flat and STATUS RUNNING is a classic zombie pattern—session up, transfer stalled. TCP retransmits and firewall drops appear in network monitoring; channel statistics confirm middleware perspective before blaming applications. TLS renegotiation may pause byte growth briefly—annotate change windows.

RESET CHSTATS Use Cases

  • Before partner throughput test after bandwidth upgrade.
  • After channel parameter change to measure improvement.
  • Not during production outage until baseline captured.

Explainer: Toll Road Counter

Channel statistics are the toll booth counter—how many vehicles and total weight passed this highway segment, regardless of how many cars wait in the parking lot (XMITQ depth).

Explain Like I'm Five: Channel Statistics

The tunnel between two rooms has a counter that clicks for each toy car sent through and how big the load was. The counter does not tell you how many cars wait to enter the tunnel—that is the transmission queue.

Practice Exercises

Exercise 1

Given BYTES 9 GB in one hour on one channel, estimate average megabits per second.

Exercise 2

Write alert logic: RUNNING and byte rate zero ten minutes while XMITQ depth increases.

Exercise 3

List channels to enable STATCHL first on a hub queue manager with twenty partners.

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. STATCHL(ENABLED) enables:

  • Channel statistics
  • Queue depth events
  • TLS only
  • Topic publish

2. MSGS on CHSTATUS typically indicates:

  • Messages transferred on instance
  • MAXDEPTH
  • Log files
  • CF structures

3. Channel RUNNING with flat MSGS may mean:

  • Stuck session with no flow
  • Perfect health always
  • Log full
  • DLQ deleted

4. RESET CHSTATS is for:

  • Clearing channel counters
  • Deleting channel
  • Stopping QM
  • Disabling listener
Published
Read time21 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation