Stats Dump Tool

This page lists the usage info for the Talon stats dump tool.

This tool can read a binary transaction log containing XVM heartbeats emitted by a Talon XVM and write them out in a human readable format. Computing and tracing statistics from the running application process results in CPU overhead and garbage. As a lower cost alternative, Talon XVM can be configured to log its XVM heartbeats to a transaction log, and this tool can be used to compute and trace the binary stats in a separate process (possibly on another host).

Since 3.4: Up until the 3.4 release the StatsDumpTool was maintained in GitHub. This was done to make it easier to keep the tool up to date with new stats added to the platform.

Overview

Each heartbeat message includes the following stats:

System Stats:

  • Basic information - Server/hostname and process PID

  • GC stats - Heap size and collection time

  • JIT Information

  • System load average

  • Thread count

  • Thread stats

  • Pool stats

Application Stats:

  • Engine

  • User stats

  • Event Multiplexer

  • Store binding

  • Store binding persister

  • Store binding ICR sender

  • Bus binding stats

The platform allows fairly granular control over which portions of the above stats are collected to provide the ability to control the associated overhead with collecting them. See AEP Engine Statistics for information on enabling collection of these statistics.

Basic Usage

Requirement: In order to use this tool, Binary Heartbeat Logging must have been enabled on the microservice in question. Even if you have enabled stats collection, but did not enable the heartbeat logging, you will not be able to retrieve said statistics at a later date.

Running the Tool

From a distribution

From a jar only distribution

Querying records within a time range

You can query for records in a time range by specifying --startDate or --endDate or both:

  • If only --startDate is specified, stats records are dumped from startDate to the end of the file is reached

  • If only --endDate is specified, stats records are dumped from beginning of the file till the endDate

  • If both --startDate and --endDate are specified, stats are dumped in between the given start and end dates

The format for specifying the timestamps used with --startDate and --endDate is yyyy-MM-dd HH:mm:ss.

Tip: Be careful when specifying these timestamps! Leading/trailing spaces or additional spaces between date and time block might cause them to not be parsed correctly.

Examples

All records

Here is the output of running the stats dump tool on a sample transaction log file:

The output shows that the tool has read 2,619 records and written them to the output file (stats.txt). Note that the output file is created in the same directory as the input file.

All records within a date range

Here is an example of how using --startDate can be used filter out records.

Notice that because we specified --startDate here, only 99 records are written (of the 2,619 records in the transaction log).

You can further filter records by specifying a time range with a particular --startDate and --endDate. In the example below we are querying records starting between "2016-01-27 00:00:00" and "2016-01-27 01:26:39":

Notice only 8 records are written to the output file.

  • [Configure Heartbeat Logging] (../../../developing-applications/configuring-the-runtime/monitoring/xvm-heartbeats.md#binary-logging-configuration) - Configure Heartbeat Logging

  • Heartbeat Tracing - Output metrics in heartbeats to trace log

  • AEP Engine Statistics - Engine metrics collected in heartbeats

  • Exposing Application Stats - Custom statistics included in heartbeats

Next Steps

  1. Enable binary heartbeat logging in your XVM configuration

  2. Run your application and collect heartbeat data

  3. Use Stats Dump Tool to convert binary logs to human-readable format

  4. Analyze statistics to identify performance trends or issues

Last updated