Author |
Message
|
elfilana |
Posted: Wed Jul 19, 2017 6:28 pm Post subject: MQGET /MQPUT counting |
|
|
Newbie
Joined: 19 Jul 2017 Posts: 5
|
Hi all,
my objective is to trace the number of messages inserted and number of messages extracted from the same queue.
For example, between 09:00 AM and 09:05 AM , 100 message inserted / 80 messages extracted. So More PUT thant GET and so on ever F minutes a check is done
Thank you |
|
Back to top |
|
 |
exerk |
Posted: Thu Jul 20, 2017 1:46 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Research QSTATS. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
PaulClarke |
Posted: Thu Jul 20, 2017 3:58 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I assume that you mean the command RESET QSTATS. This is certainly the easiest option. There are two downsides that might be worth being aware of though.
Firstly the command is only available in PCF on Distributed platforms. For some reason that I never understood they didn't implement an MQSC flavour of it. You have both available on z/SO though. Secondly the command is destructive. By that I mean that issuing the command changes the answer next time. This is not really a problem if you are certain that you are the only one issuing the command but you need to be aware of whether other people/programs are using it.
However, that being said I use RESET QSTATS all the time. It is a very quick and easy way of seeing what activity is happening in your Queue Manager. I use it through MO71 which allows you to refresh the display after whatever interval you like.
Another possible solution is to look into Accounting and Statistics but that is a bit more involved.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 20, 2017 8:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
@elfilana
PaulClarke wrote: |
Another possible solution is to look into Accounting and Statistics but that is a bit more involved.
Cheers,
Paul. |
It really is more involved. Think about all the get calls that were rolled back, all the get calls that returned a 2033 , doubling up on get calls to resize the buffer... etc...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
elfilana |
Posted: Fri Jul 21, 2017 1:59 am Post subject: |
|
|
Newbie
Joined: 19 Jul 2017 Posts: 5
|
Hi all,
with runmqsc i 'm trying to use RESET, but i oundn't see QSTATS unders:
AMQ8426: Valid MQSC commands are:
RESET CHANNEL
RESET CLUSTER
RESET QMGR
help please
Best regards |
|
Back to top |
|
 |
PaulClarke |
Posted: Fri Jul 21, 2017 2:13 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
When I said
"Firstly the command is only available in PCF on Distributed platforms. For some reason that I never understood they didn't implement an MQSC flavour of it. "
that was a clue.
Regards,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jul 21, 2017 3:39 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You could also look at the queue depth and make some guesses based on the last message put and last message get times.
Or you could do something really efficient like change the queue to a topic, and have a subscriber that counts each message that it consumes. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
elfilana |
Posted: Mon Jul 24, 2017 1:14 am Post subject: |
|
|
Newbie
Joined: 19 Jul 2017 Posts: 5
|
Hi
Thank you all for your reply,
@mqjeff, please how to look at the queue depth and make some guesses based on the last message put and last message get times.?
i'm not expert in MQSeries So please it will be grateful if you help me
Best regards
Nabil |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jul 24, 2017 4:42 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
elfilana |
Posted: Thu Jul 27, 2017 11:01 am Post subject: Count MQGET and MQPUT |
|
|
Newbie
Joined: 19 Jul 2017 Posts: 5
|
Hello Bruce,
Thank you, but MQGET and MQPUT will be got only when one of the events will be reached,
what i'm looking for is , each 2 minutes, a trigger registers how many GET and PUT there is
is there a solution please ?
Thank you |
|
Back to top |
|
 |
exerk |
Posted: Thu Jul 27, 2017 12:34 pm Post subject: Re: Count MQGET and MQPUT |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
elfilana wrote: |
...what i'm looking for is , each 2 minutes, a trigger registers how many GET and PUT there is
is there a solution please ? |
Yes. There are a number of commercial tools available that will give you transaction monitoring, and therefore the number of PUT and GET operation, and put that into a database, from which you can mine that information. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
PaulClarke |
Posted: Thu Jul 27, 2017 12:37 pm Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
As we've said before I think one of the easiest solutions to this is to use the RESET QSTATS PCF command. You could either write a program to do it yourself or use a program, such as MO71, which will do it for you and display the data nicely in a list for you. If you would like to try MO71 then you can get a free 1-month trial licence by sending an email to support@mqgem.com
Cheers,
Paul _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
elfilana |
Posted: Fri Jul 28, 2017 7:15 am Post subject: Developing Program to retrieve MQGET MQPUT |
|
|
Newbie
Joined: 19 Jul 2017 Posts: 5
|
Hi Paul
Thank you for your reply, yes it is possible for me to develop a program but I don't know if I have to put a timer in my program in order to retrieve queue size or there is a way more better
Thank you
Nabil |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jul 28, 2017 8:28 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
You will need to write a program that comes to life every nn minutes, and MQINQ on whatever items you wish to interrogate, and then sleep until the next interval nn minutes. Every o/s offers some kind of timer capability - with sleep or wait primitives. _________________ 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: Fri Jul 28, 2017 9:39 am Post subject: Re: Developing Program to retrieve MQGET MQPUT |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
elfilana wrote: |
there is a way more better |
Yes there is a way more better:
PaulClarke wrote: |
use a program, such as MO71, which will do it for you and display the data nicely in a list for you. |
You're still talking about collecting the data; you still have to think about storage, display & analysis.
Paul has invented a very nice wheel, perfected over lo these many years, that's circular and give great mileage. There's no need for you to invent your own. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|