ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Reset "MSGS" attribute in channel status

Post new topic  Reply to topic
 Reset "MSGS" attribute in channel status « View previous topic :: View next topic » 
Author Message
krypton
PostPosted: Thu Nov 08, 2018 7:25 am    Post subject: Reset "MSGS" attribute in channel status Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Thu Nov 08, 2018 8:07 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

For what purpose? What issue/problem are you seeing?

From https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_status_channel.htm
Quote:
MSGS - The number of messages that have been sent or received (or, for server-connection channels, the number of MQI calls handled) since the channel was started.

_________________
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
View user's profile Send private message
krypton
PostPosted: Thu Nov 08, 2018 8:28 am    Post subject: Reply with quote

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.
bruce2359 wrote:
For what purpose? What issue/problem are you seeing?

From https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.explorer.doc/e_status_channel.htm
Quote:
MSGS - The number of messages that have been sent or received (or, for server-connection channels, the number of MQI calls handled) since the channel was started.

_________________
Dreams are not something which you watch when you are asleep,it is something which doesn't let you sleep.
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Nov 08, 2018 9:14 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Thu Nov 08, 2018 10:09 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
hughson
PostPosted: Sun Nov 11, 2018 3:24 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
gbaddeley
PostPosted: Sun Nov 11, 2018 3:54 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
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
View user's profile Send private message
bruce2359
PostPosted: Mon Nov 12, 2018 5:41 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
krypton
PostPosted: Mon Nov 12, 2018 6:52 am    Post subject: Reply with quote

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
View user's profile Send private message
krypton
PostPosted: Mon Nov 12, 2018 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Mon Nov 12, 2018 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message
gbaddeley
PostPosted: Mon Nov 12, 2018 3:17 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
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
View user's profile Send private message
bruce2359
PostPosted: Mon Nov 12, 2018 5:56 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
hughson
PostPosted: Mon Nov 12, 2018 7:45 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Reset "MSGS" attribute in channel status
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.