Commit | Line | Data |
---|---|---|
c1f82f3b | 1 | babeltrace2-query(1) |
838dd456 PP |
2 | =================== |
3 | :manpagetype: command | |
4 | :revdate: 5 October 2017 | |
5 | ||
6 | ||
7 | NAME | |
8 | ---- | |
c1f82f3b | 9 | babeltrace2-query - Query object from a component class |
838dd456 PP |
10 | |
11 | ||
12 | SYNOPSIS | |
13 | -------- | |
14 | [verse] | |
c1f82f3b | 15 | *babeltrace2 query* ['GENERAL OPTIONS'] [opt:--omit-home-plugin-path] |
838dd456 PP |
16 | [opt:--omit-system-plugin-path] |
17 | [opt:--plugin-path='PATH'[:__PATH__]...] | |
18 | [opt:--params='PARAMS'] 'TYPE.PLUGIN.COMPCLS' 'OBJECT' | |
19 | ||
20 | ||
21 | DESCRIPTION | |
22 | ----------- | |
23 | The `query` command queries the object named 'OBJECT' from the component | |
24 | class 'COMPCLS' of the type 'TYPE' found in the Babeltrace plugin | |
25 | 'PLUGIN' and prints the results. | |
26 | ||
c1f82f3b | 27 | See man:babeltrace2-intro(7) to learn more about the Babeltrace |
838dd456 PP |
28 | project and its core concepts. |
29 | ||
30 | The available values for 'TYPE' are: | |
31 | ||
32 | `source`:: | |
33 | `src`:: | |
34 | Source component class. | |
35 | ||
36 | `filter`:: | |
37 | `flt`:: | |
38 | Filter component class. | |
39 | ||
40 | `sink`:: | |
41 | Sink component class. | |
42 | ||
43 | The exact object names and the parameters that a given component class | |
c1f82f3b | 44 | expects are described in its documentation. man:babeltrace2-help(1) can |
838dd456 PP |
45 | generally provide this information. |
46 | ||
47 | You can use the opt:--params='PARAMS' option to pass parameters to the | |
48 | component class's query function. See <<params-fmt,Parameters format>> | |
49 | for the exact format of 'PARAMS'. | |
50 | ||
51 | The output of the `query` command looks like YAML, although it is not | |
52 | guaranteed that it is YAML-compliant. | |
53 | ||
54 | See <<examples,EXAMPLES>> for usage examples. | |
55 | ||
56 | ||
57 | include::common-cmd-params-format.txt[] | |
58 | ||
59 | include::common-cmd-plugin-path.txt[] | |
60 | ||
61 | ||
62 | OPTIONS | |
63 | ------- | |
64 | include::common-gen-options.txt[] | |
65 | ||
66 | ||
67 | Query parameters | |
68 | ~~~~~~~~~~~~~~~~ | |
69 | opt:-p 'PARAMS', opt:--params='PARAMS':: | |
70 | Set the query parameters to 'PARAMS'. See <<params-fmt,Parameters | |
71 | format>> for the exact format of 'PARAMS'. | |
72 | ||
73 | ||
74 | include::common-plugin-path-options.txt[] | |
75 | ||
76 | include::common-cmd-info-options.txt[] | |
77 | ||
78 | ||
79 | [[examples]] | |
80 | EXAMPLES | |
81 | -------- | |
82 | .Query the available sessions of the LTTng live source component class. | |
83 | ==== | |
84 | [role="term"] | |
85 | ---- | |
c1f82f3b | 86 | $ babeltrace2 query src.ctf.lttng-live sessions \ |
838dd456 PP |
87 | --params='url="net://RHOST/host/TGTHOST"' |
88 | ---- | |
89 | ==== | |
90 | ||
91 | .Query the metadata info (includes the decoded text) of a CTF trace located on the local file system. | |
92 | ==== | |
93 | [role="term"] | |
94 | ---- | |
c1f82f3b | 95 | $ babeltrace2 query src.ctf.fs metadata-info \ |
838dd456 PP |
96 | --params='path="/path/to/trace"' |
97 | ---- | |
98 | ==== | |
99 | ||
100 | .Query the trace info of CTF traces located on the local file system. | |
101 | ==== | |
102 | [role="term"] | |
103 | ---- | |
9e534aae PP |
104 | $ babeltrace2 query src.ctf.fs babeltrace.trace-info \ |
105 | --params='path="/path/to/trace"' | |
838dd456 PP |
106 | ---- |
107 | ==== | |
108 | ||
109 | .Query some object from a sink component class without parameters. | |
110 | ==== | |
111 | [role="term"] | |
112 | ---- | |
c1f82f3b | 113 | $ babeltrace2 query sink.my-plugin.my-sink some-object |
838dd456 PP |
114 | ---- |
115 | ==== | |
116 | ||
117 | ||
118 | include::common-cli-env.txt[] | |
119 | ||
120 | include::common-cli-files.txt[] | |
121 | ||
122 | include::common-cmd-footer.txt[] | |
123 | ||
124 | ||
125 | SEE ALSO | |
126 | -------- | |
c1f82f3b MJ |
127 | man:babeltrace2(1), |
128 | man:babeltrace2-intro(7) |