This example shows an XML publication that contains message flow accounting and statistics data.
The MQInput node's Out terminal is connected to the OUTQueue node. The MQInput node's Failure terminal is connected to the FAILQueue node.
During the interval for which statistics have been collected, this message flow processed no messages.
A publication that is generated for this data always includes the appropriate folders, even if there is no current data.
mqsichangeflowstats MQ02BRK -s -c active -e default -f XMLFlow -n advanced -t basic -b basic -o xml
Blank lines have been added between folders to improve readability.
The broker takes information about statistics and accounting from the operating system. On some operating systems, such as Windows, UNIX, and Linux, rounding can occur because the system calls that are used to determine the processor times are not sufficiently granular. This rounding might affect the accuracy of the data.
The following example is the subscription message. The <psc> and <mcd> elements are part of the RFH header.
<psc>
<Command>Publish</Command>
<PubOpt>RetainPub</PubOpt>
<Topic>$SYS/Broker/MQ02BRK/StatisticsAccounting/SnapShot/default/XMLflow
</Topic>
</psc>
<mcd>
<Msd>xml</Msd>
</mcd>
The following example is the publication that the broker generates:
<WMQIStatisticsAccounting RecordType="SnapShot" RecordCode="Snapshot">
<MessageFlow BrokerLabel="MQ02BRK"
BrokerUUID="7d951e31-f200-0000-0080-efe1b9d849dc"
ExecutionGroupName="default"
ExecutionGroupUUID="77cf1e31-f200-0000-0080-efe1b9d849dc"
MessageFlowName="XMLflow" StartDate="2003-01-17"
StartTime="14:44:34.581320" EndDate="2003-01-17" EndTime="14:44:44.582926"
TotalElapsedTime="0"
MaximumElapsedTime="0" MinimumElapsedTime="0" TotalCPUTime="0"
MaximumCPUTime="0"MinimumCPUTime="0" CPUTimeWaitingForInputMessage="685"
ElapsedTimeWaitingForInputMessage="10001425" TotalInputMessages="0"
TotalSizeOfInputMessages="0" MaximumSizeOfInputMessages="0"
MinimumSizeOfInputMessages="0" NumberOfThreadsInPool="1"
TimesMaximumNumberOfThreadsReached="0" TotalNumberOfMQErrors="0"
TotalNumberOfMessagesWithErrors="0" TotalNumberOfErrorsProcessingMessages="0"
TotalNumberOfTimeOutsWaitingForRepliesToAggregateMessages="0"
TotalNumberOfCommits="0" TotalNumberOfBackouts="0" AccoutingOrigin="DEPT1"/>
<Threads Number="1">
<ThreadStatistics Number="5" TotalNumberOfInputMessages="0"
TotalElapsedTime="0" TotalCPUTime="0" CPUTimeWaitingForInputMessage="685"
ElapsedTimeWaitingForInputMessage="10001425" TotalSizeOfInputMessages="0"
MaximumSizeOfInputMessages="0" MinimumSizeOfInputMessages="0"/>
</Threads>
<Nodes Number="3">
<NodeStatistics Label="FAILQueue" Type="MQOutput" TotalElapsedTime="0"
MaximumElapsedTime="0" MinimumElapsedTime="0" TotalCPUTime="0"
MaximumCPUTime="0" MinimumCPUTime="0" CountOfInvocations="0"
NumberOfInputTerminals="1" NumberOfOutputTerminals="2">
<TerminalStatistics Label="failure" Type="Output" CountOfInvocations="0"/>
<TerminalStatistics Label="in" Type="Input" CountOfInvocations="0"/>
<TerminalStatistics Label="out" Type="Output" CountOfInvocations="0"/>
</NodeStatistics>
<NodeStatistics Label="INQueue3" Type="MQInput" TotalElapsedTime="0"
MaximumElapsedTime="0" MinimumElapsedTime="0" TotalCPUTime="0"
MaximumCPUTime="0" MinimumCPUTime="0"CountOfInvocations="0"
NumberOfInputTerminals="0" NumberOfOutputTerminals="3">
<TerminalStatistics Label="catch" Type="Output" CountOfInvocations="0"/>
<TerminalStatistics Label="failure" Type="Output" CountOfInvocations="0"/>
<TerminalStatistics Label="out" Type="Output" CountOfInvocations="0"/>
</NodeStatistics>
<NodeStatistics Label="OUTQueue" Type="MQOutput" TotalElapsedTime="0"
MaximumElapsedTime="0" MinimumElapsedTime="0" TotalCPUTime="0"
MaximumCPUTime="0" MinimumCPUTime="0" CountOfInvocations="0"
NumberOfInputTerminals="1" NumberOfOutputTerminals="2">
<TerminalStatistics Label="failure" Type="Output" CountOfInvocations="0"/>
<TerminalStatistics Label="in" Type="Input" CountOfInvocations="0"/>
<TerminalStatistics Label="out" Type="Output" CountOfInvocations="0"/>
</NodeStatistics>
</Nodes>
</WMQIStatisticsAccounting>