Author |
Message
|
morfius9 |
Posted: Mon May 07, 2007 8:14 pm Post subject: Open Handles |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue May 08, 2007 4:52 am Post subject: |
|
|
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 |
|
 |
AkankshA |
Posted: Tue May 08, 2007 5:14 am Post subject: |
|
|
 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 |
|
 |
EddieA |
Posted: Tue May 08, 2007 9:13 am Post subject: |
|
|
 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 |
|
 |
tleichen |
Posted: Tue May 08, 2007 10:46 am Post subject: Re: Open Handles |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue May 08, 2007 11:02 am Post subject: Re: Open Handles |
|
|
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 |
|
 |
tleichen |
Posted: Tue May 08, 2007 11:10 am Post subject: Re: Open Handles |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue May 08, 2007 6:07 pm Post subject: Re: Open Handles |
|
|
 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 |
|
 |
jefflowrey |
Posted: Tue May 08, 2007 6:18 pm Post subject: Re: Open Handles |
|
|
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 |
|
 |
morfius9 |
Posted: Sun May 13, 2007 10:25 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Sun May 13, 2007 12:45 pm Post subject: |
|
|
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 |
|
 |
|