Author |
Message
|
manjo |
Posted: Fri Aug 26, 2005 12:17 pm Post subject: How can you keeping running total of msgs per Q for the day? |
|
|
Novice
Joined: 29 Nov 2001 Posts: 15
|
Because we are too cheap to get an off-the-shelf monitoring tool, we are building our own, to a degree.
We want to be able to know at any given time during the day, how many messages have been written to any given queue. Is there any way to get this info through a runmqsc command, or MQSeries.pm with perl, or something?
We're using Websphere MQ on Unix/Solaris.
Thanks,
Margaret |
|
Back to top |
|
 |
hopsala |
Posted: Fri Aug 26, 2005 12:31 pm Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
look at post Messages Enqued and Current Depth which was only a few weeks back... Within this thread there's a reference to another, read that one as well.
Quote: |
Is there any way to get this info through a runmqsc |
No. Through runmqsc you can only get CURDEPTH which says how many committed+uncommitted messages are on queue at that point in time, not how many messages were enqueued since last check.
There are similar options - depth events, service-interval events, traces - search this forum for the answers. |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Aug 27, 2005 4:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well.
There is some new accounting and statistics stuff in v6 that I haven't fully explored yet.
It's not clear that one could get access to this through runmqsc - although of course RESET QUEUE STATISTICS is available through runmqsc...
But there's some new and interesting stuff. I need to spend some time reading the monitoring manual. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Mon Aug 29, 2005 6:10 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
(1) turn statistics on for your favorite queue "alter ql(test) statq(on)"
(2) put-get some messages
(3) "reset qmgr type (statistics)"
(4) run the sample program "amqsmon -t statistics"
 _________________ -wayne |
|
Back to top |
|
 |
hopsala |
Posted: Mon Aug 29, 2005 8:09 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
wayne - this is stricltly mq6, right? |
|
Back to top |
|
 |
manjo |
Posted: Mon Aug 29, 2005 8:26 am Post subject: |
|
|
Novice
Joined: 29 Nov 2001 Posts: 15
|
I'm guessing we don't have MQ version 6. I am not able to alter the STATQ attribute. The system has never heard of it.
1 : alter qlocal(ql.nawork.tes) statq(on)
AMQ8405: Syntax error detected at or near end of command segment below:-
alter qlocal(ql.nawork.tes) sta
AMQ8427: Valid syntax for the MQSC command:
ALTER QLOCAL(q_name)
[ FORCE ] [ BOQNAME(string) ]
[ BOTHRESH(integer) ] [ CLUSNL(namelist_name) ]
.
.
.
Also. I cannot find any of the sample programs such as, amqsmon. I'm thinking our systems people did not install them, but would amqsmon be available if we don't have MQ version 6?
How can I determine which version we have?
By the way, thanks for the link to the previous threads. I found them very helpful.
Thanks,
Margaret |
|
Back to top |
|
 |
JT |
Posted: Mon Aug 29, 2005 8:30 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
How can I determine which version we have? |
mqver |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Aug 29, 2005 8:32 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
hopsala wrote: |
wayne - this is stricltly mq6, right? |
Yep. And with V6, the command is now dspmqver. |
|
Back to top |
|
 |
manjo |
Posted: Mon Aug 29, 2005 8:53 am Post subject: |
|
|
Novice
Joined: 29 Nov 2001 Posts: 15
|
Well, there you go...
mqm@clearingdev,mqm:2> mqver
Name: WebSphere MQ
Version: 530
CMVC level: p000-L021011
BuildType: IKAP - (Production) |
|
Back to top |
|
 |
wschutz |
Posted: Mon Aug 29, 2005 9:01 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
wayne - this is stricltly mq6, right? |
yeah, I should have said that... I was responding to Jeff comment:
Quote: |
There is some new accounting and statistics stuff in v6 that I haven't fully explored yet.
|
sorry....  _________________ -wayne |
|
Back to top |
|
 |
hopsala |
Posted: Mon Aug 29, 2005 11:35 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
manjo wrote: |
Version: 530 |
Since you have mq 5.3, the only way to achieve what you want is to look at the reference to the post " Messages Enqued and Current Depth" I placed in my first answer on this page, it says it all; or better yet, upgrade to MQ6, and do what wschutz suggested.
p.s from the mqver output I see you have not installed any CSDs (otherwise you would see something like "530.7 CSD07"), this is not recommended, download and install current CSD from ibm. |
|
Back to top |
|
 |
manjo |
Posted: Mon Aug 29, 2005 1:35 pm Post subject: |
|
|
Novice
Joined: 29 Nov 2001 Posts: 15
|
Thank you very much for the advice. I am merely an application developer, but will strongly recommend the installation of MQ6, or at minimum get the latest Fix Pack (CSD10) on our servers. Wish me luck!
Meanwhile, I will see what I am able to do with the limitations of Version 5.30 according to the previous threads you pointed to.
Thanks again,
Margaret |
|
Back to top |
|
 |
ramires |
Posted: Tue Aug 30, 2005 2:35 pm Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
You can create a script to do a mqsc display queue(*) curdepth command during the day, whit a predifined interval. keep the result and import that in a excel worksheet for manipulation.
Very basic, but it works.
Regards,
ramires |
|
Back to top |
|
 |
manjo |
Posted: Tue Aug 30, 2005 3:21 pm Post subject: |
|
|
Novice
Joined: 29 Nov 2001 Posts: 15
|
I'm not sure I understand how periodically capturing the current depth will tell me how many total messages have been enqueued. Inquiring on Current Depth could always come back with 0, when in fact 100 have come and gone during the course of the day.
Meanwhile, I tried using the perl module MQSeries::Command where you can use a function called InquireQueue to capture many queue Attributes. So, as a quick test, I tried to capture the following attributes:
OpenInputCount
OpenOutputCount
CurrentQDepth
TimeSinceReset
MsgEnqCount
The first 3 successfully return values, but the last 2 (the ones that I need to try to figure out how many total msgs have arrived on a queue for the day) return with a result "InquireQueue: Attribute selector not valid"
Is this because I need MQ version 6? Or because I need the Fix Packs for 5.3?
Grrrrrrr!!! |
|
Back to top |
|
 |
ramires |
Posted: Tue Aug 30, 2005 4:05 pm Post subject: |
|
|
Knight
Joined: 24 Jun 2001 Posts: 523 Location: Portugal - Lisboa
|
I never used the perl module. You are correct CURDEPTH displays the number of messages in that moment.
Regards
ramires |
|
Back to top |
|
 |
|