The imqcmd utility includes subcommands that allow you to list and get information about connections.
The list cxn subcommand lists all connections of a specified service name. This is the syntax of the list cxn subcommand:
imqcmd list cxn [-svn serviceName] [-b hostName:portNumber]
The subcommand lists all connections of the specified service name on the default broker or on a broker at the specified host and port. If the service name is not specified, all connections are listed.
For example, the following command lists all connections on the default broker:
imqcmd list cxn -u admin
After prompting for the password, the command produces output like the following:
Listing all the connections on the broker specified by: ----------------------------------- Host Primary Port ------------------------------------ localhost 7676 --------------------------------------------------------------------------- Connection ID User Service Producers Consumers Host --------------------------------------------------------------------------- 1964412264455443200 guest jms 0 1 127.0.0.1 1964412264493829311 admin admin 1 1 127.0.0.1 Successfully listed connections. |
To query and display information about a single connection service, use the query subcommand.
query cxn -n connectionID [-b hostName:portNumber]
The subcommand displays information about the specified connection on the default broker or on a broker at the specified host and port.
imqcmd query cxn -n 421085509902214374 -u admin
After prompting for the password, the command produces output like the following:
Connection ID 421085509902214374 User guest Service jms Producers 0 Consumers 1 Host 111.22.333.444 Port 60953 Client ID Client Platform |