Author |
Message
|
soumen.smn |
Posted: Wed May 16, 2012 5:04 am Post subject: How to count no of msg(s) received by MQ |
|
|
 Novice
Joined: 05 Jan 2012 Posts: 10 Location: Kolkata, INDIA
|
I want to count the no of msg(s) received by a MQ. From a message flow, I can count the no using a counter variable. But if any restart happens for Broker, MQ, QMGR or Message Flow, all the data will be gone!
Is there any command(s) available for this purpose or other way out?
I have used the below commands. But the output(s) are not relavent to my requirement.
A. amqsmon -m MB7QMGR -t statistics -q MYQUEUE
B. amqsmon -m MB7QMGR -t accounting -q MYQUEUE
C. DISPLAY QUEUE (MYQUEUE)
Thanks!
Soumen |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed May 16, 2012 5:17 am Post subject: Re: How to count no of msg(s) received by MQ |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
soumen.smn wrote: |
I want to count the no of msg(s) received by a MQ. |
Do you mean that you want to count the number of messages MQPUT to queues by an application? Or, any/all applications?
Or, do you mean that you want to count the number of messages arriving across a channel? Or, all channels? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 16, 2012 5:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You really want to purchase a monitoring tool and then implement it.
It will allow you to accumulate enqueue/dequeue rates and store them in a database. |
|
Back to top |
|
 |
soumen.smn |
Posted: Wed May 16, 2012 5:27 am Post subject: |
|
|
 Novice
Joined: 05 Jan 2012 Posts: 10 Location: Kolkata, INDIA
|
I want to count the no of msg(s) received by MQInput Node of my message flow. I have a queue named "MYQUEUE" and a message flow "MYFLOW". MYFLOW starts with a MQ Input Node. MQ Input node receives msg as soon any msg will be posted to MYQUEUE. I want to count the exact no of this.
Thanks!
Soumen |
|
Back to top |
|
 |
soumen.smn |
Posted: Wed May 16, 2012 5:32 am Post subject: |
|
|
 Novice
Joined: 05 Jan 2012 Posts: 10 Location: Kolkata, INDIA
|
Hi mqjeff,
Thanks for the reply. Yes, I can use a monitoring tool for this. But I just want to know that is there any other way possible to achieve this.
Thanks!
Soumen |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2012 5:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
soumen.smn wrote: |
I want to count the exact no of this. |
Then you either need to adopt the suggestion of my most worthy associate & purchase a monitoring tool to do this (or have whoever runs the monitoring tool your site already owns configure it to do this) or you need to amend amqsmon (which isn't a command it's a sample) to provide what you want. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 16, 2012 5:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
soumen.smn wrote: |
But I just want to know that is there any other way possible to achieve this. |
Sure, there are lots of ways.
Most of them aren't very good ways.
The problem in general is that you need to gather data periodically and then accumulate it over time. |
|
Back to top |
|
 |
soumen.smn |
Posted: Wed May 16, 2012 5:59 am Post subject: |
|
|
 Novice
Joined: 05 Jan 2012 Posts: 10 Location: Kolkata, INDIA
|
Thanks Vitor. I have used amqsmon and got GetCount (Description: The number of successful destructive MQGET calls for persistent and nonpersistent messages) and PutCount (Description: The number of persistent and nonpersistent messages successfully put to the queue). After running this sample for a couple of times, I found the data are not matching with my testing result. Sometimes it is showing some value and sometime not.
eg.
QueueName: 'MYQUEUE'
CreateDate: '2012-04-27'
CreateTime: '15.53.45'
QueueType: Predefined
QueueDefinitionType: Local
OpenCount: 1
OpenDate: '2012-05-15'
OpenTime: '17.43.55'
CloseCount: 0
PutCount: [0, 0]
PutFailCount: 0
Put1Count: [0, 0]
Put1FailCount: 0
PutBytes: [0, 0]
PutMinBytes: [0, 0]
PutMaxBytes: [0, 0]
GetCount: [0, 0]
GetFailCount: 380
GetBytes: [0, 0]
GetMinBytes: [0, 0]
GetMaxBytes: [0, 0]
BrowseCount: [0, 0]
BrowseFailCount: 0
BrowseBytes: [0, 0]
BrowseMinBytes: [0, 0]
BrowseMaxBytes: [0, 0]
GeneratedMsgCount: 0 |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2012 6:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
soumen.smn wrote: |
Sometimes it is showing some value and sometime not. |
That's why I called it a sample, and why IBM don't sell it as a monitoring tool for WMQ.
If it's not working the way you want (e.g. it doesn't show the values under all circumstances) then fix it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 16, 2012 6:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
soumen.smn wrote: |
Thanks Vitor. I have used amqsmon and got GetCount (Description: The number of successful destructive MQGET calls for persistent and nonpersistent messages) and PutCount (Description: The number of persistent and nonpersistent messages successfully put to the queue). After running this sample for a couple of times, I found the data are not matching with my testing result. Sometimes it is showing some value and sometime not.
|
Have you considered doing the proper research to understand the meaning of the data that amqsmon is returning to you, to better understand why it behaves the way it does? |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed May 16, 2012 6:11 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
soumen.smn wrote: |
... After running this sample for a couple of times, I found the data are not matching with my testing result. Sometimes it is showing some value and sometime not. |
What value is it showing sometime, and sometime not?
Have you read the WMQ Performance manual (or the InfoCenter equivalent)? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2012 6:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Have you considered doing the proper research to understand the meaning of the data that amqsmon is returning to you, to better understand why it behaves the way it does? |
Or using the sample as a basis to produce something that behaves the way you want? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 16, 2012 9:47 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you thought about turning message flow statistics on and subscribing to them?
You get (per interval) the number of invocations of the flow. This will alas also include duplicate invocations due to a rollback being forced by the flow... Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
soumen.smn |
Posted: Thu May 17, 2012 12:47 am Post subject: |
|
|
 Novice
Joined: 05 Jan 2012 Posts: 10 Location: Kolkata, INDIA
|
Yes, I have gone through the infocenter docs. After that I have turned on the MQ Statistics and Accounting option. Then I have tried to run the sample amqsmon.
Yes fjb_saper, you are right. I think I have to collect all the data of per interval from SYSTEM.ADMIN.ACCOUNTING.QUEUE and SYSTEM.ADMIN.STATISTICS.QUEUE using 'amqsmon' and then try to work on that.
Thanks to all of you for your valuable suggestions. _________________ Thanks!
Soumen |
|
Back to top |
|
 |
zpat |
Posted: Thu May 17, 2012 1:57 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
IBM need to finish the job and provide a simple GUI tool as standard. It's unrealistic to keep saying people should purchase one.
However support pac MS0P may do what you want. |
|
Back to top |
|
 |
|