Collecting application activity trace information

An application activity trace message is a PCF message. You configure activity trace using a configuration file. To collect application activity trace information you set the ACTVTRC queue manager attribute. You 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.

Enabling 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.