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 » How to find the response time of message?

Post new topic  Reply to topic
 How to find the response time of message? « View previous topic :: View next topic » 
Author Message
jeeth_m
PostPosted: Fri Apr 12, 2002 8:36 pm    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Hi,
I'm stuck with a problem. We have an application which puts message to a local Q and its recieved at a remote Q. It is giving us some perfomance trouble . So we would like to find out the time taken by the messages sent by that application to reach the destination.Let me put the question this way...

How to find the time taken by a message to reach the destination ie a message is put in a remote Q definition defined in QM1 and it reaches the destination in a local Q in QM2. Is there any logs which are generated by MQ from which i can find the time a particular mesg(distinguished by correlID) is put or get frm the Q?
If not can you tell me how i can write an application which can give me this information.
Thanks in advance..
Jeeth Mathew


Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolban
PostPosted: Sat Apr 13, 2002 7:46 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

This problem boils down to the concept of keeping two machines clocks in synch. If the messages are taking "seconds or minutes", the answers can easily be found. If they are subsecond, it will be difficult. My best suggestion is to synch the clocks and then use the time stamp contained in the message header (MQMD). Subtract this from the arrival time and you have the duration that the message spent in the queue.

You have given me an idea about using message exits though ...
Back to top
View user's profile Send private message
jeeth_m
PostPosted: Mon Apr 15, 2002 7:55 am    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Hi kolban,

Thanks for the reply .....

MQ putdate and put time can be got from the MQOD struct. But how do u get the getdate and gettime. Do i have to rely on system time or there is some struct for that?

what i inted to do is moify the amqsbcg.exe which gives me the message put time. It gets the message frm the Q in browse mode.... and i have to modify it to run continuously monitoring the Q or get it triggered so that i dont have to use any channel exits....
But how do i get the time i do a mqget on the Q?

Thanks
jeeth

Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
muralidhar
PostPosted: Mon Apr 15, 2002 1:42 pm    Post subject: Reply with quote

Acolyte

Joined: 28 Feb 2002
Posts: 50

You can set expiry time for a message say, you set 10 minutes(Value= 6000). Expiry time is set/get property and in the units of 1/10 th second. When the message is received at the destination, read the the expiry time. This will tell you time left for expity, say 5992. This is it took 0.8 seconds.

You can also read the time of the message but it in GMT and difference in clocks of two machine might give you an error.
Back to top
View user's profile Send private message Send e-mail
kolban
PostPosted: Mon Apr 15, 2002 4:06 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

I like muralidhar's idea ... neat!! Am not sure how granular the expiry time clock is though. I believe on some systems, it may drift a little.

To get the time that you do the MQGET, you would need to call an operating system function to get the time of day. You would then need to "do math" to convert the formats to the same type and perform the subtraction.
Back to top
View user's profile Send private message
StefanSievert
PostPosted: Mon Apr 15, 2002 4:42 pm    Post subject: Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

Put aside the ideas and comments the others had, I just remembered that in the recent announcement of MQSeries V5.3 IBM talked about API crossing exits that would enable you to intercept the MQPUT and MQGET calls to get the information you are looking for without applciation changes. Not even knowing the details yet, this might probably be too far away to be worth a thought for you anyway.
The issues about a common timebase will still be the same. The expiry idea is really neat! However, it implies that the receiver knows what the original value was, which is probably not easy if your sending applications use the expiry field for real expiry processing with different values.
Additionally, if you require to not only measure your end2end times, but also want to know the network transmission times, you'd have to measure at the channel (exit) level as well.
Anyway, just thought I'd share my 2 cents.
Please let us know what you end up doing!
Thanks,
Stefan

_________________
Stefan Sievert
IBM Certified * WebSphere MQ
Back to top
View user's profile Send private message
jeeth_m
PostPosted: Tue Apr 16, 2002 7:45 am    Post subject: Reply with quote

Voyager

Joined: 21 Jan 2002
Posts: 93

Murali's Idea is innovative. But the problem is i cant tamper the existing application and the expiry interval. I am thinkin of using exit(send or message....which is better? ) for the same. Using the exit get puttime in the header and get the operating systme time stap. I can be accomplished by some function calls in C.
Exits are entirely new world to me and i am reading documents on that to get some better understanding so it may be some time before i can come up with some code.
thanks for all the tips ... i do appreciate if it keeps flowing in

Jeeth
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
PeterPotkay
PostPosted: Tue Apr 16, 2002 8:29 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Expiry time is not decremented while the message is off a queue, i.e. traversing the network. If app1 puts the message to the XMIT queue and it sits there for 0.1 seconds, takes 0.1 seconds to cross the wire, and then sits in the local queue on the other side for 0.1 seconds, the message really took 0.3 seconds, but expiry will have only gone down 0.2.


_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
muralidhar
PostPosted: Tue Apr 16, 2002 9:59 am    Post subject: Reply with quote

Acolyte

Joined: 28 Feb 2002
Posts: 50

Hi Peter,
I observed getting decremented value for Expiry time if I called MQGET with browse option. I think expiry time changes as the time passes even if the message is on the queue. Correct me if I am wrong.


Murali
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Tue Apr 16, 2002 10:19 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7716

Correct. Expiry time passes ONLY when a message is on a queue, not when it is in an application or traveling across the network, 2 areas which may take up a significant portion of the overal time a message takes to get from point A to point B.


_________________
Peter Potkay
Keep Calm and MQ On
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 » General IBM MQ Support » How to find the response time of message?
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.