BABELTRACE2(1)
β¨ BABELTRACE2(1) β the Babeltrace 2 manual β¨
okay bestie, buckle up, this is the Babeltrace 2 manual page, living in the Babeltrace 2 manual section π
πΈ NAME πΈ
babeltrace2 β convert or process one or more traces, and more π
π¦ SYNOPSIS π¦
babeltrace2 [--debug | --verbose | --log-level=LVL]
[--omit-home-plugin-path] [--omit-system-plugin-path]
[--plugin-path=PATH[:PATH]...] [CMD] [CMD ARGS]
π DESCRIPTION π
babeltrace2 is an open-source trace converter and processor command-line program. Like, the whole glow-up. β¨ The tool can open one or more traces and convert between multiple formats β possibly with one or more filters sitting in the conversion path β and it can also do other operations depending on the command CMD (peep βCOMMANDSβ).
Note bestie, you might actually be looking for the manual page ofbabeltrace2-convert(1)π β theconvertcommand is the default command ofbabeltrace2and it's backward compatible withbabeltrace(1). See βEXAMPLESβ forconvertcommand examples.
See babeltrace2-intro(7) to learn more about the Babeltrace 2 project and its core concepts π§
Most of the babeltrace2 commands load Babeltrace 2 plugins to do their thing. The search path for Babeltrace 2 plugins is, in this exact order:
- The colon-separated (or semicolon, on Windows) list of directories in the
BABELTRACE_PLUGIN_PATHenvironment variable. - The colon-separated (or semicolon, on Windows) list of directories in the
--plugin-pathoption. $HOME/.local/lib/babeltrace2/plugins/usr/local/lib/babeltrace2/plugins
You can use the babeltrace2-list-plugins(1) command to dynamically list the available plugins and what they offer. See βPROJECTβS PLUGINSβ for a list of plugins shipped with Babeltrace 2 π¦
β¨ OPTIONS β¨
-d,--debugβ legacy option, no cap: this is equivalent to--log-level=TRACE.-l LVL,--log-level=LVLβ set the log level of all known Babeltrace 2 loggers toLVL, including individual components for thebabeltrace2-convert(1)andbabeltrace2-run(1)commands.
You can override the log level of a specific component with the --log-level option of the babeltrace2-convert(1) or babeltrace2-run(1) commands.
You can override the log level of the library with the LIBBABELTRACE2_INIT_LOG_LEVEL environment variable.
You can override the log level of the CLI with the BABELTRACE_CLI_LOG_LEVEL environment variable.
You can override the log level of the Babeltrace 2 Python bindings with the BABELTRACE_PYTHON_BT2_LOG_LEVEL environment variable.
The available values for LVL are:
NONE,Nβ logging is disabled. πFATAL,Fβ severe errors that lead the execution to abort immediately. This level should be enabled in production.ERROR,Eβ errors that might still allow the execution to continue. Usually, once one or more errors are reported at this level, the application, plugin, or library won't perform any more useful task, but it should still exit cleanly. This level should be enabled in production.WARN,WARNING,Wβ unexpected situations which still allow the execution to continue. This level should be enabled in production.INFO,Iβ informational messages that highlight progress or important states of the application, plugins, or library. This level can be enabled in production.DEBUG,Dβ debugging information, with a higher level of details than theTRACElevel. This level should NOT be enabled in production. πTRACE,Tβ low-level debugging context information. This level should NOT be enabled in production. π
--omit-home-plugin-pathβ don't search for plugins in$HOME/.local/lib/babeltrace2/plugins. bye bestie π--omit-system-plugin-pathβ don't search for plugins in/usr/local/lib/babeltrace2/plugins. also bye π--plugin-path=PATH[:PATH]...β addPATHto the list of paths in which plugins can be found. π«Ά-v,--verboseβ legacy option, it's giving--log-level=INFO. IfCMDisconvertor is missing, then this also sets the verbose parameter of the implicitsink.text.prettycomponent (seebabeltrace2-sink.text.pretty(7)) totrue.-h,--helpβ show help and quit.-V,--versionβ show version and quit.
π COMMANDS π
The following commands also have their own --help option.
convertβ convert one or more traces to a given format, possibly with filters in the conversion path. This is the default command: you don't need to explicitly specify the name of this command to use it. This command is backward compatible with thebabeltrace(1)program. Seebabeltrace2-convert(1).helpβ get help for a specific plugin or component class. Seebabeltrace2-help(1).list-pluginsβ list the available Babeltrace 2 plugins and their component classes. Seebabeltrace2-list-plugins(1).queryβ query an object from a component class. Seebabeltrace2-query(1).runβ build a trace processing graph and run it. Seebabeltrace2-run(1).
π PROJECTβS PLUGINS π
The following plugins are provided by the Babeltrace 2 project itself. π
babeltrace2-plugin-ctf(7)β CTF trace input (from the file system and from the LTTng-live protocol) and output to the file system.
Component classes:
babeltrace2-plugin-lttng-utils(7)β processing graph utilities for LTTng traces.
Component class:
babeltrace2-plugin-text(7)β plain text input and output.
Component classes:
babeltrace2-plugin-utils(7)β processing graph utilities.
Component classes:
babeltrace2-filter.utils.muxer(7)babeltrace2-filter.utils.trimmer(7)babeltrace2-sink.utils.counter(7)babeltrace2-sink.utils.dummy(7)
π EXAMPLES π
The following examples are the same as the ones of the babeltrace2-convert(1) manual page because convert is the default command of the babeltrace2 program. slay.
Example 1. Pretty-print the events, in order, of one or more CTF traces.
$ babeltrace2 my-ctf-traces
$ babeltrace2 my-ctf-traces
$ babeltrace2 my-ctf-trace-1 my-ctf-trace-2 my-ctf-trace-3
Example 2. Trim a CTF trace and pretty-print the events.
$ babeltrace2 my-ctf-trace --begin=22:55:43.658582931 \
--end=22:55:46.967687564
$ babeltrace2 my-trace --begin=22:55:43.658582931
$ babeltrace2 my-trace --end=22:55:46.967687564
$ babeltrace2 my-trace --timerange=22:55:43,22:55:46.967687564
Example 3. Trim a CTF trace, enable the stream intersection mode, and write a CTF trace.
$ babeltrace2 my-ctf-trace --stream-intersection \
--timerange=22:55:43,22:55:46.967687564 \
--output-format=ctf --output=out-ctf-trace
Example 4. Print the available remote LTTng sessions (through LTTng live).
$ babeltrace2 --input-format=lttng-live net://localhost
Example 5. Pretty-print LTTng live events.
$ babeltrace2 net://localhost/host/myhostname/my-session-name
Example 6. Record LTTng live traces to the file system (as CTF 1.8 traces).
$ babeltrace2 net://localhost/host/myhostname/my-session-name \
--params=session-not-found-action=end \
--component=sink.ctf.fs \
--params='path="out-ctf-traces",ctf-version="1"'
Example 7. Read a CTF trace as fast as possible using a dummy output.
$ babeltrace2 my-trace --output-format=dummy
Example 8. Read three CTF traces in stream intersection mode, add debugging information, and pretty-print them to a file.
$ babeltrace2 ctf-trace1 ctf-trace2 ctf-trace3 --stream-intersection \
--debug-info --output=pretty-out
Example 9. Pretty-print a CTF trace and traces from an explicit source component, with the event times showed in seconds since the Unix epoch.
$ babeltrace2 ctf-trace --component=src.my-plugin.my-src \
--params='path="spec-trace",output-some-event-type=yes' \
--clock-seconds
Example 10. Send LTTng live events to an explicit sink component.
$ babeltrace2 net://localhost/host/myhostname/mysession \
--component=sink.my-plugin.my-sink
Example 11. Trim a CTF trace, add debugging information, apply an explicit filter component, and write as a CTF trace.
$ babeltrace2 /path/to/ctf/trace --timerange=22:14:38,22:15:07 \
--debug-info --component=filter.my-plugin.my-filter \
--params=criteria=xyz,ignore-abc=yes \
--output-format=ctf --output=out-ctf-trace
Example 12. Print the metadata text of a CTF trace.
$ babeltrace2 /path/to/ctf/trace --output-format=ctf-metadata
ENVIRONMENT VARIABLES π
Okay bestie, this is where the magic knobs live. Set these in your shell and the Babeltrace 2 project will listen. No cap.
Babeltrace 2 library π
BABELTRACE_EXEC_ON_ABORT=CMDLINEβ Run the command lineCMDLINE, parsed like a UNIX 98 shell, whenever any part of the Babeltrace 2 project unexpectedly aborts.
The application only aborts when the executed command returns, and it ignores the commandβs exit status.
Heads up: this environment variable is ignored when the application has thesetuidor thesetgidaccess right flag set. π
BABELTRACE_TERM_COLOR=(AUTO | NEVER | ALWAYS)β Force terminal color support for thebabeltrace2(1)program and the project plugins.
The available values are:
AUTOβ Only emit terminal color codes when the standard output and error streams are connected to a color-capable terminal.NEVERβ Never emit terminal color codes.ALWAYSβ Always emit terminal color codes.
BABELTRACE_TERM_COLOR_BRIGHT_MEANS_BOLD=0β Set to0to emit SGR (seehttps://en.wikipedia.org/wiki/ANSI_escape_code) codes90to97for bright colors instead of bold (SGR code1) and standard color codes (SGR codes30to37).BABELTRACE_PLUGIN_PATH=PATHSβ Set the list of directories, in order, in which dynamic plugins can be found before other directories are considered, toPATHS(colon-separated, or semicolon on Windows).LIBBABELTRACE2_DISABLE_PYTHON_PLUGINS=1β Disable the loading of any Babeltrace 2 Python plugin. Bye bye, Python plugins.LIBBABELTRACE2_INIT_LOG_LEVEL=LVLβ Force the initial log level of the Babeltrace 2 library to beLVL.
If this environment variable is set, then it overrides the log level set by the --log-level option for the Babeltrace 2 library logger.
The available values for LVL are:
NONE,Nβ Logging is disabled.FATAL,Fβ Severe errors that lead the execution to abort immediately. This level should be enabled in production.ERROR,Eβ Errors that might still allow the execution to continue. Usually, once one or more errors are reported at this level, the application, plugin, or library wonβt perform any more useful task, but it should still exit cleanly. This level should be enabled in production.WARN,WARNING,Wβ Unexpected situations which still allow the execution to continue. This level should be enabled in production.INFO,Iβ Informational messages that highlight progress or important states of the application, plugins, or library. This level can be enabled in production.DEBUG,Dβ Debugging information, with a higher level of details than theTRACElevel. This level should NOT be enabled in production.TRACE,Tβ Low-level debugging context information. This level should NOT be enabled in production.
LIBBABELTRACE2_NO_DLCLOSE=1β Make the Babeltrace 2 library leave any dynamically loaded modules (plugins and plugin providers) open at exit. This can be useful for debugging purposes.LIBBABELTRACE2_PLUGIN_PROVIDER_DIR=DIRβ Set the directory from which the Babeltrace 2 library dynamically loads plugin provider shared objects toDIR.
If this environment variable is set, then it overrides the default plugin provider directory.
Babeltrace 2 Python bindings π
BABELTRACE_PYTHON_BT2_LOG_LEVEL=LVLβ Force the Babeltrace 2 Python bindings log level to beLVL.
If this environment variable is set, then it overrides the log level set by the --log-level option for the Python bindings logger.
The available values for LVL are:
NONE,Nβ Logging is disabled.FATAL,Fβ Severe errors that lead the execution to abort immediately. This level should be enabled in production.ERROR,Eβ Errors that might still allow the execution to continue. Usually, once one or more errors are reported at this level, the application, plugin, or library wonβt perform any more useful task, but it should still exit cleanly. This level should be enabled in production.WARN,WARNING,Wβ Unexpected situations which still allow the execution to continue. This level should be enabled in production.INFO,Iβ Informational messages that highlight progress or important states of the application, plugins, or library. This level can be enabled in production.DEBUG,Dβ Debugging information, with a higher level of details than theTRACElevel. This level should NOT be enabled in production.TRACE,Tβ Low-level debugging context information. This level should NOT be enabled in production.
CLI π»
BABELTRACE_CLI_LOG_LEVEL=LVLβ Force the log level of thebabeltrace2CLI to beLVL.
If this environment variable is set, then it overrides the log level set by the --log-level option for the CLI logger.
The available values for LVL are:
NONE,Nβ Logging is disabled.FATAL,Fβ Severe errors that lead the execution to abort immediately. This level should be enabled in production.ERROR,Eβ Errors that might still allow the execution to continue. Usually, once one or more errors are reported at this level, the application, plugin, or library wonβt perform any more useful task, but it should still exit cleanly. This level should be enabled in production.WARN,WARNING,Wβ Unexpected situations which still allow the execution to continue. This level should be enabled in production.INFO,Iβ Informational messages that highlight progress or important states of the application, plugins, or library. This level can be enabled in production.DEBUG,Dβ Debugging information, with a higher level of details than theTRACElevel. This level should NOT be enabled in production.TRACE,Tβ Low-level debugging context information. This level should NOT be enabled in production.
BABELTRACE_CLI_WARN_COMMAND_NAME_DIRECTORY_CLASH=0β Disable the warning message whichbabeltrace2-convert(1)prints when you convert a trace with a relative path thatβs also the name of ababeltrace2command.BABELTRACE_DEBUG=1β Legacy variable: equivalent to setting the--log-leveloption toTRACE.BABELTRACE_VERBOSE=1β Legacy variable: equivalent to setting the--log-leveloption toINFO.
FILES π
$HOME/.local/lib/babeltrace2/pluginsβ User plugin directory./usr/local/lib/babeltrace2/pluginsβ System plugin directory./usr/local/lib/babeltrace2/plugin-providersβ System plugin provider directory.
EXIT STATUS πͺ
0 on success, 1 otherwise.
BUGS π
If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see https://bugs.lttng.org/projects/babeltrace).
RESOURCES π«
The Babeltrace project shares some communication channels with the LTTng project (see https://lttng.org/).
- Babeltrace website (see
https://babeltrace.org/) - Mailing list (see
https://lists.lttng.org) for support and development:lttng-dev@lists.lttng.org - IRC channel (see
irc://irc.oftc.net/lttng):#lttngonirc.oftc.net - Bug tracker (see
https://bugs.lttng.org/projects/babeltrace) - Git repository (see
https://git.efficios.com/?p=babeltrace.git) - GitHub project (see
https://github.com/efficios/babeltrace) - Continuous integration (see
https://ci.lttng.org/view/Babeltrace/) - Code review (see
https://review.lttng.org/q/project:babeltrace)
AUTHORS π
The Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors.
The current project maintainer is JΓ©rΓ©mie Galarneau (mailto:jeremie.galarneau@efficios.com).
COPYRIGHT π
This program is part of the Babeltrace 2 project.
Babeltrace is distributed under the MIT license (see https://opensource.org/licenses/MIT).
SEE ALSO π
babeltrace2-intro(7), babeltrace2-convert(1), babeltrace2-help(1), babeltrace2-list-plugins(1), babeltrace2-query(1), babeltrace2-run(1)
π Thatβs the whole page, bestie. This one is from Babeltrace 2.1.2, dated 14 September 2019, and itβs filed under BABELTRACE2(1). Stay iconic. π β¨
π¦ where this page comes from
- fedora 43: babeltrace2 2.1.2-3.fc43 Β· MIT AND GPL-2.0-only
- fedora 44: babeltrace2 2.1.2-5.fc44 Β· MIT AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms