amqsmon (Display formatted monitoring information)

Use amqsmon to display the information contained within accounting and statistics messages in a formatted form. Accounting messages are read from the accounting queue, SYSTEM.ADMIN.ACCOUNTING.QUEUE. Statistics messages are read from the statistics queue, SYSTEM.ADMIN.STATISTICS.QUEUE.

 

Syntax


>>-amqsmon--+--------------+------------------------------------> '- -m QMgrName-' >-- -t --Type--+----------------------+--+------+---------------> +- -a -----------------+ '- -b -' + -i ConnectionId------+ + -c -+-------------+--+ | '-ChannelName-' | ' -q -+-----------+----' '-QueueName-' >--+-----------+--+-------------+--+---------------+------------> '- -d Depth-' '- -w TimeOut-' '- -s StartTime-' >--+-------------+--+------------------------+----------------->< '- -e EndTime-' | .-,-------------. | | V | | '- -l ---+-----------+-+-' '-Parameter-'

 

Required parameters

-t Type

The type of messages to process. Specify Type as one of the following:

accounting

Accounting records are processed. Messages are read from the system queue, SYSTEM.ADMIN.ACCOUNTING.QUEUE.

statistics

Statistics records are processed. Messages are read from the system queue, SYSTEM.ADMIN.STATISTICS.QUEUE.

 

Optional Parameters

-m QMgrName

The name of the queue manager from which accounting or statistics messages are to be processed.

If you do not specify this parameter, the default queue manager is used.

-a

Process messages containing MQI records only.

Only display MQI records. Messages not containing MQI records will always be left on the queue they were read from.

-q QueueName

QueueName is an optional parameter.
If QueueName is not supplied: Displays queue accounting and queue statistics records only.
If QueueName is supplied: Displays queue accounting and queue statistics records for the queue specified by QueueName only.

If

-b is not specified then the accounting and statistics messages from which the records came are discarded. Since accounting and statistics messages can also contain records from other queues, if

-b is not specified then unseen records can be discarded.

-c ChannelName

ChannelName is an optional parameter.
If ChannelName is not supplied: Displays channel statistics records only.
If ChannelName is supplied: Displays channel statistics records for the channel specified by ChannelName only.

If

-b is not specified then the statistics messages from which the records came are discarded. Since statistics messages can also contain records from other channels, if

-b is not specified then unseen records can be discarded.

This parameter is available when displaying statistics messages only, (-t statistics).

-i ConnectionId

Displays records related to the connection identifier specified by ConnectionId only.

This parameter is available when displaying accounting messages only, (-t accounting).

If

-b is not specified then the statistics messages from which the records came are discarded. Since statistics messages can also contain records from other channels, if

-b is not specified then unseen records can be discarded.

-b

Browse messages.

Messages are retrieved non-destructively.

-d Depth

The maximum number of messages that can be processed.

If you do not specify this parameter, then an unlimited number of messages can be processed.

-w TimeOut

Time maximum number of seconds to wait for a message to become available.

If you do not specify this parameter, amqsmon will end once there are no more messages to process.

-s StartTime

Process messages put after the specified StartTime only. StartTime is specified in the format

yyyy-mm-dd hh.mm.ss. If a date is specified without a time, then the time will default to

00.00.00 on the date specified. Times are in GMT.

For the effect of not specifying this parameter, see Note 1.

-e EndTime

Process messages put before the specified EndTime only.

The EndTime is specified in the format

yyyy-mm-dd hh.mm.ss. If a date is specified without a time, then the time will default to

23.59.59 on the date specified. Times are in GMT.

For the effect of not specifying this parameter, see Note 1.

-l Parameter

Only display the selected fields from the records processed. Parameter is a comma-separated list of integer values, with each integer value mapping to the numerical constant of a field, see amqsmon example 5.

If you do not specify this parameter, then all available fields are displayed.

Notes:

  1. If you do not specify -s StartTime or -e EndTime, then the messages that can be processed are not restricted by put time.

 

