BABELTRACE-QUERY(1)           Babeltrace manual          BABELTRACE-QUERY(1)

NAME         top

       babeltrace-query - Query object from a component class

SYNOPSIS         top

       babeltrace query [GENERAL OPTIONS] [--omit-home-plugin-path]
                        [--params=PARAMS] TYPE.PLUGIN.COMPCLS OBJECT

DESCRIPTION         top

       The query command queries the object named OBJECT from the component
       class COMPCLS of the type TYPE found in the Babeltrace plugin PLUGIN
       and prints the results.

       See babeltrace-intro(7) to learn more about the Babeltrace project
       and its core concepts.

       The available values for TYPE are:

       source, src
           Source component class.

       filter, flt
           Filter component class.

           Sink component class.

       The exact object names and the parameters that a given component
       class expects are described in its documentation. babeltrace-help(1)
       can generally provide this information.

       You can use the --params=PARAMS option to pass parameters to the
       component class’s query function. See Parameters format for the exact
       format of PARAMS.

       The output of the query command looks like YAML, although it is not
       guaranteed that it is YAML-compliant.

       See EXAMPLES for usage examples.

   Parameters format
       The format of the PARAMS option’s argument is a comma-separated list
       of NAME=VALUE assignments:


           Parameter name (C identifier plus the :, ., and - characters).

           One of:

           ·   null, nul, NULL: null value.

           ·   true, TRUE, yes, YES: true boolean value.

           ·   false, FALSE, no, NO: false boolean value.

           ·   Binary (0b prefix), octal (0 prefix), decimal, or hexadecimal
               (0x prefix) signed 64-bit integer.

           ·   Double precision floating point number (scientific notation
               is accepted).

           ·   Unquoted string with no special characters, and not matching
               any of the null and boolean value symbols above.

           ·   Double-quoted string (accepts escape characters).

           You may put whitespaces around the individual = (assignment) and
           , (separator) characters.


           babeltrace ... --params='many=null, fresh=yes, condition=false,
                                    squirrel=-782329, observe=3.14,
                                    simple=beef, needs-quotes="some string",
                                    escape.chars-are:allowed="a \" quote"'

           Like in the example above, make sure to single-quote the whole
           argument when you run this command from a shell.

   Plugin path
       This command loads Babeltrace plugins to perform its operation. The
       search path for Babeltrace plugins is, in this order:

        1. The colon-separated list of directories in the
           BABELTRACE_PLUGIN_PATH environment variable.

        2. The colon-separated list of directories in the --plugin-path

        3. If the --omit-home-plugin-path option is absent:

        4. If the --omit-system-plugin-path option is absent:

       You can use the babeltrace-list-plugins(1) command to dynamically
       list the available plugins.

OPTIONS         top

   General options
       See babeltrace(1) for more details.

       -d, --debug
           Turn the debugging mode on.

           Set the log level of all known Babeltrace loggers to LVL.

       -v, --verbose
           Turn the verbose mode on.

       -h, --help
           Show general help and quit.

       -V, --version
           Show version and quit.

   Query parameters
       -p PARAMS, --params=PARAMS
           Set the query parameters to PARAMS. See Parameters format for the
           exact format of PARAMS.

   Plugin path
           Do not search for plugins in $HOME/.local/lib/babeltrace/plugins.

           Do not search for plugins in /usr/local/lib/babeltrace/plugins.

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

   Command information
       -h, --help
           Show the command’s help and quit.

EXAMPLES         top

       Example 1. Query the available sessions of the LTTng live source
       component class.

           $ babeltrace query src.ctf.lttng-live sessions \

       Example 2. Query the metadata info (includes the decoded text) of a
       CTF trace located on the local file system.

           $ babeltrace query src.ctf.fs metadata-info \

       Example 3. Query the trace info of CTF traces located on the local
       file system.

           $ babeltrace query src.ctf.fs trace-info \

       Example 4. Query some object from a sink component class without

           $ babeltrace query some-object


   Babeltrace library
           Common functions’s log level. The available values are the same
           as for the --log-level option of babeltrace(1).

           Compatibility functions’s log level. The available values are the
           same as for the --log-level option of babeltrace(1).

           Force the terminal color support. The available values are:

               Only emit terminal color codes when the standard output and
               error streams are connected to a color-capable terminal.

               Never emit terminal color codes.

               Always emit terminal color codes.

           Set to 1 to disable the loading of any Babeltrace Python plugin.

           Babeltrace library’s global log level. The available values are
           the same as for the --log-level option of babeltrace(1)

           Set to 1 to make the Babeltrace library leave any dynamically
           loaded modules (plugins and Python plugin provider) open at exit.
           This can be useful for debugging purposes.

           Colon-separated list of directories, in order, in which dynamic
           plugins can be found before other directories are considered.

   Python plugin provider
           Python plugin provider’s log level. The available values are the
           same as for the --log-level option of babeltrace(1).

           babeltrace CLI’s log level. The available values are the same as
           for the --log-level option.

           Set to 0 to disable the warning message which babeltrace prints
           when you convert a trace with a relative path that’s also the
           name of a babeltrace command.

FILES         top

           User plugin directory.

           System plugin directory.

EXIT STATUS         top

       0 on success, 1 otherwise.

BUGS         top

       If you encounter any issue or usability problem, please report it on
       the Babeltrace bug tracker (see

RESOURCES         top

       The Babeltrace project shares some communication channels with the
       LTTng project (see <>).

       ·   Babeltrace website (see <>)

       ·   Git repository (see

       ·   EfficiOS GitHub organization (see <>)

       ·   Continuous integration (see

       ·   Mailing list (see <>) for support and

       ·   IRC channel (see <irc://>): #lttng on

AUTHORS         top

       The Babeltrace project is the result of efforts by many regular
       developers and occasional contributors.

       The current project maintainer is Jérémie Galarneau

COPYRIGHT         top

       This command is part of the Babeltrace project.

       Babeltrace is distributed under the MIT license (see

SEE ALSO         top

       babeltrace(1), babeltrace-intro(7)

COLOPHON         top

       This page is part of the babeltrace (trace read and write libraries
       and a trace converter) project.  Information about the project can be
       found at ⟨⟩.  If you have a bug
       report for this manual page, send it to
       This page was obtained from the project's upstream Git repository
       ⟨git://⟩ on 2018-10-29.  (At that
       time, the date of the most recent commit that was found in the repos‐
       itory was 2018-09-12.)  If you discover any rendering problems in
       this HTML version of the page, or you believe there is a better or
       more up-to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not part
       of the original manual page), send a mail to

Babeltrace 2.0.0-pre4          5 October 2017            BABELTRACE-QUERY(1)

Pages that refer to this page: babeltrace(1)babeltrace-intro(7)