|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PCF commands to get Channel Attributes |
« View previous topic :: View next topic » |
Author |
Message
|
Rush124 |
Posted: Thu Sep 18, 2014 11:38 pm Post subject: PCF commands to get Channel Attributes |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
Hi,
I'm want to get the number of clients connected to a particular channel using PCF.
(I am using channels which are type of MQCHT_SVRCONN)
I went through MQCMD_INQUIRE_CHANNEL and MQCMD_INQUIRE_CHANNEL_STATUS commands. but I couldn't find a solution.
First of all, is it possible to get the number of clients connected to a particular channel? If yes, can you guys give me a direction.
Thanks in Advance. |
|
Back to top |
|
 |
hughson |
Posted: Fri Sep 19, 2014 2:04 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
MQCMD_INQUIRE_CHANNEL_STATUS is the command you want. Provide the name of the channel you are after and then count the answers.
You embolden number of clients, which suggests you imply some meaning to that which you didn't expand on. Are you looking to, for example, find the number of distinct machines, even where there might be multiple channel connections from one machine? If you you will need to inspect the results to count the number of different IP address returned.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
Rush124 |
Posted: Fri Sep 19, 2014 2:18 am Post subject: |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
Thank you very much.
It works.
(By "number of clients", i meant the number of applications connected to channels. So number of iterations gives the answer.) |
|
Back to top |
|
 |
Rush124 |
Posted: Sun Sep 21, 2014 9:20 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
Hi again,
I could manged to get the number of clients connected to each channel as you pointed out.
Then I tried to get parameters such as "ClientIdentifier, "MsgsReceived" , "MsgsSent" etc for each client. I tried using mqAddInquiry(adminBag, MQCACH_CLIENT_ID, &compCode, &reason); (to get the ClientIdentifier).
But mqExecute call fails.After Inquring the error bag, Reason code is identified as 2067, which stands for MQRC_SELECTOR_ERROR.
what is going wrong here? please help. |
|
Back to top |
|
 |
hughson |
Posted: Mon Sep 22, 2014 2:26 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
Rush124 wrote: |
I tried using mqAddInquiry(adminBag, MQCACH_CLIENT_ID, &compCode, &reason); (to get the ClientIdentifier).
But mqExecute call fails.After Inquring the error bag, Reason code is identified as 2067, which stands for MQRC_SELECTOR_ERROR.
what is going wrong here? please help. |
MQCACH_CLIENT_ID is not a status attribute of a SVRCONN channel.
Try using the MQ Explorer (right click on a channel and select status) or runmqsc:-
Code: |
DISPLAY CHSTATUS(channel-name) ALL |
to see the various attributes that you can ask for.
In Knowledge Center, this page "Inquire Channel Status" has all the possible values for all channel types (including MQTT channels) which I think is where you might be getting caught out as the attributes you mention are used on MQTT channels. If you instead use this page "Inquire Channel Status (Response)" which is just describing the response to the command - there is a separate page for the MQTT response and so those attributes are not listed here. Then you might get a slightly clearer picture.
MsgsReceived, and MsgsSent are also not available (they are MQTT values), but Messages (total) is, using MQIACH_MSGS - it gives you the total number of API calls made over the SVRCONN channel.
Hope that helps.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
Rush124 |
Posted: Tue Sep 23, 2014 2:31 am Post subject: |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
Thanks.
(As you mentioned, I have been referring the wrong page and trying to inquire invalid attributes )  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|