Bootstrap FreeKB - IBM MQ - Show channel status using the display chstatus command
IBM MQ - Show channel status using the display chstatus command

Updated:   |  IBM MQ articles

A channel is used to used to make a connection to an IBM MQ queue manager, thus each connection will be associated with a channel.

 

The display chstatus (or dsp chs) command can be used to display the status of one or more channels in a queue manager. In this example, the name of the queue manager is MANAGER01. Almost always, the status of each channel will be RUNNING, which means there is an active connection to the channel.

~]# echo "display chstatus(*)" | runmqsc MANAGER01
AMQ8417I: Display Channel Status details.
   CHANNEL(CHANNEL01)                      CHLTYPE(SVRCONN)
   CONNAME(10.85.189.188)                  CURRENT
   STATUS(RUNNING)                         SUBSTATE(RECEIVE)
AMQ8417I: Display Channel Status details.
   CHANNEL(CHANNEL02)                      CHLTYPE(SVRCONN)
   CONNAME(10.85.189.228)                  CURRENT
   STATUS(RUNNING)                         SUBSTATE(RECEIVE)
AMQ8417I: Display Channel Status details.
   CHANNEL(CHANNEL02)                      CHLTYPE(SVRCONN)
   CONNAME(10.85.189.228)                  CURRENT
   STATUS(RUNNING)                         SUBSTATE(RECEIVE)

 

Instead of using the * (wildcard) character, you can use the name of a channel. If the status of the channel is RUNNING, you should get output that looks something like this.

~]# echo "display chstatus('CHANNEL01')" | runmqsc MANAGER01
AMQ8417: Display Channel Status details.
  CHANNEL(CHANNEL01)                  CHLTYPE(SVRCONN)
  CONNAME(10.1.2.3)                   CURRENT
  STATUS(RUNNING)                     SUBSTATE(RECEIVE)

 

On the other hand, AMQ8420I: â€‹Channel Status not found should be returned if the channel is not running, meaning there are no active connections to the channel.

~]$ echo "display chstatus ('CHANNEL01')" | runmqsc MQHUBCA1
AMQ8420I: Channel Status not found.

 

If the stop channel command is used, the status of the channel should be STOPPED.

~]# echo "display chstatus('CHANNEL01')" | runmqsc MANAGER01
AMQ8417: Display Channel Status details.
  CHANNEL(CHANNEL01)                  CHLTYPE(SVRCONN)
  CONNAME(10.1.2.3)                   CURRENT
  STATUS(STOPPED)                     SUBSTATE( )

 

Status retrying might suggest some issue making a connection. In this scenario, check the error logs.

~]# echo "display chstatus('CHANNEL01')" | runmqsc MANAGER01
AMQ8417: Display Channel Status details.
  CHANNEL(CHANNEL01)                  CHLTYPE(SVRCONN)
  CONNAME(10.1.2.3)                   CURRENT
  STATUS(RETRYING)                    SUBSTATE( )

 

Here is one possible example of what you might find in the error log.

AMQ9999E: Channel 'CHANNEL01' to host 'mq.example.com' ended abnormally.

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


October 25 2022 by Craig
What version of IBM MQ are you using for this output when trying to do a DIS CHS on a channel that is INACTIVE i do not get a reply other than AMQ8420: Channel Status not found. Also the examples are quoted as 'channel01 is running and channel02 is inactive' but there are no examples for channel02

Add a Comment


Please enter bd4836 in the box below so that we can be sure you are a human.