BABELTRACE2(1) | Babeltrace 2 manual | BABELTRACE2(1) |
babeltrace2 - Convert or process one or more traces, and more
babeltrace2 [--debug | --verbose | --log-level=LVL]
[--omit-home-plugin-path] [--omit-system-plugin-path]
[--plugin-path=PATH[:PATH]...] [CMD] [CMD ARGS]
babeltrace2 is an open-source trace converter and processor command-line program. The tool can open one or more traces and convert between multiple formats, possibly with one or more filters in the conversion path, and perform other operations depending on the command CMD (see “COMMANDS”).
You might be looking for the babeltrace2-convert(1) command’s manual page; the convert command is the default command of babeltrace2 and is backward compatible with babeltrace(1).
See “EXAMPLES” for convert command 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 perform their operation. The search path for Babeltrace 2 plugins is, in this order:
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.
-d, --debug
-l LVL, --log-level=LVL
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
FATAL, F
This level should be enabled in production.
ERROR, E
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
This level should be enabled in production.
INFO, I
This level can be enabled in production.
DEBUG, D
This level should NOT be enabled in production.
TRACE, T
This level should NOT be enabled in production.
--omit-home-plugin-path
--omit-system-plugin-path
--plugin-path=PATH[:PATH]...
-v, --verbose
If CMD is convert or is missing, then this also sets the verbose parameter of the implicit sink.text.pretty component (see babeltrace2-sink.text.pretty(7)) to true.
-h, --help
-V, --version
The following commands also have their own --help option.
convert
This is the default command: you don’t need to explicitly specify this command’s name to use it.
This command is backward compatible with the babeltrace(1) program.
help
See babeltrace2-help(1).
list-plugins
query
See babeltrace2-query(1).
run
See babeltrace2-run(1).
The following plugins are provided by the Babeltrace 2 project itself.
Component classes:
babeltrace2-plugin-lttng-utils(7)
Component class:
Component classes:
Component classes:
The following examples are the same as the babeltrace2-convert(1) manual page’s examples because convert is the default babeltrace2 program’s command.
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 traces).
$ babeltrace2 net://localhost/host/myhostname/my-session-name \
--params=session-not-found-action=end \
--output-format=ctf --output=out-ctf-traces
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
BABELTRACE_EXEC_ON_ABORT=CMDLINE
The application only aborts when the executed command returns, ignoring its exit status.
This environment variable is ignored when the application has the setuid or the setgid access right flag set.
BABELTRACE_TERM_COLOR=(AUTO | NEVER | ALWAYS)
The available values are:
AUTO
NEVER
ALWAYS
BABELTRACE_TERM_COLOR_BRIGHT_MEANS_BOLD=0
BABELTRACE_PLUGIN_PATH=PATHS
LIBBABELTRACE2_DISABLE_PYTHON_PLUGINS=1
LIBBABELTRACE2_INIT_LOG_LEVEL=LVL
If this environment variable is set, 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
FATAL, F
This level should be enabled in production.
ERROR, E
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
This level should be enabled in production.
INFO, I
This level can be enabled in production.
DEBUG, D
This level should NOT be enabled in production.
TRACE, T
This level should NOT be enabled in production.
LIBBABELTRACE2_NO_DLCLOSE=1
LIBBABELTRACE2_PLUGIN_PROVIDER_DIR=DIR
If this environment variable is set, it overrides the default plugin provider directory.
BABELTRACE_PYTHON_BT2_LOG_LEVEL=LVL
If this environment variable is set, it overrides the log level set by the --log-level option for the Python bindings logger.
The available values for LVL are:
NONE, N
FATAL, F
This level should be enabled in production.
ERROR, E
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
This level should be enabled in production.
INFO, I
This level can be enabled in production.
DEBUG, D
This level should NOT be enabled in production.
TRACE, T
This level should NOT be enabled in production.
BABELTRACE_CLI_LOG_LEVEL=LVL
If this environment variable is set, it overrides the log level set by the --log-level option for the CLI logger.
The available values for LVL are:
NONE, N
FATAL, F
This level should be enabled in production.
ERROR, E
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
This level should be enabled in production.
INFO, I
This level can be enabled in production.
DEBUG, D
This level should NOT be enabled in production.
TRACE, T
This level should NOT be enabled in production.
BABELTRACE_CLI_WARN_COMMAND_NAME_DIRECTORY_CLASH=0
BABELTRACE_DEBUG=1
BABELTRACE_VERBOSE=1
$HOME/.local/lib/babeltrace2/plugins
/usr/lib/babeltrace2/plugins
/usr/lib/babeltrace2/plugin-providers
0 on success, 1 otherwise.
If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace>).
The Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/>).
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>.
This program is part of the Babeltrace 2 project.
Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>).
babeltrace2-intro(7), babeltrace2-convert(1), babeltrace2-help(1), babeltrace2-list-plugins(1), babeltrace2-query(1), babeltrace2-run(1)
14 September 2019 | Babeltrace 2.0.4 |