table of contents
BABELTRACE2-QUERY(1) | Babeltrace 2 manual | BABELTRACE2-QUERY(1) |
NAME¶
babeltrace2-query - Query an object from a Babeltrace 2 component class
SYNOPSIS¶
babeltrace2 [GENERAL OPTIONS] query [--params=PARAMS]
COMP-CLS-TYPE.PLUGIN-NAME.COMP-CLS-NAME OBJECT
DESCRIPTION¶
The query command queries the object named OBJECT from the component class named COMP-CLS-NAME of the type COMP-CLS-TYPE found in the Babeltrace 2 plugin named PLUGIN-NAME and prints the results.
See babeltrace2-intro(7) to learn more about the Babeltrace 2 project and its core concepts.
The available values for COMP-CLS-TYPE are:
source, src
filter, flt
sink
The exact object names and the parameters that a given component class expects are described in its own documentation. babeltrace2-help(1) can generally provide this information.
You can use the --params option to pass parameters to the component class’s query operation.
The output of the query command can look like YAML (see <https://yaml.org/>), but it’s not guaranteed to be YAML-compliant.
See “EXAMPLES” for usage examples.
OPTIONS¶
General¶
You can use those options before the command name.
See babeltrace2(1) for more details.
-d, --debug
-l LVL, --log-level=LVL
--omit-home-plugin-path
--omit-system-plugin-path
--plugin-path=PATH[:PATH]...
-v, --verbose
Query parameters¶
-p PARAMS, --params=PARAMS
The format of PARAMS is a comma-separated list of NAME=VALUE assignments:
NAME=VALUE[,NAME=VALUE]...
NAME
VALUE
You may put whitespaces around the individual = (assignment), , (separator), [ (array beginning), ] (array end), { (map beginning), and } (map end) characters.
Example:
--params='many=null, fresh=yes, condition=false, squirrel=-782329,
play=+23, observe=3.14, simple=beef,
needs-quotes="some string",
escape.chars-are:allowed="a \" quote",
things=[1, "hello", 2.71828],
frog={slow=2, bath=[bike, 23], blind=NO}'
Important
Like in the example above, make sure to single-quote the whole argument when you run this command from a shell, as it can contain many special characters.
Command information¶
-h, --help
EXAMPLES¶
Example 1. Query the available tracing sessions of a local LTTng relay daemon.
$ babeltrace2 query src.ctf.lttng-live sessions \
--params='url="net://localhost"'
Example 2. Query the metadata info (includes the decoded plain text) of a CTF trace located on the local file system.
$ babeltrace2 query src.ctf.fs metadata-info \
--params='inputs=["/path/to/trace"]'
Example 3. Query the trace infos of a CTF trace located on the local file system.
$ babeltrace2 query src.ctf.fs babeltrace.trace-infos \
--params='inputs=["/path/to/trace"]'
Example 4. Query some object from a sink component class without parameters.
$ babeltrace2 query sink.my-plugin.my-sink some-object
ENVIRONMENT VARIABLES¶
Babeltrace 2 library¶
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 2 Python bindings¶
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.
CLI¶
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
FILES¶
$HOME/.local/lib/babeltrace2/plugins
/usr/local/lib/babeltrace2/plugins
/usr/local/lib/babeltrace2/plugin-providers
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/>).
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 command is part of the Babeltrace 2 project.
Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>).
SEE ALSO¶
14 September 2019 | Babeltrace 2.0.5 |