RESET QSTATS on z/OS

Use the MQSC command RESET QSTATS to report performance data for a queue and then to reset that data.


Use MQSC commands

For information on how we use MQSC commands, see Performing local administration tasks using MQSC commands.

We can issue this command from sources 2CR. For an explanation of the source symbols, see Sources from which we can issue MQSC commands on z/OS .

Synonym: None RESET QSTATS ( generic-qname ) CMDSCOPE(' ')CMDSCOPE(qmgr-name)1CMDSCOPE(*)1Notes:

  • 1 Valid only when the queue manager is a member of a queue sharing group.


Usage notes for RESET QSTATS

  1. If there is more than one queue with a name that satisfies the generic q-name, all those queues are reset.
  2. Issue this command from an application, and not the z/OS console or its equivalent, to ensure that the statistical information is recorded.
  3. The following information is kept for all queues, both private and shared. For shared queues each queue manager keeps an independent copy of the information:

      MSGIN
      Incremented each time a message is put to the shared queue

      MSGOUT
      Incremented each time a message is removed from the shared queue

      HIQDEPTH
      Calculated by comparing the current value for HIQDEPTH held by this queue manager with the new queue depth obtained from the coupling facility during every put operation. The depth of the queue is affected by all queue managers putting messages to the queue or getting messages from it.

    To retrieve the information and obtain full statistics for a shared queue, specify CMDSCOPE(*) to broadcast the command to all queue managers in the queue sharing group.

    The peak queue depth approximates to the maximum of all the returned HIQDEPTH values, the total MQPUT count approximates to the sum of all the returned MSGIN values, and the total MQGET count approximates to the sum of all the returned MSGOUT values.

  4. If the PERFMEV attribute of the queue manager is DISABLED, the command fails.


Parameter descriptions for RESET QSTATS

    generic-qname
    The name of the local queue with a disposition of QMGR, COPY, or SHARED, but not GROUP, with performance data that is to be reset.

    A trailing asterisk (*) matches all queues with the specified stem followed by zero or more characters. An asterisk (*) on its own specifies all queues.

    The performance data is returned in the same format as parameters returned by DISPLAY commands. The data is:

      QSTATS
      The name of the queue

      QSGDISP
      The disposition of the queue, that is, QMGR, COPY, or SHARED.

      RESETINT
      The number of seconds since the statistics were last reset.

      HIQDEPTH
      The peak queue depth since the statistics were last reset.

      MSGSIN
      The number of messages that have been added to the queue by MQPUT and MQPUT1 calls since the statistics were last reset.

      The count includes messages added to the queue in units of work that have not yet been committed, but the count is not decremented if the units of work are later backed out. The maximum displayable value is 999 999 999; if the number exceeds this value, 999 999 999 is displayed.

      MSGSOUT
      The number of messages removed from the queue by destructive (non-browse) MQGET calls since the statistics were last reset.

      The count includes messages removed from the queue in units of work that have not yet been committed, but the count is not decremented if the units of work are subsequently backed out. The maximum displayable value is 999 999 999; if the number exceeds this value, 999 999 999 is displayed.

    CMDSCOPE
    This parameter specifies how the command runs when the queue manager is a member of a queue sharing group.

      ' '
      The command runs on the queue manager on which it was entered. This is the default value.

      qmgr-name
      The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

      We can specify a queue manager name, other than the queue manager on which the command was entered, only if we are using a queue sharing group environment and if the command server is enabled.

      *
      The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group. The effect of this is the same as entering the command on every queue manager in the queue sharing group.


Example output

The following example, shows the output from the command on z/OS.
12.44.16 STC16696  CSQM201I !MQ13 CSQMDRTC  RESET QSTATS DETAILS  902   
   902             QSTATS(CICS01.INITQ)                                 
   902             QSGDISP(QMGR)                                        
   902             RESETINT(43)                                         
   902             HIQDEPTH(0)                                          
   902             MSGSIN(0)                                            
   902             MSGSOUT(0)                                           
   902              END QSTATS DETAILS                                  
12.44.16 STC16696  CSQM201I !MQ13 CSQMDRTC  RESET QSTATS DETAILS  903   
   903             QSTATS(MQ13.DEAD.QUEUE)                              
   903             QSGDISP(QMGR)                                        
   903             RESETINT(43)                                         
   903             HIQDEPTH(0)                                          
   903             MSGSIN(0)                                            
   903             MSGSOUT(0)                                           
   903              END QSTATS DETAILS                                  
12.44.16 STC16696  CSQM201I !MQ13 CSQMDRTC  RESET QSTATS DETAILS  904   
   904             QSTATS(SYSTEM.ADMIN.ACTIVITY.QUEUE)                  
   904             QSGDISP(QMGR)                                        
   904             RESETINT(43)                                         
   904             HIQDEPTH(0)                                          
   904             MSGSIN(0)                                            
   904             MSGSOUT(0)                          
Parent topic: MQSC commands