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 » Mainframe, CICS, TXSeries » Open Handles

Post new topic  Reply to topic
 Open Handles « View previous topic :: View next topic » 
Author Message
morfius9
PostPosted: Mon May 07, 2007 8:14 pm    Post subject: Open Handles Reply with quote

Novice

Joined: 06 May 2007
Posts: 13

Hi,
I wanted to check if the number of handles opened by my task is less than the maximum handles defined for the queuemanager in my program. I can use MQINQ to retrieve the maximum handles for the queue manager. However is there any way to retrieve the number of handles opened for the current task other than counting the number of MQ calls issued in the program?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 08, 2007 4:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

First make sure your application doesn't use any handle unnecessarily, or hold any handle open any longer than neccessary.

Then ask for an increase in maxhands if this is not enough.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue May 08, 2007 5:14 am    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

You can know about the current connections made to the QM in total by using

runmqsc

Display QMSTATUS
CONNS
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Tue May 08, 2007 9:13 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

The OP specified Mainframe and CICS.

runmqsc is distributed only.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
tleichen
PostPosted: Tue May 08, 2007 10:46 am    Post subject: Re: Open Handles Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

morfius9 wrote:
...
I wanted to check if the number of handles opened by my task is less than the maximum handles defined for the queuemanager in my program...
Is yours the only task in the system using that queue manager?
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 08, 2007 11:02 am    Post subject: Re: Open Handles Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

tleichen wrote:
morfius9 wrote:
...
I wanted to check if the number of handles opened by my task is less than the maximum handles defined for the queuemanager in my program...
Is yours the only task in the system using that queue manager?


Tleichen - are you sure that MAXHANDS applies across all connections, and is not counted separately for each connection?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tleichen
PostPosted: Tue May 08, 2007 11:10 am    Post subject: Re: Open Handles Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

jefflowrey wrote:

Tleichen - are you sure that MAXHANDS applies across all connections, and is not counted separately for each connection?
I believe you're right! It's just been one of those days...
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 08, 2007 6:07 pm    Post subject: Re: Open Handles Reply with quote

Grand High Poobah

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

tleichen wrote:
jefflowrey wrote:

Tleichen - are you sure that MAXHANDS applies across all connections, and is not counted separately for each connection?
I believe you're right! It's just been one of those days...


With max hands at 255 it has to be limitted to a connection... As is being said in the documentation it limits the number of handles a user/connection can have open at the same time. (That is if my memory hasn't gone south)
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue May 08, 2007 6:18 pm    Post subject: Re: Open Handles Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
(That is if my memory hasn't gone south)


One of us really should have bothered to look it up by now...


_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
morfius9
PostPosted: Sun May 13, 2007 10:25 am    Post subject: Reply with quote

Novice

Joined: 06 May 2007
Posts: 13

Yes, Max Handles defines the maximum number of tasks that a specific task can open with a a queue manager. However i need to know how i can get the count of currently open handles for the task for a queue manager and then equate it to the max handles for that queue manager.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sun May 13, 2007 12:45 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

For what purpose? To find out how many connections your application could possibly open? To find out if the newest request that came in would possibly run into a lack of handles?

All of these things are better handled administratively, rather than in your code. Which is to say - presumably it's your program that's doing important stuff. Once you have written your code to be properly conservative on how many handles it has lying around then if you run out at some point - the administrator needs to up the number of maxhands. So that your program can adequately do the work that it needs to do.

I've never ever had a program that ran into trouble with maxhands - but then again, I've usually gone for scaling instances of programs rather than threads within a program.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Open Handles
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.