| 1 | --- |
| 2 | id: mi |
| 3 | since: 2.6 |
| 4 | --- |
| 5 | |
| 6 | The `lttng` tool aims at providing a command output as human-readable as |
| 7 | possible. While this output is easy to parse by a human being, machines |
| 8 | have a hard time. |
| 9 | |
| 10 | This is why the `lttng` tool provides the general `--mi` option, which |
| 11 | must specify a machine interface output format. As of the latest |
| 12 | LTTng stable release, only the `xml` format is supported. A schema |
| 13 | definition (XSD) is made |
| 14 | <a href="https://github.com/lttng/lttng-tools/blob/master/src/common/mi_lttng.xsd" class="ext">available</a> |
| 15 | to ease the integration with external tools as much as possible. |
| 16 | |
| 17 | The `--mi` option can be used in conjunction with all `lttng` commands. |
| 18 | Here are some examples: |
| 19 | |
| 20 | <pre class="term"> |
| 21 | lttng --mi xml create some-session |
| 22 | lttng --mi xml list some-session |
| 23 | lttng --mi xml list --kernel |
| 24 | lttng --mi xml enable-event --kernel --syscall open |
| 25 | lttng --mi xml start |
| 26 | </pre> |