Man page - babeltrace2(1)

Packages contains this manual

Manual

BABELTRACE2

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
COMMANDS
PROJECT’S PLUGINS
EXAMPLES
ENVIRONMENT VARIABLES
BabeltraceĀ 2 library
BabeltraceĀ 2 Python bindings
CLI
FILES
EXIT STATUS
BUGS
RESOURCES
AUTHORS
COPYRIGHT
SEE ALSO

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. 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ā€).

Note

You might be looking for the manual page of the babeltrace2-convert (1); 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:

1. The colon-separated (or semicolon, on Windows) list of directories in the BABELTRACE_PLUGIN_PATH environment variable.

2. The colon-separated (or semicolon, on Windows) list of directories in the --plugin-path option.

3. $HOME/.local/lib/babeltrace2/plugins

4. /usr/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: this is equivalent to --log-level = TRACE .

-l LVL , --log-level = LVL

Set the log level of all known BabeltraceĀ 2 loggers to LVL , including individual components for the babeltrace2-convert (1) and babeltrace2-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 the TRACE level.

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 .

--omit-system-plugin-path

Don’t search for plugins in /usr/lib/babeltrace2/plugins .

--plugin-path = PATH [: PATH ]...

Add PATH to the list of paths in which plugins can be found.

-v , --verbose

Legacy option: this is equivalent to --log-level = INFO .

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

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 the babeltrace (1) program.

See babeltrace2-convert (1).

help

Get help for a specific plugin or component class.

See babeltrace2-help (1).

list-plugins

List the available BabeltraceĀ 2 plugins and their component classes.

See babeltrace2-list-plugins (1).

query

Query an object from a component class.

See babeltrace2-query (1).

run

Build a trace processing graph and run it.

See babeltrace2-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-source.ctf.fs (7)

• babeltrace2-source.ctf.lttng-live (7)

• babeltrace2-sink.ctf.fs (7)

babeltrace2-plugin-lttng-utils (7)

Processing graph utilities for LTTng traces.

Component class:

• babeltrace2-filter.lttng-utils.debug-info (7)

babeltrace2-plugin-text (7)

Plain text input and output.

Component classes:

• babeltrace2-source.text.dmesg (7)

• babeltrace2-sink.text.details (7)

• babeltrace2-sink.text.pretty (7)

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.

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

BabeltraceĀ 2 library

BABELTRACE_EXEC_ON_ABORT = CMDLINE

Execute the command line CMDLINE , as parsed like a UNIXĀ 98 shell, when any part of the BabeltraceĀ 2 project unexpectedly aborts.

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 )

Force the terminal color support for the babeltrace2 (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 to 0 to emit SGR (see <https://en.wikipedia.org/wiki/ANSI_escape_code>) codesĀ 90 toĀ 97 for bright colors instead of bold (SGR codeĀ 1) and standard color codes (SGR codes 30 to 37).

BABELTRACE_PLUGIN_PATH = PATHS

Set the list of directories, in order, in which dynamic plugins can be found before other directories are considered to PATHS (colon-separated, or semicolon on Windows).

LIBBABELTRACE2_DISABLE_PYTHON_PLUGINS = 1

Disable the loading of any BabeltraceĀ 2 Python plugin.

LIBBABELTRACE2_INIT_LOG_LEVEL = LVL

Force the initial log level of the BabeltraceĀ 2 library to be LVL .

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 the TRACE level.

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 to DIR .

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 be LVL .

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 the TRACE level.

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 the log level babeltrace2 CLI to be LVL .

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 the TRACE level.

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 which babeltrace2-convert (1) prints when you convert a trace with a relative path that’s also the name of a babeltrace2 command.

BABELTRACE_DEBUG = 1

Legacy variable: equivalent to setting the --log-level option to TRACE .

BABELTRACE_VERBOSE = 1

Legacy variable: equivalent to setting the --log-level option to INFO .

FILES

$HOME/.local/lib/babeltrace2/plugins

User plugin directory.

/usr/lib/babeltrace2/plugins

System plugin directory.

/usr/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>): #lttng on irc.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)