4 [](https://ci.lttng.org/job/lttng-tools_master_build/)
5 [](https://scan.coverity.com/projects/lttng-tools)
7 _**LTTng‑tools**_ is a set of components to control
8 [LTTng](https://lttng.org/) tracing.
12 * The LTTng [session daemon](https://lttng.org/man/8/lttng-sessiond/).
13 * The LTTng consumer daemon.
14 * The LTTng [relay daemon](https://lttng.org/man/8/lttng-relayd/).
15 * liblttng‑ctl, a library with a C API used to communicate
16 with the session daemon.
17 * Python 3 bindings of liblttng‑ctl.
18 * [`lttng`](https://lttng.org/man/1/lttng/),
19 a command-line tool over liblttng‑ctl.
20 * [`lttng-crash`](https://lttng.org/man/1/lttng-crash/), a command-line
21 tool to recover and view LTTng 2 trace buffers in the event of
24 Required and optional dependencies
25 ----------------------------------
26 You need the following dependencies to build and run the
27 LTTng‑tools components:
29 * **Linux kernel ≥ 2.6.27**
31 Use `--disable-epoll` at [build configuration](#configure) time to
32 build LTTng‑tools for an older kernel. However, note that we
33 can't provide any guarantee below 2.6.27.
35 * **[Userspace RCU](http://www.liburcu.org/) ≥ 0.9.0**.
37 Debian/Ubuntu package: `liburcu-dev`.
39 * **popt ≥ 1.13**
41 Debian/Ubuntu package: `libpopt-dev`.
43 * **[Libxml2](http://xmlsoft.org/) ≥ 2.7.6**
45 Debian/Ubuntu package: `libxml2-dev`
47 The following dependencies are optional:
49 * **[Babeltrace 2](https://babeltrace.org/)**: default viewer
50 of the [`lttng view`](https://lttng.org/man/1/lttng-view/)
53 Debian/Ubuntu package: `babeltrace2`
55 * **[LTTng‑UST](https://lttng.org/)** (same minor version as
57 LTTng user space tracing (applications and libraries).
59 Debian/Ubuntu package: `liblttng-ust-dev`
61 * **Perl**: `make check` and tests.
63 * **[Python](https://www.python.org/) ≥ 3.0**:
64 `make check` and tests.
66 Debian/Ubuntu package: `python3`
68 * **[SWIG](http://www.swig.org/) ≥ 2.0** and
69 **Python 3 development headers**: Python bindings
70 (enabled at [build configuration](#configure) time with the
71 `--enable-python-bindings` option).
73 Debian/Ubuntu packages: `swig2.0` and `python3-dev`
76 **[kmod](https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/) ≥ 22**:
77 automatic LTTng kernel modules loading (kernel tracing).
79 * **Bash**: `make check`.
81 * **[`man`](http://man7.org/linux/man-pages/man1/man.1.html)**
82 (manual pager): view `lttng` command manual
83 pages with the `--help` option or with the
84 [`lttng help`](https://lttng.org/man/1/lttng-help/) command.
86 Note that you can use the [build configuration](#configure) option
87 `--enable-embedded-help` to embed the manual pages into the
88 `lttng`, `lttng-sessiond`, `lttng-relayd`, and `lttng-crash` programs
89 so that you don't need `man` to view them.
91 * **[libpfm](http://perfmon2.sourceforge.net/) ≥ 4.0**:
92 perf regression test suite.
94 Debian/Ubuntu package: `libpfm4-dev`
96 LTTng‑tools supports both the LTTng Linux kernel tracer and LTTng
97 user space tracer sharing the same _minor_ version. While some minor
98 releases do not change the tracer ABIs and _could_ work, no testing is
99 performed to ensure that cross-version compatibility is maintained.
101 You don't need to rebuild or modify applications instrumented with older
102 versions of the LTTng‑UST project to make them work with the
103 components of the latest LTTng‑tools release.
105 See the [LTTng Documentation](https://lttng.org/docs/) for more
106 information on versioning.
112 You need the following tools to build LTTng‑tools:
114 * **[GNU Autotools](https://www.gnu.org/software/automake/manual/html_node/Autotools-Introduction.html)**
115 (**Automake ≥ 1.10**,
116 **Autoconf ≥ 2.64**, and **Autoheader ≥ 2.50**)
118 * **[GNU Libtool](http://www.gnu.org/software/autoconf/) ≥ 2.2**
120 * **[Flex](https://github.com/westes/flex/) ≥ 2.5.35**
122 * **[Bison](https://www.gnu.org/software/bison/) ≥ 2.4**
124 To build the LTTng‑tools manual pages:
126 * **[AsciiDoc](https://www.methods.co.nz/asciidoc/) ≥ 8.4.5**
128 Previous versions could work, but were not tested.
130 * **[xmlto](https://pagure.io/xmlto) ≥ 0.0.21**
132 Previous versions could work, but were not tested.
134 If you use GNU gold, which is _not_ mandatory:
136 * **GNU gold ≥ 2.22**
138 Note that with GNU gold, you might have to add
139 `-L/usr/local/lib` to the `LDFLAGS` environment variable.
143 1. **If you have the LTTng‑tools Git source**, run:
147 This script creates the `configure` script.
149 2. <span id="configure"></span>Configure the build:
153 If you want the liblttng‑ctl Python bindings, use the
154 `--enable-python-bindings` option. See also the
155 `PYTHON` and `PYTHON_CONFIG` environment variables in
156 `./configure --help`.
158 If you don't want to build the manual pages, use the
159 `--disable-man-pages` option.
161 If you want to embed the manual pages into the
162 `lttng`, `lttng-sessiond`, `lttng-relayd`, and `lttng-crash` programs
163 so that you don't need `man` to view them, use the
164 `--enable-embedded-help` option.
166 If your Linux kernel is older than 2.6.27, use the
167 `--enable-epoll` option.
169 This build configuration script finds LTTng‑UST with
170 [pkg‑config](https://www.freedesktop.org/wiki/Software/pkg-config/):
171 set the `PKG_CONFIG_PATH` environment variable accordingly if
172 pkg‑config cannot find the `lttng-ust` package information.
174 See `./configure --help` for the complete list of options.
176 3. Build the project:
180 4. Install the project:
187 See the [Tracing control](https://lttng.org/docs/#doc-controlling-tracing)
188 section of the LTTng Documentation to learn how to use the
189 LTTng‑tools components.
191 See also the [LTTng manual pages](https://lttng.org/man/) (all
192 section 1 and 8 pages).
194 As there's no official liblttng‑ctl Python bindings yet, see
195 [`doc/python-howto.txt`](doc/python-howto.txt) to understand how to
201 [lttng‑dev](https://lists.lttng.org/cgi-bin/mailman/listinfo).
204 [`#lttng`](irc://irc.oftc.net/lttng) on the OFTC network.
207 [LTTng‑tools bug tracker](https://bugs.lttng.org/projects/lttng-tools/).
209 * **GitHub project**:
210 [lttng/lttng‑tools](https://github.com/lttng/lttng-tools/).
212 * **Continuous integration**:
213 [LTTng CI](https://ci.lttng.org/).
216 [_lttng‑tools_ project](https://review.lttng.org/q/project:lttng-tools)