| 1 | babeltrace2-query(1) |
| 2 | =================== |
| 3 | :manpagetype: command |
| 4 | :revdate: 5 October 2017 |
| 5 | |
| 6 | |
| 7 | NAME |
| 8 | ---- |
| 9 | babeltrace2-query - Query object from a component class |
| 10 | |
| 11 | |
| 12 | SYNOPSIS |
| 13 | -------- |
| 14 | [verse] |
| 15 | *babeltrace2 query* ['GENERAL OPTIONS'] [opt:--omit-home-plugin-path] |
| 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 | |
| 27 | See man:babeltrace2-intro(7) to learn more about the Babeltrace |
| 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 |
| 44 | expects are described in its documentation. man:babeltrace2-help(1) can |
| 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 | ---- |
| 86 | $ babeltrace2 query src.ctf.lttng-live sessions \ |
| 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 | ---- |
| 95 | $ babeltrace2 query src.ctf.fs metadata-info \ |
| 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 | ---- |
| 104 | $ babeltrace2 query src.ctf.fs trace-info \ |
| 105 | --params='path="/path/to/trace"' |
| 106 | ---- |
| 107 | ==== |
| 108 | |
| 109 | .Query some object from a sink component class without parameters. |
| 110 | ==== |
| 111 | [role="term"] |
| 112 | ---- |
| 113 | $ babeltrace2 query sink.my-plugin.my-sink some-object |
| 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 | -------- |
| 127 | man:babeltrace2(1), |
| 128 | man:babeltrace2-intro(7) |