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 » IBM MQ Installation/Configuration Support » easy way to know the number of MQ Client connections

Post new topic  Reply to topic Goto page 1, 2  Next
 easy way to know the number of MQ Client connections « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Sun Jun 24, 2007 3:48 am    Post subject: easy way to know the number of MQ Client connections Reply with quote

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
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Sun Jun 24, 2007 6:48 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
sebastia
PostPosted: Sun Jun 24, 2007 8:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Sun Jun 24, 2007 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Mon Jun 25, 2007 1:02 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Mon Jun 25, 2007 1:47 am    Post subject: Reply with quote

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
View user's profile Send private message
sebastia
PostPosted: Mon Jun 25, 2007 2:02 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Mon Jun 25, 2007 2:08 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
wschutz
PostPosted: Mon Jun 25, 2007 2:20 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
sebastia
PostPosted: Mon Jun 25, 2007 2:51 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Mon Jun 25, 2007 1:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
reachtodeepak
PostPosted: Mon Jun 25, 2007 11:37 pm    Post subject: not able to view connected clients Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Tue Jun 26, 2007 12:18 am    Post subject: Re: not able to view connected clients Reply with quote

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
View user's profile Send private message
sebastia
PostPosted: Tue Jun 26, 2007 1:58 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Tue Jun 26, 2007 2:01 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » easy way to know the number of MQ Client connections
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.