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 IBM MQ Support » How to determine the number of active channels?

Post new topic  Reply to topic
 How to determine the number of active channels? « View previous topic :: View next topic » 
Author Message
trifo
PostPosted: Thu Apr 10, 2008 12:14 am    Post subject: How to determine the number of active channels? Reply with quote

Apprentice

Joined: 25 Mar 2008
Posts: 26

Hi Folks,

I got confused. I have a parameter in my qm.ini saying

MaxChannels=300
MaxActiveChannels=300

Also I have a script which monitors the number of open channels, but its values tops at 150, when I got "Maximum number of channels reached" in the MQ log.

The code of the query is like this:
Code:

echo $(echo "dis chs('*')" | runmqsc QM.KGFB.ELES | grep "CHANNEL(" | wc -l )  channels open


But now I feel it might not be correct. How to do it well then?

Thank in advance,

--Trifo
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Apr 10, 2008 12:26 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

MaxChannels limits all channels for which there is an entry in the channel status table and not just running channels....

http://www.mqseries.net/phpBB2/viewtopic.php?t=41069&highlight=active+channels
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
trifo
PostPosted: Thu Apr 10, 2008 12:30 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2008
Posts: 26

Thanks. Then it implies a new question: How the channels get out of ChannesStatusTable? Or how to clear it?

--Trifo
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Apr 10, 2008 12:38 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

Your script is monitoring only the number of open channels.. running ones

how many channels do you have on your queue manager... in total (including status inactive, running, stoped)
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
trifo
PostPosted: Thu Apr 10, 2008 12:51 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2008
Posts: 26

Well, my script list every channels which reports a channel status in runmqsc. Regardless to the channel state.

So, the channels state table is filled with saved and active channel states?

The confusing phenomenon for me is that the avaliable number of active channels seems to be right the half of the MaxChannels value.

--Trifo
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Apr 10, 2008 12:57 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

trifo wrote:
Well, my script list every channels which reports a channel status in runmqsc. Regardless to the channel state.

So, the channels state table is filled with saved and active channel states?


channels having their status as "Inactive" will not have an entry in channel status table....


I have seen "Maximum number of channels reached" message only when my MaximumChannel count is reached.. irrespective of their status....

This might give you some inputs
Code:
echo $(echo "dis ch[b]l[/b]('*')" | runmqsc QM.KGFB.ELES | grep "CHANNEL(" | wc -l )  channels open


but u need to cater for system channels also here
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
trifo
PostPosted: Thu Apr 10, 2008 1:27 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2008
Posts: 26

Code:
dis chl

is not a good choice, as we are using svrconn channels, which instantiate themselves into a lot of instances. SYSTEM.DEF.SVRCONN, for example is only one entry when using "dis chl"

But might hold many connections, which can be seen as separate entries using "dis chs"

--Trifo
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 10, 2008 1:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Nobody should be using SYSTEM.DEF.SVRCONN.

It is a much better idea to create application/role specific serverconns and use those... (and then use SSLCAUTH and SSLPEER to enforce the roles).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Thu Apr 10, 2008 1:47 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

you are getting the error ""Maximum number of channels reached" which indicates the role of MaxChannels attribute here and not much to do with MaxActiveChannels(though they are related)....

Do u not have any other channel definition at your end except SYSTEM.DEF.SVRCONN
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
trifo
PostPosted: Thu Apr 10, 2008 1:56 am    Post subject: Reply with quote

Apprentice

Joined: 25 Mar 2008
Posts: 26

jefflowrey: SYSTEM.DEF.SVRCONN was only an example which might be known to everybody. Certainly we have other svrconn channel definitions to be used by various apps.

--Trfifo
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 10, 2008 2:59 am    Post subject: Re: How to determine the number of active channels? Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

trifo wrote:

The code of the query is like this:
Code:

echo $(echo "dis chs('*')" | runmqsc QM.KGFB.ELES | grep "CHANNEL(" | wc -l )  channels open


But now I feel it might not be correct. How to do it well then?

Thank in advance,

--Trifo


You might want to keep in mind that this is only a snapshot and reflects the number of channels stopped or in use at a particular moment. This number might fluctuate wildly depending on your use of the qmgr, the number of connecting Web servers, non web clients etc...

Check the qmgr's error log. It will be more specific as to timing. Also make sure that any well behaved client does disconnect nicely and not just loop trying to acquire a new connection upon a 2009 interrupt... (very efficient way to exhaust available channels on a network with lots of microcuts).

Ideally if you cannot reconnect right away you should put in some wait interval into the connection logic and fix the network problem first...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to determine the number of active channels?
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.