Author |
Message
|
krypton |
Posted: Thu Nov 08, 2018 7:25 am Post subject: Reset "MSGS" attribute in channel status |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
Hi All,
is there a MQSC command to reset the "Msgs" attribute to 0 in channel status.
I think it can be done by restarting the Queue Manager, but due to live environment we are not restarting the queue manager.
Is there another way to reset this parameter? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Nov 08, 2018 8:07 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
krypton |
Posted: Thu Nov 08, 2018 8:28 am Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
Hi Bruce,
I want to reset it to 0 before the start of day so that end of day we know how many messages went through this sender channel.
Another way, i can just note down what is the current number in Msgs attribute and subtract that from the count at the end of day.
But, i was looking for a clean way, where i don't have to do this subtraction.
_________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
exerk |
Posted: Thu Nov 08, 2018 9:14 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
krypton wrote: |
...I want to reset it to 0 before the start of day so that end of day we know how many messages went through this sender channel... |
Any of your channels are set to NPMSPEED(FAST)? Any of your channels likely to have so many messages down them that the counter will wrap? _________________ 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 |
|
 |
bruce2359 |
Posted: Thu Nov 08, 2018 10:09 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
krypton wrote: |
But, i was looking for a clean way, where i don't have to do this subtraction. |
Write a short shell script (launched by cron or some other automation) that displays channel status MSGS, then saves the value in a file. The script can do the math, subtracting the previous MSGS value from the current MSGS value. Voila! _________________ 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 |
|
 |
hughson |
Posted: Sun Nov 11, 2018 3:24 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
The number of MSGS a SDR channel has sent counts from the time the channel started.
Therefore, if you want to "reset" the number of MSGS to zero, you can STOP and reSTART the channel.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Nov 11, 2018 3:54 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Note that the channel status attributes that count messages, bytes etc. can wrap when they exceed their integer representation capacity. _________________ Glenn |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 12, 2018 5:41 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Stopping and restarting a channel is a poor business solution for determining message rates. After all, stopping the channel stops message flow. Better you should brush up on basic math skills. _________________ 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 |
|
 |
krypton |
Posted: Mon Nov 12, 2018 6:52 am Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
hughson wrote: |
The number of MSGS a SDR channel has sent counts from the time the channel started.
Therefore, if you want to "reset" the number of MSGS to zero, you can STOP and reSTART the channel.
Cheers,
Morag |
Thanks again Morag for the reply, as restarting channel in PROD environment is not a good idea, I would stick to manually calculating the difference in Channel count. _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
krypton |
Posted: Mon Nov 12, 2018 6:56 am Post subject: |
|
|
 Disciple
Joined: 14 Mar 2010 Posts: 186
|
exerk wrote: |
krypton wrote: |
...I want to reset it to 0 before the start of day so that end of day we know how many messages went through this sender channel... |
Any of your channels are set to NPMSPEED(FAST)? Any of your channels likely to have so many messages down them that the counter will wrap? |
Hi Exerk, we do not have that many messages to cause the counter to wrap. _________________ Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep. |
|
Back to top |
|
 |
exerk |
Posted: Mon Nov 12, 2018 6:58 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
krypton wrote: |
exerk wrote: |
krypton wrote: |
...I want to reset it to 0 before the start of day so that end of day we know how many messages went through this sender channel... |
Any of your channels are set to NPMSPEED(FAST)? Any of your channels likely to have so many messages down them that the counter will wrap? |
Hi Exerk, we do not have that many messages to cause the counter to wrap. |
And NPMSPEED? _________________ 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 |
|
 |
gbaddeley |
Posted: Mon Nov 12, 2018 3:17 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
krypton wrote: |
hughson wrote: |
The number of MSGS a SDR channel has sent counts from the time the channel started.
Therefore, if you want to "reset" the number of MSGS to zero, you can STOP and reSTART the channel.
Cheers, Morag |
Thanks again Morag for the reply, as restarting channel in PROD environment is not a good idea, I would stick to manually calculating the difference in Channel count. |
If a channel goes inactive due to exceeding its disconnect interval, it will lose its MSGS count. Next time the channel starts, MSGS will commence at zero. Therefore if you are periodically sampling the channel status and calculating differences, it will underestimate the number of messages, or produce negative values. _________________ Glenn |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 12, 2018 5:56 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quite a few of my clients have altered their channel defs so that they never disconnect.
But this MSGS approach is fraught with the possibility of producing incorrect counts.
Will management depend on the quality of the count data captured this way? I wouldn't. _________________ 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 |
|
 |
hughson |
Posted: Mon Nov 12, 2018 7:45 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
bruce2359 wrote: |
But this MSGS approach is fraught with the possibility of producing incorrect counts. |
Instead of relying on sampling the number reported by DISPLAY CHSTATUS(*) MSGS which may be reset as described above, you could instead collect channel statistics. Then you will never miss any messages in your total.
Read more in IBM Knowledge Center at Statistics messages
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|