Author |
Message
|
sebastia |
Posted: Sun Jun 24, 2007 3:48 am Post subject: easy way to know the number of MQ Client connections |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
On an AIX with MQ Server v 6.0 and channel MY.SVRCONN
we are going to have lots (more than 1.000) Clients connected.
Is there an easy way to know the EXACT NUMBER os MQ CONNX()
at a given moment in time ?
I tried RUNMQSC + DISPLAY CHANNEL(MY.SVRCONN)
but I only get a large list of repetitive ...
AMQ8417: Display Channel Status details.
CHANNEL(MY.SVRCONN) CHLTYPE(SVRCONN)
CONNAME( ) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
I am trying to use some Windows Tools, as TLIST and PULIST
bot do not see any Process that exists 1.000 times ...
neither Listener, nor AMQRMPPA.exe ...
Any hint ?
S. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jun 24, 2007 6:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Output the information into a file (outputfile).
do
Code: |
FIND "CHANNEL" outputfile > countfile |
For the countfile you need a line count. This will give you the number of channels.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sebastia |
Posted: Sun Jun 24, 2007 8:03 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Saper : you mean
a) run "RUNMQSC qmgr_name < file_in.txt > file_out.txt
where "file_in.txt" contains "DISPLAY CHANNEL(MY.SVRCONN)"
b) then count the number of times
that file "file_out.txt" contains the word "CHANNEL"
??? Thanks. S. |
|
Back to top |
|
 |
sebastia |
Posted: Sun Jun 24, 2007 8:11 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
sorry : file_in.txt has to contain "DISPLAY CHSTATUS(MY.SVRCONN)"
and the line count has to be decreased by 3 and the result is OK.
Thanks, mr Saper. |
|
Back to top |
|
 |
sebastia |
Posted: Mon Jun 25, 2007 1:02 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Saper : would you be so kind
to tell me the command i have to use
to know the number of active Client Connections
but on an AIX environment ?
This is, first I run
"runmqsc qm_name < f_in.txt > f_out.txt"
where "f_in.txt" contains
"DISPLAY CHSTATUS(MY.SVRCONN)"
What shall I do in AIX with "f_out.txt" ?
(under Windows I wrote few lines in Rexx that were real nice ...)
Thanks. S. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jun 25, 2007 1:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You could find a Rexx to run on AIX.
Or you could switch to using Perl or sed/awk/grep instead. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sebastia |
Posted: Mon Jun 25, 2007 2:02 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Yes, Jeff - I do have Rexx on my (own ?) machine
but customer does not allow to do so ...
So, I was asking for the "bash" or "ksh" code to do it ...
I can't write that !
I just have found I do have ...
[wbrkadm@abc123]:/home/wbrkadm/> perl -v
This is perl, v5.8.2 built for aix-thread-multi
I can try to use this !!!
Thanks ! |
|
Back to top |
|
 |
sebastia |
Posted: Mon Jun 25, 2007 2:08 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
well, here is (some) answer ...
[wbrkadm@abc123]:/home/wbrkadm/> cat fer.sh
rm f_out.txt
rm f_fin.txt
runmqsc MQNAME < f_in.txt > f_out.txt
cat f_out.txt | grep "CHLTYPE(SVRCONN)" > f_fin.txt
wc -l f_fin.txt
where f_in.txt just contains
DISPLAY CHSTATUS(SYSTEM.ADMIN.SVRCONN)
"wc -l" provides the number of lines ...
( ) |
|
Back to top |
|
 |
wschutz |
Posted: Mon Jun 25, 2007 2:20 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Why not just:
Code: |
echo " DISPLAY CHSTATUS(SYSTEM.ADMIN.SVRCONN)" | runmqsc <qmr> | grep -c "CHLTYPE(SVRCONN)" |
? _________________ -wayne |
|
Back to top |
|
 |
sebastia |
Posted: Mon Jun 25, 2007 2:51 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Schutz : my command was Larger
because my knowledge os AIX Ksh or Bash
is Shorter than yours !
Of course you command does the same, and without files !!!
Cheers.
PD.- here is the result of your command right now :
echo "DISPLAY CHSTATUS(MY.SVRCONN)" | runmqsc MYQM | grep -c "CHLTYPE(SVRCONN)"
600
yes, I do have 600 MQ Client connections right now .. and increasing ! |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jun 25, 2007 1:52 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sebastia wrote: |
PD.- here is the result of your command right now :
echo "DISPLAY CHSTATUS(MY.SVRCONN)" | runmqsc MYQM | grep -c "CHLTYPE(SVRCONN)"
600
yes, I do have 600 MQ Client connections right now .. and increasing ! |
Increasing ?? Are you sure all your clients close properly their connection before shutting down?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
reachtodeepak |
Posted: Mon Jun 25, 2007 11:37 pm Post subject: not able to view connected clients |
|
|
Newbie
Joined: 25 Jun 2007 Posts: 3
|
Hi,
I tried DISPLAY CHSTATUS(SYSTEM.BKR.CONFIG) but m not able see all the conncted clients.......All i see is
5724-H72 (C) Copyright IBM Corp. 1994, 2004. ALL RIGHTS RESERVED.
Starting MQSC for queue manager WBIMB_QMGR.
1 : DISPLAY CHSTATUS(SYSTEM.BKR.CONFIG)
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.BKR.CONFIG) CHLTYPE(SVRCONN)
CONNAME(127.0.0.1) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.BKR.CONFIG) CHLTYPE(SVRCONN)
CONNAME(127.0.0.1) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(MQGET) XMITQ( )
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
Where as i have 4 clients connected................ |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 26, 2007 12:18 am Post subject: Re: not able to view connected clients |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
reachtodeepak wrote: |
I tried DISPLAY CHSTATUS(SYSTEM.BKR.CONFIG) but m not able see all the conncted clients.......All i see is
|
Ok, so you tried to display the broker's channel and it displayed the broker's channel. This all seems fair.
How does this relate to seeing connected clients (which wouldn't or at least shouldn't be using this channel)? What clients do you have?
What am I missing? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Tue Jun 26, 2007 1:58 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
When I have 5 clients connected I do get ...
display chstatus(SYSTEM.ADMIN.SVRCONN)
1 : display chstatus(SYSTEM.ADMIN.SVRCONN)
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(172.16.66.74) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(172.16.66.74) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(172.16.66.74) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(172.16.66.74) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( )
AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
CONNAME(172.16.66.74) CURRENT
RQMNAME( ) STATUS(RUNNING)
SUBSTATE(RECEIVE) XMITQ( ) |
|
Back to top |
|
 |
sebastia |
Posted: Tue Jun 26, 2007 2:01 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr Saper : the number of connected Clients
INCREMENTS
because a have a Delphi tool that
does a MQCONNX() from a given number of threads,
that keep the connection Open.
I am testing how many simultaneous connections
is my MQ Server able to manage.
So I pretend to exhaust it !!!
Have reached 1000 by now ....
See you.
By the way, my clients DO close nice their connection on my request ... |
|
Back to top |
|
 |
|