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 Performance Monitoring » How to get Time interval between a MQPUT and MQGET?

Post new topic  Reply to topic
 How to get Time interval between a MQPUT and MQGET? « View previous topic :: View next topic » 
Author Message
Diwyesh
PostPosted: Tue Sep 22, 2009 11:38 pm    Post subject: How to get Time interval between a MQPUT and MQGET? Reply with quote

Newbie

Joined: 25 May 2007
Posts: 4
Location: India

Hi All,

I have a requirement where I need to capture the time interval between a put and a get operation on a Queue.

e.g. In a queue if we have a message put at T1 and that message is retrieved(Get) from the Queue at T2, then need to find (T2-T1).

Is there any monitoring tool or features available in WMQ 6.0 to do this?

Please suggest.

Thanks.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Wed Sep 23, 2009 12:36 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

MQ hase some monitoring and statistic stuff build in, check the "monitoring MQ" manual for details.

there is something like "queue service time" and "oldest message on queue", but not a put / get interval based on individual message (imho).

if put is done local the MQMD time may be used for put time, so the intervall can be computed by the retrieving program, but if put is done remote there is no indicator when the message was really put into the (local) target queue, so you are lost without special tools or exits.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
anilit99
PostPosted: Wed Sep 23, 2009 5:11 am    Post subject: Reply with quote

Voyager

Joined: 28 May 2009
Posts: 75
Location: London, UK

Quote:
In a queue if we have a message put at T1 and that message is retrieved(Get) from the Queue at T2, then need to find (T2-T1).

I am not quite sure that it is possible to measure this delta on each individual message.

I would be quite surprised if there is a way to achieve this purely as an admin, without taking the help of either one of the parties (sender or receiver).
_________________
"I almost care !"
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Wed Sep 23, 2009 5:31 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

on z/OS it could be done by logfile analysis (if persistent messages).

another idea: cod coa can give you an idea how long the individual message was sitting in the queue. could be switched on by a channel message exit if message are received by channel. however, this may already be used by the application.

another (quick) idea - what about the api exit?

however, this is all fiddling work. if there is a performance problem or throughput problem, i'd try to catch it somewere else. If this is to proof service levels have been archieved, then maybe the mq supplied event stuff can help (service interval of queue)
_________________
Regards, Butcher
Back to top
View user's profile Send private message
mvic
PostPosted: Wed Sep 23, 2009 3:51 pm    Post subject: Re: How to get Time interval between a MQPUT and MQGET? Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

Diwyesh wrote:
e.g. In a queue if we have a message put at T1 and that message is retrieved(Get) from the Queue at T2, then need to find (T2-T1).

The put date and time goes in the MQMD.

You could write an API exit for MQGET that logs the current wall-clock time and the MQMD's putdate/puttime ?

If you needed to aggregate this data and display it graphically etc. then said log files could be used as the basis for that.

What's the underlying requirement? Is someone measuring MQ's efficiency, application efficiency, etc.? No sensitive info please
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Wed Sep 23, 2009 3:54 pm    Post subject: Re: How to get Time interval between a MQPUT and MQGET? Reply with quote

Jedi Knight

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

Diwyesh wrote:
Hi All,

I have a requirement where I need to capture the time interval between a put and a get operation on a Queue.

e.g. In a queue if we have a message put at T1 and that message is retrieved(Get) from the Queue at T2, then need to find (T2-T1).

Is there any monitoring tool or features available in WMQ 6.0 to do this?

Please suggest.

Thanks.


No. You may need to add some timing code to the application. eg. In C, call gettimeofday() just before the MQPUT and again just after the MQGET and calculate the delta. This can give microsecond resolution, depending on your OS's implementation of the function.

On a good day, using a synchronous request-reply model and a fast back-end processing app on the same system, the measurement will be of the order of a few milliseconds.
_________________
Glenn
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 23, 2009 4:23 pm    Post subject: Re: How to get Time interval between a MQPUT and MQGET? Reply with quote

Grand High Poobah

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

mvic wrote:
You could write an API exit for MQGET that logs the current wall-clock time and the MQMD's putdate/puttime ?


This of course falls foul of that old chesnut, the out-of-sync server clocks.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Diwyesh
PostPosted: Wed Sep 23, 2009 11:36 pm    Post subject: Reply with quote

Newbie

Joined: 25 May 2007
Posts: 4
Location: India

Hi All,

Thanks for the responses.

I am not sure if Queue service interval stuff can capture the time which the service timer calculates(that is Internal to MQ).

My requirement is to generate a report showing this delta for each message.

My options are drilling down to Exits. Please suggest if some other options are available like any tools ?

Thanks
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Sep 24, 2009 12:46 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

what is still not clear to me...

do you want to measure the time between the mqut of the putting application and the mqget, or do you want to measure the time when the message was placed on the target queue and the mqget? depending on wheather the putting application is local or remote and what you are trying to measure the MQMD put time can be used or not).

MQPUT (T1) - message transport - put to target queue (T2) - MQGET (T3)

so you want to measuere T3 - T1 or T3 - T2 ?!?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Diwyesh
PostPosted: Thu Sep 24, 2009 1:02 am    Post subject: Reply with quote

Newbie

Joined: 25 May 2007
Posts: 4
Location: India

I want the time between when the message was put into the Target Queue (T2 as you mentioned) and the time when message was Get from the Queue (T3). So basically I want (T3-T2)


The Put here will be remote, so I don't think we will be able to capture the put time there.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Sep 24, 2009 1:08 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

what plattform?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Diwyesh
PostPosted: Thu Sep 24, 2009 1:48 am    Post subject: Reply with quote

Newbie

Joined: 25 May 2007
Posts: 4
Location: India

AIX , Windows
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Sep 24, 2009 1:54 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

when you are looking for an exit solution, then maybe the mirrorq api exit can be a place to start

http://www-304.ibm.com/jct01005c/isv/tech/sampmq.html

it must be modified to catch the MCA puts (check comments in the source) and to catch the application gets, then you need another piece of software to correlate both.

be aware that wrong exit programming may harm your system, mqseries and your message content. so make sure you know what you are doing ......
_________________
Regards, Butcher
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 » IBM MQ Performance Monitoring » How to get Time interval between a MQPUT and MQGET?
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.