3 :revdate: 14 September 2019
8 babeltrace2-query - Query an object from a Babeltrace 2 component class
14 *babeltrace2* [<<gen-opts,'GENERAL OPTIONS'>>] *query* [opt:--params='PARAMS']
15 'COMP-CLS-TYPE'.'PLUGIN-NAME'.'COMP-CLS-NAME' 'OBJECT'
20 The `query` command queries the object named 'OBJECT' from the component
21 class named 'COMP-CLS-NAME' of the type 'COMP-CLS-TYPE' found in the
22 Babeltrace~2 plugin named 'PLUGIN-NAME' and prints the results.
24 include::common-see-babeltrace2-intro.txt[]
26 The available values for 'COMP-CLS-TYPE' are:
30 Source component class.
34 Filter component class.
39 The exact object names and the parameters that a given component class
40 expects are described in its own documentation. man:babeltrace2-help(1)
41 can generally provide this information.
43 You can use the opt:--params option to pass parameters to the component
44 class's query operation.
46 The output of the `query` command can look like https://yaml.org/[YAML],
47 but it's not guaranteed to be YAML-compliant.
49 See <<examples,``EXAMPLES''>> for usage examples.
54 include::common-gen-options.txt[]
60 opt:--params='PARAMS'::
61 Set the query parameters to 'PARAMS'.
64 include::common-cmd-params-format.txt[]
68 include::common-cmd-info-options.txt[]
74 .Query the available tracing sessions of a local LTTng relay daemon.
78 $ babeltrace2 query src.ctf.lttng-live sessions \
79 --params='url="net://localhost"'
83 .Query the metadata info (includes the decoded plain text) of a CTF trace located on the local file system.
87 $ babeltrace2 query src.ctf.fs metadata-info \
88 --params='path="/path/to/trace"'
92 .Query the trace infos of a CTF trace located on the local file system.
96 $ babeltrace2 query src.ctf.fs babeltrace.trace-infos \
97 --params='path="/path/to/trace"'
101 .Query some object from a sink component class without parameters.
105 $ babeltrace2 query sink.my-plugin.my-sink some-object
110 include::common-cli-env.txt[]
113 include::common-cli-files.txt[]
116 include::common-cmd-footer.txt[]
121 man:babeltrace2-intro(7),