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 » Is there a way to know who is using how many MQ connections?

Post new topic  Reply to topic
 Is there a way to know who is using how many MQ connections? « View previous topic :: View next topic » 
Author Message
Sam Uppu
PostPosted: Thu Apr 01, 2010 7:38 am    Post subject: Is there a way to know who is using how many MQ connections? Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Hi,
We are using MQ 7.0.1 on migranges.

There are multiple client applications trying to connect to QMgr on Unix box remotely via SVRCONN channels.

If one application who is a bad coder is not closing/ disconnecting properly is causing the max channels reached error and we are out of resources on that QMgr which is affecting other apps not able to connect. We wanted to identify who is the culprit for that max consumption of SVRCONN channels and beat him.

Is there a way to identify who is connecting to QMgr and who is using how many connections/ channels etc?.

Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 01, 2010 7:54 am    Post subject: Re: Is there a way to know who is using how many MQ connecti Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Sam Uppu wrote:
We wanted to identify who is the culprit for that max consumption of SVRCONN channels and beat him.


It's a strategy I can believe it

If all the applications are lumped together on a single SVRCONN you're going to struggle, though you might be able to identify orphaned connections via handle. It's easiest to split applications onto their own SVRCONN and investigate from there
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Apr 01, 2010 8:19 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Not forgetting that at that version you can limit the number of connections from a given IP Address down the same SVRCONN using MAXINSTC, and also limit the total number of SVRCONN instances with MAXINST...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Fri Apr 02, 2010 6:00 pm    Post subject: Re: Is there a way to know who is using how many MQ connecti Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2501
Location: Melbourne, Australia

Sam Uppu wrote:
Is there a way to identify who is connecting to QMgr and who is using how many connections/ channels etc?


DIS CHS(*) ALL
Shows all the ip addresses and app names that are connected via svrconn channels. It should be fairly easy to find ip addresses or apps that have a lot running.
_________________
Glenn
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Fri Apr 02, 2010 10:03 pm    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

I agree with gbaddeley.

RAPPLTAG
The remote partner application name. This is the name of the client application at the remote end of the channel. This parameter applies only to server-connection channels.
For ex:
display chs(XYZ) all
1 : display chs(XYZ) all
AMQ8417: Display Channel Status details.
CHANNEL(XYZ) CHLTYPE(SVRCONN)
BUFSRCVD(26784) BUFSSENT(26783)
BYTSRCVD(13711652) BYTSSENT(15650076)
CHSTADA(2010-04-02) CHSTATI(19.24.26)
COMPHDR(NONE,NONE) COMPMSG(NONE,NONE)
COMPRATE(0,0) COMPTIME(0,0)
CONNAME(x.y.z.a) CURRENT
EXITTIME(0,0) HBINT(300)
JOBNAME(002640A400000001) LOCLADDR( )
LSTMSGDA(2010-04-02) LSTMSGTI(22.56.41)
MCASTAT(RUNNING) MCAUSER(user1)
MONCHL(OFF) MSGS(26781)
RAPPLTAG(e:\KptnLoad\kadt.exe) RQMNAME( )
SSLCERTI( ) SSLKEYDA( )
SSLKEYTI( ) SSLPEER( )
SSLRKEYS(0) STATUS(RUNNING)
STOPREQ(NO) SUBSTATE(RECEIVE)
XMITQ( )
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Apr 03, 2010 7:31 am    Post subject: Reply with quote

Grand High Poobah

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

and updated the highlights on shashivarungupta's post to make them match more closely gbaddely's comment... Although to single out channel XYZ I would have run dis chs(*) all
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
csmith28
PostPosted: Sat Apr 03, 2010 12:05 pm    Post subject: Reply with quote

Grand Master

Joined: 15 Jul 2003
Posts: 1196
Location: Arizona

# echo "dis chs(*)" | runmqsc QMGRNAME > dischs.out

Will give you a snapshot of the running channels.

Then you can scan the .out file using vi or view and watch for trends.

If the application SVRCONN chls were set up wisely using unique names for the channels that server each application it will be easier. If not you will have to go by the IP addresses listed in the dis chs output.

Using grep and wc -l you can get a count of the number of channels with a certain name or connected from a certain IP.

# echo "dis chs(*)" | runmqsc QMGRNAME | grep RUNNING | wc -l
# echo "dis chs(*)" | runmqsc QMGRNAME | grep CHLNAME | wc -l

etc
_________________
Yes, I am an agent of Satan but my duties are largely ceremonial.
Back to top
View user's profile Send private message
John89011
PostPosted: Tue Apr 06, 2010 3:53 pm    Post subject: Reply with quote

Voyager

Joined: 15 Apr 2009
Posts: 94

Or you can write a little script like this...

if [ $# -ne 1 ]
then
echo "Usage: $0 <QMGR NAME>"
exit
fi

echo "dis chs(*) where (status ne RUNNING)" | runmqsc $1
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 06, 2010 9:13 pm    Post subject: Reply with quote

Grand High Poobah

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

John89011 wrote:
Or you can write a little script like this...

if [ $# -ne 1 ]
then
echo "Usage: $0 <QMGR NAME>"
exit
fi

echo "dis chs(*) where (status ne RUNNING)" | runmqsc $1


This does not contribute to the solution as it gives you the channels that are neither in a running state nor in an inactive state.

The previous posts show how to determine which channels show a state (and would count for max chls) and how many there are of each by channel name, conname etc...

Have fun
_________________
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 » Is there a way to know who is using how many MQ 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.