ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » PCF commands to get Channel Attributes

Post new topic  Reply to topic
 PCF commands to get Channel Attributes « View previous topic :: View next topic » 
Author Message
Rush124
PostPosted: Thu Sep 18, 2014 11:38 pm    Post subject: PCF commands to get Channel Attributes Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Fri Sep 19, 2014 2:04 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
Rush124
PostPosted: Fri Sep 19, 2014 2:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Rush124
PostPosted: Sun Sep 21, 2014 9:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Mon Sep 22, 2014 2:26 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
Rush124
PostPosted: Tue Sep 23, 2014 2:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » PCF commands to get Channel Attributes
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.