babeltrace2-plugin-lttng-utils - Linux


babeltrace2-plugin-lttng-utils is a plugin for babeltrace2 that provides access to raw LTTng data. It can extract data from LTTng trace files and convert it into a format that can be processed by babeltrace2. This enables users to analyze LTTng traces using the powerful tools and features provided by babeltrace2.


babeltrace2-plugin-lttng-utils [options] <input_trace>


Required Arguments:

  • <input_trace>: Path to the LTTng trace file to be processed.

General Options:

  • -o, --output-directory: Specify the output directory for generated files. (Default: current directory)
  • -f, --format: Specify the output format for the plugin. (Default: json)
  • -s, --start: Specify the starting timestamp for extraction. (Default: 0)
  • -e, --end: Specify the ending timestamp for extraction. (Default: -1)
  • -d, --debug: Enable debug logs.

LTTng-Specific Options:

  • -c, --channels: Specify a comma-separated list of LTTng channels to extract.
  • -e, --events: Specify a comma-separated list of LTTng events to extract.
  • -t, --types: Specify a comma-separated list of LTTng data types to extract.


Extract all data from an LTTng trace to JSON:

babeltrace2-plugin-lttng-utils -f json /path/to/trace.lttng

Extract only specific events and channels from an LTTng trace to CSV:

babeltrace2-plugin-lttng-utils -f csv -c syscalls,irq -e sched_wakeup /path/to/trace.lttng

Common Issues

  • Missing or incomplete LTTng data: Ensure that the LTTng trace file contains the necessary data for the plugin to extract.
  • Incorrect output format: Check that the specified output format is supported by the plugin.
  • Timestamps not synchronized: If timestamps in the extracted data do not match the timestamps in the LTTng trace, try using the -s and -e options to adjust the extraction range.


babeltrace2-plugin-lttng-utils can be combined with other babeltrace2 plugins and tools to create powerful analysis pipelines. For example, you could use babeltrace2-plugin-lttng-utils to extract data from an LTTng trace, then use babeltrace2-plugin-stats to generate performance statistics or use babeltrace2-vis to visualize the data.

Related Commands

  • babeltrace2: Main binary for analyzing trace data.
  • lttng: Framework for recording kernel and user space events.
  • babeltrace2-plugin-stats: Plugin for generating performance statistics.
  • babeltrace2-vis: Plugin for visualizing trace data.