Author |
Message
|
trifo |
Posted: Thu Apr 10, 2008 12:14 am Post subject: How to determine the number of active channels? |
|
|
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 |
|
 |
AkankshA |
Posted: Thu Apr 10, 2008 12:26 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
|
Back to top |
|
 |
trifo |
Posted: Thu Apr 10, 2008 12:30 am Post subject: |
|
|
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 |
|
 |
AkankshA |
Posted: Thu Apr 10, 2008 12:38 am Post subject: |
|
|
 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 |
|
 |
trifo |
Posted: Thu Apr 10, 2008 12:51 am Post subject: |
|
|
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 |
|
 |
AkankshA |
Posted: Thu Apr 10, 2008 12:57 am Post subject: |
|
|
 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 |
|
 |
trifo |
Posted: Thu Apr 10, 2008 1:27 am Post subject: |
|
|
Apprentice
Joined: 25 Mar 2008 Posts: 26
|
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 |
|
 |
jefflowrey |
Posted: Thu Apr 10, 2008 1:42 am Post subject: |
|
|
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 |
|
 |
AkankshA |
Posted: Thu Apr 10, 2008 1:47 am Post subject: |
|
|
 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 |
|
 |
trifo |
Posted: Thu Apr 10, 2008 1:56 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Apr 10, 2008 2:59 am Post subject: Re: How to determine the number of active channels? |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
|