Commit | Line | Data |
---|---|---|
5e0cbfb0 PP |
1 | --- |
2 | id: liblttng-ctl-lttng | |
3 | --- | |
4 | ||
5 | The LTTng control library, `liblttng-ctl`, can be used to communicate | |
6 | with the session daemon using a C API that hides the underlying | |
7 | protocol's details. `liblttng-ctl` is part of LTTng-tools. | |
8 | ||
9 | `liblttng-ctl` may be used by including its "master" header: | |
10 | ||
11 | ~~~ c | |
12 | #include <lttng/lttng.h> | |
13 | ~~~ | |
14 | ||
15 | Some objects are referred by name (C string), such as tracing sessions, | |
16 | but most of them require creating a handle first using | |
17 | `lttng_create_handle()`. The best available developer documentation for | |
18 | `liblttng-ctl` is, for the moment, its installed header files as such. | |
19 | Every function/structure is thoroughly documented. | |
20 | ||
21 | The `lttng` program is the _de facto_ standard user interface to | |
22 | control LTTng tracing sessions. `lttng` uses `liblttng-ctl` to | |
23 | communicate with session daemons behind the scenes. | |
24 | <a href="/man/1/lttng" class="ext">Its manpage</a> is exhaustive, as | |
25 | well as its command line help (<code>lttng <em>cmd</em> --help</code>, | |
26 | where <code><em>cmd</em></code> is the command name). | |
27 | ||
28 | The [Controlling tracing](#doc-controlling-tracing) section is a feature | |
29 | tour of the `lttng` tool. |