Topic
2 replies Latest Post - ‏2013-03-12T16:34:01Z by SystemAdmin
mortenb
mortenb
19 Posts
ACCEPTED ANSWER

Pinned topic MessageCounter on queue

‏2013-03-06T08:57:06Z |
Hi all

Is there a global counter on a queue counting the number of messages that goes through the queue?
I like to probe the number each day and then take the diff to see how many messages have been processed that day.

We probe queuedepth and maxqueuedepth fine:

$ ./MQinfo.pl --s=192.168.1.38 --channel=server --qm=mqmbj --q=mqiih.queue --port=6666 --val=
"CurrentQDepth MaxQDepth" CurrentQDepth=2970 MaxQDepth=10000


I have the following variables I can probe but none seem to give me a counternumber. Many do not work.
I connect via a client using libmqc.so using MQv6 v7 on linux.

Below is a list of the following keys I've probed, but none seem to give me that info:
(MQIA_MSG_DEQ_COUNT and MQIA_MSG_ENQ_COUNT are not defined)

Key                         Macro ===                         ===== AlterationDate              MQCA_ALTERATION_DATE, AlterationTime              MQCA_ALTERATION_TIME, BackoutRequeueName          MQCA_BACKOUT_REQ_Q_NAME, BackoutThreshold            MQIA_BACKOUT_THRESHOLD, BaseQName                   MQCA_BASE_Q_NAME, BaseType MQIA_BASE_TYPE, CFStructure                 MQCA_CF_STRUC_NAME, CLWLQueuePriority           MQIA_CLWL_Q_PRIORITY, CLWLQueueRank               MQIA_CLWL_Q_RANK, CLWLUseQ                    MQIA_CLWL_USEQ, ClusterDate                 MQCA_CLUSTER_DATE, ClusterName                 MQCA_CLUSTER_NAME, ClusterNamelist             MQCA_CLUSTER_NAMELIST, ClusterQMgrName             MQCA_CLUSTER_Q_MGR_NAME, ClusterQType                MQIA_CLUSTER_Q_TYPE, ClusterTime                 MQCA_CLUSTER_TIME, CreationDate                MQCA_CREATION_DATE, CreationTime                MQCA_CREATION_TIME, CurrentQDepth               MQIA_CURRENT_Q_DEPTH, DefBind                     MQIA_DEF_BIND, DefinitionType              MQIA_DEFINITION_TYPE, DefInputOpenOption          MQIA_DEF_INPUT_OPEN_OPTION, DefPersistence              MQIA_DEF_PERSISTENCE, DefPriority                 MQIA_DEF_PRIORITY, DefPutResponse              MQIA_DEF_PUT_RESPONSE_TYPE, DefReadAhead                MQIA_DEF_READ_AHEAD, DistLists                   MQIA_DIST_LISTS, HardenGetBackout            MQIA_HARDEN_GET_BACKOUT, HighQDepth                  MQIA_HIGH_Q_DEPTH, InhibitGet                  MQIA_INHIBIT_GET, InhibitPut                  MQIA_INHIBIT_PUT, InitiationQName             MQCA_INITIATION_Q_NAME, MaxMsgLength                MQIA_MAX_MSG_LENGTH, MaxQDepth                   MQIA_MAX_Q_DEPTH, MsgDeliverySequence         MQIA_MSG_DELIVERY_SEQUENCE, MsgDeqCount                 MQIA_MSG_DEQ_COUNT, MsgEnqCount                 MQIA_MSG_ENQ_COUNT, NonPersistentMsgClass       MQIA_NPM_CLASS, OpenInputCount              MQIA_OPEN_INPUT_COUNT, OpenOutputCount             MQIA_OPEN_OUTPUT_COUNT, PageSetId                   MQIA_PAGESET_ID, ProcessName                 MQCA_PROCESS_NAME, PropertyControl             MQIA_PROPERTY_CONTROL, QDepthHighEvent             MQIA_Q_DEPTH_HIGH_EVENT, QDepthHighLimit             MQIA_Q_DEPTH_HIGH_LIMIT, QDepthLowEvent              MQIA_Q_DEPTH_LOW_EVENT, QDepthLowLimit              MQIA_Q_DEPTH_LOW_LIMIT, QDepthMaxEvent              MQIA_Q_DEPTH_MAX_EVENT, QDesc                       MQCA_Q_DESC, QMgrIdentifier              MQCA_Q_MGR_IDENTIFIER, QName                       MQCA_Q_NAME, QNames                      MQCACF_Q_NAMES, QueueAccounting             MQIA_ACCOUNTING_Q, QueueMonitoring             MQIA_MONITORING_Q, QueueStatistics             MQIA_STATISTICS_Q, QServiceInterval            MQIA_Q_SERVICE_INTERVAL, QServiceIntervalEvent       MQIA_Q_SERVICE_INTERVAL_EVENT, QType                       MQIA_Q_TYPE, RemoteQMgrName              MQCA_REMOTE_Q_MGR_NAME, RemoteQName                 MQCA_REMOTE_Q_NAME, RetentionInterval           MQIA_RETENTION_INTERVAL, Scope                       MQIA_SCOPE, Shareability                MQIA_SHAREABILITY, StorageClass                MQCA_STORAGE_CLASS, TimeSinceReset              MQIA_TIME_SINCE_RESET, TPipeNames                  MQCA_TPIPE_NAME, TriggerControl              MQIA_TRIGGER_CONTROL, TriggerData                 MQCA_TRIGGER_DATA, TriggerDepth                MQIA_TRIGGER_DEPTH, TriggerMsgPriority          MQIA_TRIGGER_MSG_PRIORITY, TriggerType                 MQIA_TRIGGER_TYPE, Usage                       MQIA_USAGE, XmitQName                   MQCA_XMIT_Q_NAME


Any feedback is very appriciated.
Also pointers to documentation if this needs to be set up explicitly.

Thanks
--
Morten Bjoernsvik, Developer, Evry CardService AS
Updated on 2013-03-12T16:34:01Z at 2013-03-12T16:34:01Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8524 Posts
    ACCEPTED ANSWER

    Re: MessageCounter on queue

    ‏2013-03-06T22:48:12Z  in response to mortenb
    I suggest that you read about "queue statistics" in the WMQ Infocenter.
  • SystemAdmin
    SystemAdmin
    8524 Posts
    ACCEPTED ANSWER

    Re: MessageCounter on queue

    ‏2013-03-12T16:34:01Z  in response to mortenb
    There isn't a counter that goes on forever - but there is a counter, as you have in fact already found - MQIA_MSG_ENQ_COUNT - that is reset each time it is reported.

    You can view this using Reset Queue Statistics which is a command that you could issue repeatedly - remember the data is reset each time you issue the command.

    You also get the same information in a Performance Event - Queue High, Queue Low, etc. if you have those enabled.

    Alternatively, you can capture statistics about your queue which are messages emitted every interval (you define how long the interval is) and the contents of those statistics messages include PutCount and Put1Count which would give you the enqueued count. See Queue statistics message data for details of the information you get in a statistics message if you enable it.

    Cheers
    Morag