Starting collection of message flow statistics and accounting data

You can start collecting snapshot accounting and statistics data for your message flows by using the web user interface or the mqsichangeflowstats command.

Before you begin

About this task

You can start collecting accounting and statistics data for one or more active message flows by using one of the following methods:

Note: If you want to view message flow statistics by using the web user interface, you must either start the collection of statistics by using the web user interface, or you must specify JSON as one of the output formats when you start the collection of statistics by using the mqsichangeflowstats command.

Starting collection of message flow statistics by using the web user interface

Procedure

  1. Start the web user interface for your integration node; see Accessing the web user interface.
    The navigator is displayed on the left side of the pane, showing the servers (integration servers), message flows, and other resources that are owned by your integration node.
  2. In the navigator, find the resource for which you want to collect message flow statistics.
    You can collect statistics data for all message flows in an integration server or an application, or for an individual message flow.
  3. Click the down arrow next to the resource to display the menu, and then click Statistics on.

Results

Statistics collection is started for the selected message flows, and an up-to-date snapshot of information is collected every twenty seconds

What to do next

You can view the snapshot data in the web user interface. For more information, see Viewing message flow statistics and accounting data.

Starting collection of message flow statistics by using the mqsichangeflowstats command

Procedure

If you use the mqsichangeflowstats command to start statistics collection and specify the required output formats, the specified formats replace the output formats that were previously being emitted for the message flow (they are not added to them). If you use the mqsichangeflowstats command to start the collection of statistics, without specifying an output format on the command, the statistics data is emitted to the user trace log by default.

Select the granularity of the data that you want to be collected by specifying the appropriate parameters on the mqsichangeflowstats command. You must request statistics collection on an integration node basis. If you want to collect information for more than one integration node, you must issue the corresponding number of commands.

To start collecting message flow accounting and statistics data:

  1. Identify the integration node for which you want to collect statistics.
  2. Decide the resource for which you want to collect statistics.
    You can collect statistics for a specific integration server, or for all integration servers for the specified integration node.
    • If you indicate a specific integration server, you can request that data is recorded for a specific message flow or all message flows in that group.
    • If you specify all integration servers, you must specify all message flows.
  3. Decide whether you want to collect thread-related statistics.
  4. Decide whether you want to collect node-related statistics.
    If you do, you can also collect information about terminals for the nodes.
  5. Decide whether you want to associate data collection with a particular accounting origin.
    This option is valid for snapshot and archive data, and for message flows and integration servers. However, when active, you must set its origin value in each message flow to which it refers. If you do not configure the participating message flows to set the appropriate origin identifier, the data that is collected for that message flow is collected with the origin set to Anonymous.

    For more information, see Setting message flow accounting and statistics accounting origin.

  6. Decide the target destination. You can choose multiple destinations by specifying multiple comma-separated values for the output format property.
    • User trace log (the default setting). The output data can be processed by using mqsireadlog and mqsiformatlog.
    • XML format publication message. If you chose this target destination, register the following topic for the subscriber:
      • For publications on an MQ pub/sub broker:
        $SYS/Broker/integrationNodeName/StatisticsAccounting/recordType/integrationServerName/messageFlowLabel
      • For publications on an MQTT pub/sub broker:
        IBM/IntegrationBus/integrationNodeName/StatisticsAccounting/recordType/integrationServerName/messageFlowLabel

      where integrationNodeName, integrationServerName, and messageFlowLabel represent the integration node, integration server, and message flow on which you want to receive data. recordType is the type of data collection on which you want to receive publications (SnapShot, Archive, or the topic wildcard "+" to receive both). The value that you specify for record type is case-sensitive; therefore, if you choose to receive snapshot data, set the record type to SnapShot.

    • JSON publication message. Register the following topic for the subscriber:
      • For publications on an MQ pub/sub broker:
        $SYS/Broker/integrationNodeName/Statistics/JSON/recordType/integrationServerName/applications/application_name/libraries/library_name/messageflows/message_flow_name
      • For publications on an MQTT pub/sub broker:
        IBM/IntegrationBus/integrationNodeName/Statistics/JSON/recordType/integrationServerName/applications/application_name/libraries/library_name/messageflows/message_flow_name

      where integrationNodeName, integrationServerName, application_name, library_name, and message_flow_name represent the integration node, integration server, application, library, and message flow on which you want to receive data. recordType is the type of data collection on which you want to receive publications (SnapShot, Archive, or the topic wildcard "+" to receive both). The value that you specify for record type is case-sensitive; therefore, if you choose to receive snapshot data, set the record type to SnapShot.

    • z/OS platformSMF (on z/OS® only)

  7. Decide the type of data collection that you want:
    • Snapshot
    • Archive

    You can collect snapshot and archive data at the same time, but you must configure them separately.

  8. Issue the mqsichangeflowstats command with the appropriate parameters to reflect the decisions that you made.

    For example, to turn on snapshot data for all message flows in the default integration server for TESTNODE, and include node data with the basic message flow statistics, use the following command:

    mqsichangeflowstats TESTNODE -s -e default -j -c active -n basic    

    z/OS platformUsing SDSF on z/OS, enter:

    /F TESTNODE,cs s=yes,e=default,j=yes,c=active,n=basic    

    For more examples, see mqsichangeflowstats command.

Results

When the command completes successfully, data collection for the specified resources is started:

  • If you requested snapshot data, information is collected for approximately 20 seconds, and the results are written to the specified output.
  • If you requested archive data, information is collected for the interval that is defined for the integration node (on the mqsicreatebroker or mqsichangebroker command, or by the external timer facility ENF). The results are written to the specified output, the interval is reset, and data collection starts again.

What to do next