Commit | Line | Data |
---|---|---|
e70712b3 | 1 | = babeltrace2-query(1) |
0659f3af | 2 | :manpagetype: command |
e70712b3 | 3 | :revdate: 14 September 2019 |
0659f3af PP |
4 | |
5 | ||
e70712b3 PP |
6 | == NAME |
7 | ||
8 | babeltrace2-query - Query an object from a Babeltrace 2 component class | |
0659f3af PP |
9 | |
10 | ||
e70712b3 PP |
11 | == SYNOPSIS |
12 | ||
0659f3af | 13 | [verse] |
e70712b3 PP |
14 | *babeltrace2* [<<gen-opts,'GENERAL OPTIONS'>>] *query* [opt:--params='PARAMS'] |
15 | 'COMP-CLS-TYPE'.'PLUGIN-NAME'.'COMP-CLS-NAME' 'OBJECT' | |
16 | ||
0659f3af | 17 | |
e70712b3 | 18 | == DESCRIPTION |
0659f3af | 19 | |
0659f3af | 20 | The `query` command queries the object named 'OBJECT' from the component |
e70712b3 PP |
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. | |
0659f3af | 23 | |
e70712b3 | 24 | include::common-see-babeltrace2-intro.txt[] |
0659f3af | 25 | |
e70712b3 | 26 | The available values for 'COMP-CLS-TYPE' are: |
0659f3af PP |
27 | |
28 | `source`:: | |
29 | `src`:: | |
30 | Source component class. | |
31 | ||
32 | `filter`:: | |
33 | `flt`:: | |
34 | Filter component class. | |
35 | ||
36 | `sink`:: | |
37 | Sink component class. | |
38 | ||
39 | The exact object names and the parameters that a given component class | |
e70712b3 PP |
40 | expects are described in its own documentation. man:babeltrace2-help(1) |
41 | can generally provide this information. | |
0659f3af | 42 | |
e70712b3 PP |
43 | You can use the opt:--params option to pass parameters to the component |
44 | class's query operation. | |
0659f3af | 45 | |
e70712b3 PP |
46 | The output of the `query` command can look like https://yaml.org/[YAML], |
47 | but it's not guaranteed to be YAML-compliant. | |
0659f3af | 48 | |
e70712b3 | 49 | See <<examples,``EXAMPLES''>> for usage examples. |
0659f3af | 50 | |
0659f3af | 51 | |
e70712b3 | 52 | == OPTIONS |
0659f3af | 53 | |
0659f3af PP |
54 | include::common-gen-options.txt[] |
55 | ||
56 | ||
e70712b3 | 57 | === Query parameters |
0659f3af | 58 | |
e70712b3 PP |
59 | opt:-p 'PARAMS':: |
60 | opt:--params='PARAMS':: | |
61 | Set the query parameters to 'PARAMS'. | |
62 | + | |
63 | -- | |
64 | include::common-cmd-params-format.txt[] | |
65 | -- | |
0659f3af | 66 | |
0659f3af PP |
67 | |
68 | include::common-cmd-info-options.txt[] | |
69 | ||
70 | ||
71 | [[examples]] | |
e70712b3 PP |
72 | == EXAMPLES |
73 | ||
74 | .Query the available tracing sessions of a local LTTng relay daemon. | |
0659f3af PP |
75 | ==== |
76 | [role="term"] | |
77 | ---- | |
a8be4294 | 78 | $ babeltrace2 query src.ctf.lttng-live sessions \ |
e70712b3 | 79 | --params='url="net://localhost"' |
0659f3af PP |
80 | ---- |
81 | ==== | |
82 | ||
e70712b3 | 83 | .Query the metadata info (includes the decoded plain text) of a CTF trace located on the local file system. |
0659f3af PP |
84 | ==== |
85 | [role="term"] | |
86 | ---- | |
a8be4294 | 87 | $ babeltrace2 query src.ctf.fs metadata-info \ |
e70712b3 | 88 | --params='path="/path/to/trace"' |
0659f3af PP |
89 | ---- |
90 | ==== | |
91 | ||
e70712b3 | 92 | .Query the trace infos of a CTF trace located on the local file system. |
0659f3af PP |
93 | ==== |
94 | [role="term"] | |
95 | ---- | |
e70712b3 | 96 | $ babeltrace2 query src.ctf.fs babeltrace.trace-infos \ |
1a29b831 | 97 | --params='path="/path/to/trace"' |
0659f3af PP |
98 | ---- |
99 | ==== | |
100 | ||
101 | .Query some object from a sink component class without parameters. | |
102 | ==== | |
103 | [role="term"] | |
104 | ---- | |
a8be4294 | 105 | $ babeltrace2 query sink.my-plugin.my-sink some-object |
0659f3af PP |
106 | ---- |
107 | ==== | |
108 | ||
109 | ||
110 | include::common-cli-env.txt[] | |
111 | ||
e70712b3 | 112 | |
0659f3af PP |
113 | include::common-cli-files.txt[] |
114 | ||
e70712b3 | 115 | |
0659f3af PP |
116 | include::common-cmd-footer.txt[] |
117 | ||
118 | ||
e70712b3 PP |
119 | == SEE ALSO |
120 | ||
121 | man:babeltrace2-intro(7), | |
122 | man:babeltrace2(1) |