+

Search Tips | Advanced Search

Configure central collection of application activity trace information

An application activity trace message is a PCF message. You configure activity trace using a configuration file. To configure central collection of application activity trace information, you set the ACTVTRC queue manager attribute. We can override this setting at connection level using MQCONNX options, or at application stanza level using the activity trace configuration file.


About this task

Activity trace messages are composed of an MQMD structure: a PCF (MQCFH) header structure, followed by a number of PCF parameters. A sequence of ApplicationTraceData PCF groups follows the PCF parameters. These PCF groups collect information about the MQI operations that an application performs while connected to a queue manager. You configure activity trace using a configuration file called mqat.ini.

To control whether or not application activity trace information is collected, you configure one or more of the following settings:
  1. The ACTVTRC queue manager attribute.
  2. The ACTVCONO settings (in the MQCNO structure passed in MQCONNX).
  3. The matching stanza for the application in the activity trace configuration file mqat.ini.

The previous sequence is significant. The ACTVTRC attribute is overridden by the ACTVCONO settings, which are overridden by the settings in the mqat.ini file. Trace entries are written after each operation has completed, unless otherwise stated. These entries are first written to the system queue SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE, then written to application activity trace messages when the application disconnects from the queue manager. For long running applications, intermediate messages are written if any of the following events occurs:

  • The lifetime of the connection reaches a defined timeout value.
  • The number of operations reaches a specified number.
  • The amount of data collected in memory reaches the maximum message length allowed for the queue.

You set the timeout value using the ActivityInterval parameter. You set the number of operations using the ActivityCount parameter. Both parameters are specified in the activity trace configuration file mqat.ini.

Enable application activity trace can affect performance. The overhead can be reduced by tuning the ActivityCount and the ActivityInterval settings. See Tuning the performance impact of application activity trace.

The simplest way to view the contents of application activity trace messages is to use the amqsact sample program.

  • Set ACTVTRC to control collection of activity trace information
    Use the queue manager attribute ACTVTRC to control the collection of MQI application activity trace information
  • Set MQCONNX options to control collection of activity trace information
    If the queue manager attribute ACTVCONO is set to ENABLED, we can use the ConnectOpts parameter on the MQCONNX call to enable or disable application activity reports on a per connection basis. These options override the activity trace behavior defined by the queue manager attribute ACTVTRC, and can be overridden by settings in the activity trace configuration file mqat.ini.
  • Configure activity trace behavior using mqat.ini
    Activity trace behavior is configured using a configuration file called mqat.ini. This file is used to define the level and frequency of reporting activity trace data. The file also provides a way to define rules to enable and disable activity trace based on the name of an application.
  • Tuning the performance impact of application activity trace
    Enabling application activity trace can incur a performance penalty. This can be reduced by only tracing the applications that we need, by increasing the number of applications draining the queue, and by tuning ActivityInterval, ActivityCount and TraceLevel in mqat.ini.
  • amqsact sample program
    amqsact formats Application Activity Trace messages for you and is provided with IBM MQ.

Parent topic: Application activity trace

Last updated: 2020-10-04