babeltrace2-source.ctf.lttng-live - Linux
Overview
babeltrace2-source.ctf.lttng-live is a command-line utility for converting live LTTng kernel traces in CT format to a human-readable text file. It is a part of the babeltrace package and is commonly used in performance debugging and analysis to convert and visualize trace data collected from various system components.
Syntax
babeltrace2-source.ctf.lttng-live [options] <filename>
Options/Flags
- -l
: Specify the trace type to convert. Default: "kernel"
(kernel trace) - -o
: Specify the output file to write the converted trace to. Default: stdout - -p: Convert stack unwinding data
- -s
: Filter traces by a specific subsystem - -e
: Filter traces by a specific event name - -f
: Specify the output format. Default: "text"
- -h: Display help and usage information
Examples
Convert kernel LTTng trace to text:
babeltrace2-source.ctf.lttng-live -l kernel trace.ctf
Convert kernel LTTng trace with stack unwinding to JSON:
babeltrace2-source.ctf.lttng-live -l kernel -p -f json trace.ctf
Filter traces by a specific subsystem and output to a file:
babeltrace2-source.ctf.lttng-live -l kernel -s irq trace.ctf -o irq_trace.txt
Common Issues
- Trace format not recognized: Ensure that the input file is in CT format and produced by LTTng.
- Output file not written: Check if the specified output file path is valid and accessible.
Integration
Combining with libelf:
libelf -e data trace.ctf | babeltrace2-source.ctf.lttng-live
Converting to Hades:
babeltrace2-source.ctf.lttng-live trace.ctf | hades-parser
Related Commands
- lttng-sessiond: Collect and manage LTTng trace sessions.
- babeltrace2: Convert LTTng traces to other formats.
- lttng-view: Visualize LTTng trace data.