hbdump

The Heartbeats Dump Tool (rumi tools hbdump) reads a binary transaction log containing container heartbeats and writes them out in human-readable format.

This tool provides a low-overhead way to collect and analyze application statistics. Computing and tracing statistics from the running application process results in CPU overhead and garbage. As a lower cost alternative, Rumi can be configured to log its container 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).

Overview

Each heartbeat message includes the following statistics:

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

Rumi 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

circle-info

Requirement: In order to use this tool, Binary Heartbeat Logging must have been enabled on the application 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.

Syntax:

Options:

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 until the end of the file is reached

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

  • If both --startDate and --endDate are specified, stats are dumped 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.

circle-info

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 heartbeats dump tool on a sample transaction log file:

Output:

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 to filter out records:

Output:

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":

Output:

Notice only 8 records are written to the output file.

Next Steps

  1. Enable binary heartbeat logging in your container configuration

  2. Run your application and collect heartbeat data

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

  4. Analyze statistics to identify performance trends or issues

Last updated