Examples

  1. The following command displays all MQI statistics messages from queue manager

    saturn.queue.manager:

    amqsmon -m saturn.queue.manager -t statistics -a

    The output from this command follows:

       RecordType: MQIStatistics
       QueueManager: 'saturn.queue.manager'
       IntervalStartDate: '2005-04-30'
       IntervalStartTime: '15.09.02'
       IntervalEndDate: '2005-04-30'
       IntervalEndTime: '15.39.02'
       CommandLevel: 600
       ConnCount: 23
       ConnFailCount: 0
       ConnHighwater: 8
       DiscCount: [17, 0, 0]
       OpenCount: [0, 80, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0]
       OpenFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       CloseCount: [0, 73, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
       CloseFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       InqCount: [4, 2102, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0]
       InqFailCount: [0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       SetCount: [0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
       SetFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       PutCount: [26, 1]
       PutFailCount: 0
       Put1Count: [40, 0]
       Put1FailCount: 0
       PutBytes: [57064, 12320]
       GetCount: [18, 1]
       GetBytes: [52, 12320]
       GetFailCount: 2254
       BrowseCount: [18, 60]
       BrowseBytes: [23784, 30760]
       BrowseFailCount: 9
       CommitCount: 0
       CommitFailCount: 0
       BackCount: 0
       ExpiredMsgCount: 0
       PurgeCount: 0

  2. The following command displays all queue statistics messages for queue

    LOCALQ on queue manager saturn.queue.manager:

    amqsmon -m saturn.queue.manager -t statistics -q LOCALQ

    The output from this command follows:

       RecordType: QueueStatistics
       QueueManager: 'saturn.queue.manager'
       IntervalStartDate: '2005-04-30'
       IntervalStartTime: '15.09.02'
       IntervalEndDate: '2005-04-30'
       IntervalEndTime: '15.39.02'
       CommandLevel: 600
       ObjectCount: 3
       QueueStatistics:
         QueueName: 'LOCALQ'
         CreateDate: '2005-03-08'
         CreateTime: '17.07.02'
         QueueType: Predefined
         QueueDefinitionType: Local
         QMinDepth: 0
         QMaxDepth: 18
         AverageQueueTime: [29827281, 0]
         PutCount: [26, 0]
         PutFailCount: 0
         Put1Count: [0, 0]
         Put1FailCount: 0
         PutBytes: [88, 0]
         GetCount: [18, 0]
         GetBytes: [52, 0]
         GetFailCount: 0
         BrowseCount: [0, 0]
         BrowseBytes: [0, 0]
         BrowseFailCount: 1
         NonQueuedMsgCount: 0
         ExpiredMsgCount: 0
         PurgedMsgCount: 0

  3. The following command displays all of the statistics messages recorded since 15:30 on 30 April 2005 from queue manager

    saturn.queue.manager.

    amqsmon -m saturn.queue.manager -t statistics -s "2005-04-30 15.30.00"
    The output from this command follows:

       RecordType: MQIStatistics
       QueueManager: 'saturn.queue.manager'
       IntervalStartDate: '2005-04-30'
       IntervalStartTime: '15.09.02'
       IntervalEndDate: '2005-04-30'
       IntervalEndTime: '15.39.02'
       CommandLevel: 600
       ConnCount: 23
       ConnFailCount: 0
       ConnHighwater: 8
       DiscCount: [17, 0, 0]
       OpenCount: [0, 80, 1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0]
         ... 
       RecordType: QueueStatistics
       QueueManager: 'saturn.queue.manager'
       IntervalStartDate: '2005-04-30'
       IntervalStartTime: '15.09.02'
       IntervalEndDate: '2005-04-30'
       IntervalEndTime: '15.39.02'
       CommandLevel: 600
       ObjectCount: 3
       QueueStatistics: 0
         QueueName: 'LOCALQ'
         CreateDate: '2005-03-08'
         CreateTime: '17.07.02'
         QueueType: Predefined
           ... 
       QueueStatistics: 1
         QueueName: 'SAMPLEQ'
         CreateDate: '2005-03-08'
         CreateTime: '17.07.02'
         QueueType: Predefined
           ... 

  4. The following command displays all accounting messages recorded on 30 April 2005 from queue manager

    saturn.queue.manager:

    amqsmon -m saturn.queue.manager -t accounting -s "2005-04-30" -e "2005-04-30"
    The output from this command follows:

       RecordType: MQIAccounting
       QueueManager: 'saturn.queue.manager'
       IntervalStartDate: '2005-04-30'
       IntervalStartTime: '15.09.29'
       IntervalEndDate: '2005-04-30'
       IntervalEndTime: '15.09.30'
       CommandLevel: 600
       ConnectionId: x'414d51435452455631202020202020208d0b3742010a0020'
       SeqNumber: 0
       ApplicationName: 'amqsput'
       ApplicationPid: 8572
       ApplicationTid: 1
       UserId: 'admin'
       ConnDate: '2005-03-16'
       ConnTime: '15.09.29'
       DiscDate: '2005-03-16'
       DiscTime: '15.09.30'
       DiscType: Normal
       OpenCount: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       OpenFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       CloseCount: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       CloseFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       PutCount: [1, 0]
       PutFailCount: 0
       PutBytes: [4, 0]
       GetCount: [0, 0]
       GetFailCount: 0
       GetBytes: [0, 0]
       BrowseCount: [0, 0]
       BrowseFailCount: 0
       BrowseBytes: [0, 0]
       CommitCount: 0
       CommitFailCount: 0
       BackCount: 0
       InqCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       InqFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       SetCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       SetFailCount: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
       
       RecordType: MQIAccounting
       QueueManager: 'saturn.queue.manager'
       IntervalStartDate: '2005-03-16'
       IntervalStartTime: '15.16.22'
       IntervalEndDate: '2005-03-16'
       IntervalEndTime: '15.16.22'
       CommandLevel: 600
       ConnectionId: x'414d51435452455631202020202020208d0b3742010c0020'
       SeqNumber: 0
       ApplicationName: 'runmqsc'
       ApplicationPid: 8615
       ApplicationTid: 1
           ... 

  5. The following command browses the accounting queue and displays the application name and connection identifier of every application for which MQI accounting information is available:

    amqsmon -m saturn.queue.manager -t accounting -b -a -l 7006,3024
    The output from this command follows:

       ConnectionId: x'414d51435452455631202020202020208d0b374203090020'
       ApplicationName: 'runmqsc'
    
       ConnectionId: x'414d51435452455631202020202020208d0b3742010a0020'
       ApplicationName: 'amqsput'
    
       ConnectionId: x'414d51435452455631202020202020208d0b3742010c0020'
       ApplicationName: 'runmqsc'
    
       ConnectionId: x'414d51435452455631202020202020208d0b3742010d0020'
       ApplicationName: 'amqsput'
    
       ConnectionId: x'414d51435452455631202020202020208d0b3742150d0020'
       ApplicationName: 'amqsget'
    
       5 Records Processed.