Author |
Message
|
jdyer |
Posted: Thu May 19, 2005 3:57 am Post subject: Queue Monitoring |
|
|
Newbie
Joined: 24 Nov 2004 Posts: 6
|
I'm running MQ in Solaris environment. I'm trying to figure out how I can write a script that will send a notification when a message has been sitting in the queue for n minutes of time. I know I can get the CURDEPTH, but if the CURDEPTH is the same when the script is being executed, that doesn't necessarily mean the documents are the same. Is there anyway I can iterate through the documents in the queue to get specific attributes on the document, such as time stamp???
Thanks in advance! _________________ Jeff |
|
Back to top |
|
 |
sebastianhirt |
Posted: Thu May 19, 2005 4:02 am Post subject: |
|
|
Yatiri
Joined: 07 Jun 2004 Posts: 620 Location: Germany
|
Hi,
the answer is yes you defiantely can, but don't ask me how, because this requires coding, which I am not capable to do.
But there is a number of tools out there, which will help you with that. But they are not free I am afraid.
I am not sure, but maybe the free netflexity monitoring solution might do it.
cheers
Sebastian |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 19, 2005 5:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You'll have to browse the queue for each message, and get the PutTime from the MQMD.
Most monitoring tools don't do this.
Or you could write an API exit that would record the puttime somewhere, and then record the time when the same message was retrieved. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jdyer |
Posted: Thu May 19, 2005 5:19 am Post subject: how |
|
|
Newbie
Joined: 24 Nov 2004 Posts: 6
|
how do I browse the queue for each message and get the post time? Can you set me on the right track with a command example? I'm not too familiar with all the different comands and what they do. If you tell me which command does what I'm looking for, I will then manipulate it to get the information/handle I need for the script.
Thanks! _________________ Jeff |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 19, 2005 5:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There are sample programs avaialble in the repository here, and on ibm's website that will show you how to browse messages. It's the same as getting them, but with different options.
It has to be done with code.
You can also read the Application Programming Guide for discussions on using Expiration on messages, so that they will automatically go away if they are "too old" (as long as something is reading the queue!). _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jdyer |
Posted: Thu May 19, 2005 5:32 am Post subject: ? |
|
|
Newbie
Joined: 24 Nov 2004 Posts: 6
|
I tried to look in the repository on the site here and couldn't find any examples of code or commands. I wouldn't know where to find this stuff. I don't even know what I'm searching for. I've searched for "get messages from queue", "document attributes", etc. What should I be looking for? _________________ Jeff |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu May 19, 2005 5:38 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
By "repository", I mean "the button at the top of this page labeled 'repository'".
There is a program called 'mqbrowse' in the Java section.
Also there should be amqsbcg0.c in your <MQ_Install>/Tools/c/Samples folder, if you installed the SDK. This is a C program that will browse. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jdyer |
Posted: Thu May 19, 2005 5:47 am Post subject: Commands |
|
|
Newbie
Joined: 24 Nov 2004 Posts: 6
|
I was more so looking for shell script commands. Is there any way I can get this information via command line rather than code? _________________ Jeff |
|
Back to top |
|
 |
vennela |
Posted: Thu May 19, 2005 5:59 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
I was more so looking for shell script commands. Is there any way I can get this information via command line rather than code? |
Again:
Not easily.
One thing you can look at is amqsbcg sample program. But you will have to parse the output yourself. |
|
Back to top |
|
 |
malammik |
Posted: Thu May 19, 2005 8:57 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
|