amqsact sample program
amqsact formats Application Activity Trace messages for you and is provided with IBM® MQ.
- On Linux® and UNIX platforms MQ_INSTALLATION_PATH/samp/bin
- On Windows MQ_INSTALLATION_PATH\tools\c\Samples\Bin
Display mode
By default, amqsact in display mode processes messages on SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE. You can override this behavior by specifying a queue name or topic string.
You can also control the trace period displayed and specify whether the activity trace messages are removed or retained after display.
Required parameters for display mode
- -m
QMgrName
- Name of the queue manager.
- -d
Depth
- Number of records to display.
- -w
Timeout
- Time to wait, in seconds. If no trace messages appear in the specified period, amqsact exits.
- -s
StartTime
- Start time of record to process.
- -e
EndTime
- End time of record to process.
Optional parameters for display mode
- -q
QName
- Specify a specific queue to override the default queue name
- -t
TopicString
- Subscribe to an event topic
- -b
- Browse records only
- -v
- Verbose output
Example output for display mode
amqsact -m TESTQM -v
MonitoringType: MQI Activity Trace
Correl_id:
00000000: 414D 5143 5445 5354 514D 2020 2020 2020 'AMQCTESTQM '
00000010: B5F6 4251 2000 E601 ' '
QueueManager: 'TESTQM'
Host Name: 'ADMINIB-1VTJ6N1'
IntervalStartDate: '2014-03-15'
IntervalStartTime: '12:08:10'
IntervalEndDate: '2014-03-15'
IntervalEndTime: '12:08:10'
CommandLevel: 750
SeqNumber: 0
ApplicationName: 'IBM MQ_1\bin\amqsput.exe'
Application Type: MQAT_WINDOWS_7
ApplicationPid: 14076
UserId: 'Emma_Bushby'
API Caller Type: MQXACT_EXTERNAL
API Environment: MQXE_OTHER
Application Function: ''
Appl Function Type: MQFUN_TYPE_UNKNOWN
Trace Detail Level: 2
Trace Data Length: 0
Pointer size: 4
Platform: MQPL_WINDOWS_7
MQI Operation: 0
Operation Id: MQXF_CONN
ApplicationTid: 1
OperationDate: '2014-03-15'
OperationTime: '12:08:10'
ConnectionId:
00000000: 414D 5143 5445 5354 514D 2020 2020 2020 'AMQCTESTQM '
00000010: FFFFFFB5FFFFFFF6 4251 2000 FFFFFFE601 ' '
QueueManager: 'TESTQM'
Completion Code: MQCC_OK
Reason Code: 0
Dynamic mode
Dynamic mode applies only when using IBM MQ Appliance.
You enable dynamic mode by specifying an application name, a channel name, or a connection identifier as an argument to amqsact. Note that you can use wildcard characters in the name.
In dynamic mode, activity trace data is enabled at the start of the sample by use of a nondurable subscription to a system topic. Collecting activity trace data stops when amqsact stops. You must specify a timeout for amqsact in dynamic mode. You can run multiple copies of amqsact concurrently, with each instance receiving a copy of any activity trace data.
Required parameters for dynamic mode
- -m
QMgrName
- Name of the queue manager.
- -w
Timeout
- Time to wait, in seconds. If no trace messages appear in the specified period, amqsact exits.
Optional parameters for dynamic mode
- -a
Application name
- Specify an application name to collect messages for
- -c
Channel name
- Specify a channel to collect messages for
- -i
Connection ID
- Specify a connection to collect messages for.
- -v
- Verbose output
Example output for dynamic mode
amqs. After 30 seconds of inactivity, the amqsact program ends, and no new activity trace data is generated.
amqsactc -m QMGR1 -w 30 -a amqs*
amqsactc -m QMGR1 -w 10 -c QMGR1.TO.QMGR2
amqsactc -m QMGR1 -w 60 -i 414D5143514D475231202020202020206B576B5420000701 -v