DISPLAY CHSTATUS (MQTT)

Use the MQSC command DISPLAY CHSTATUS (MQTT) to display the status of one or more MQ Telemetry channels.


Use MQSC commands

For information on how we use MQSC commands, see Performing local administration tasks using MQSC commands.

Synonym: DIS CHS


DISPLAY CHSTATUS (MQTT)

DISPLAY CHSTATUS ( generic-channel-name ) CHLTYPE ( MQTT ) SUMMARYSummaryAttributesCLIENTID(generic-clientId)DetailAttributesWHERE(FilterCondition)SummaryAttributesALLCONNECTIONSSTATUSDetailAttributesALLSTATUSCLNTUSERKAINTMCAUSERMSGSNTMSGRCVDINDOUBTININDOUBTOUTPENDINGPROTOCOLLMSGDATELMSGTIMECHLSDATECHLSTIME Notes:

  • The default behavior is for RUNMQSC to return a summary of the connections to the channel. If CLIENTID is specified then RUNMQSC returns details of each client connected to the channel.
  • Either CLIENTID, SUMMARY, or neither may be specified, but not both at the same time.
  • The DISPLAY CHSTATUS command for MQ Telemetry has the potential to return a far larger number of responses than if the command was run for an IBM MQ channel. For this reason, the MQ Telemetry server does not return more responses than fit on the reply-to queue. The number of responses is limited to the value of MAXDEPTH parameter of the SYSTEM.MQSC.REPLY.QUEUE queue. When RUNMQSC processes an MQ Telemetry command that is truncated by the MQ Telemetry server, the AMQ8492 message is displayed specifying how many responses are returned based on the size of MAXDEPTH.
  • We can use this command to list disconnected clients. As these clients are not associated with a particular channel, you list them using the wildcard character. For example,
    DIS CHS(*) CHLTYPE(MQTT) CLIENTID(*) WHERE(STATUS EQ DISCONNECTED).
    We should take care if using this command as there could be a large number of disconnected clients.


Parameter descriptions for DISPLAY CHSTATUS

We must specify the name of the channel for which we want to display status information. This parameter can be a specific channel name or a generic channel name. By using a generic channel name, we can display either the status information for all channels, or status information for one or more channels that match the specified name.

    ( generic-channel-name )

    The name of the channel definition for which status information is to be displayed. A trailing asterisk (*) matches all channel definitions with the specified stem followed by zero or more characters. An asterisk (*) on its own specifies all channel definitions. A value is required for all channel types.

    WHERE

    Specify a filter condition to display status information for those channels that satisfy the selection criterion of the filter condition.

    The filter condition is in three parts: filter-keyword, operator, and filter-value:

      filter-keyword
      The parameter to be used to display attributes for this DISPLAY command.

      Status information for channels of a type for which the filter keyword is not valid is not displayed.

      operator
      This is used to determine whether a channel satisfies the filter value on the filter keyword. The operators are:

        LT
        Less than

        GT
        Greater than

        EQ
        Equal to

        NE
        Not equal to

        LE
        Less than or equal to

        GE
        Greater than or equal to

        LK
        Matches a generic string that you provide as a filter-value

        NL
        Does not match a generic string that you provide as a filter-value

        CT
        Contains a specified item. If the filter-keyword is a list, we can use this operator to display objects the attributes of which contain the specified item.

        EX
        Does not contain a specified item. If the filter-keyword is a list, we can use this operator to display objects the attributes of which do not contain the specified item.

      filter-value
      The value that the attribute value must be tested against using the operator. Depending on the filter-keyword, this value can be:

      • An explicit value, that is a valid value for the attribute that is being tested.

        We can use operators LT, GT, EQ, NE, LE, or GE only. However, if the attribute value is one from a possible set of values on a parameter (for example, the value SDR on the CHLTYPE parameter), we can use EQ or NE only.

      • A generic value. This value is a character string with an asterisk at the end, for example ABC*. If the operator is LK, all items where the attribute value begins with the string (ABC in the example) are listed. If the operator is NL, all items where the attribute value does not begin with the string are listed. Only a single trailing wildcard character (asterisk) is permitted.

        You cannot use a generic filter-value for parameters with numeric values or with one of a set of values.

      • An item in a list of values. Use CT or EX as the operator. For example, if the value DEF is specified with the operator CT, all items where one of the attribute values is DEF are listed.

    ALL

    Specify this parameter to display all the status information for each relevant instance.

    If this parameter is specified, any parameters that request specific status information which are also specified have no effect; all the information is displayed.


Summary attributes

When SUMMARY is added to the MQSC command DISPLAY CHSTATUS (MQTT), the number of connections is displayed as the CONNECTIONS attribute. The following attributes display a summary for each channel.

    ALL

    Specify this parameter to display all the status information for each relevant instance. This attribute is the default value if no attributes are requested.

    This parameter is valid for MQTT channels.

    If this parameter is specified, any specified parameters that are requesting specific status information have no effect; and all the information is displayed.

    CONNECTIONS

    The number of current connections to this channel.

    STATUS

    The status of this channel.


Client details mode

    STATUS

    The status of the client.

    CLNTUSER

    The user ID that the client provided when it connected.

    CONNAME

    The name of the remote connection (IP address)

    KAINT

    The client's keep alive interval.

    MCAUSER

    The user ID that the client is using to access IBM MQ resources. This is the client user ID selected by the process described in MQTT client identity and authorization.

    MSGSNT

    Number of messages sent by the client since it connected last.

    MSGRCVD

    Number of messages received by the client since it connected last.

    INDOUBTIN

    Number of in doubt, inbound messages to the client.

    INDOUBTOUT

    Number of in doubt, outbound messages to the client.

    PENDING

    Number of outbound pending messages.

    PROTOCOL

    The communication protocol used by the client. This is, MQTT V3, HTTP, or MQTTV311.

    LMSGDATE

    Date last message was received or sent.

    LMSGTIME

    Time last message was received or sent.

    CHLSDATE

    Date channel started.

    CHLSTIME

    Time channel was started.

Parent topic: MQSC commands