3 :revdate: 16 October 2019
8 lttng - LTTng 2 tracer control command-line tool
14 *lttng* [option:--group='GROUP'] [option:--mi='TYPE'] [option:--no-sessiond | option:--sessiond-path='PATH']
15 [option:--quiet | option:-v | option:-vv | option:-vvv] '<<commands,COMMAND>>' ['COMMAND OPTIONS']
20 The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
21 source software package used for correlated tracing of the Linux kernel,
22 user applications, and user libraries.
24 LTTng consists of Linux kernel modules (for Linux kernel tracing) and
25 dynamically loaded libraries (for user application and library tracing).
27 An LTTng _session daemon_, man:lttng-sessiond(8), receives
28 commands from the command-line interface `lttng` to control the LTTng
29 tracers. All interactions with the LTTng tracers happen through the
30 `lttng` tool or through the liblttng-ctl library shipped with the
33 A _tracing domain_ is a tracer category. There are five available
34 domains. For some commands, the domain needs to be specified with a
35 command-line option. The domain options are:
37 nloption:-j, nloption:--jul::
38 Apply command to the `java.util.logging` (JUL) domain.
40 nloption:-k, nloption:--kernel::
41 Apply command to the Linux kernel domain.
43 nloption:-l, nloption:--log4j::
44 Apply command to the https://logging.apache.org/log4j/1.2/[Apache log4j 1.2]
47 nloption:-p, nloption:--python::
48 Apply command to the https://www.python.org/[Python] domain.
50 nloption:-u, nloption:--userspace::
51 Apply command to the user space domain (application using
52 liblttng-ust directly; see man:lttng-ust(3)).
54 The LTTng session daemon is a tracing registry which allows the user to
55 interact with multiple tracers (kernel and user space) within the same
56 container, a _tracing session_. Traces can be gathered from the Linux
57 kernel and/or from instrumented applications (see
58 man:lttng-ust(3)). You can aggregate and read the events of LTTng
59 traces using man:babeltrace2(1).
61 To trace the Linux kernel, the session daemon needs to be running as
62 `root`. LTTng uses a _tracing group_ to allow specific users to interact
63 with the root session daemon. The default tracing group name is
64 `tracing`. You can use the option:--group option to set the tracing
67 Session daemons can coexist. You can have a session daemon running as
68 user Alice that can be used to trace her applications alongside a root
69 session daemon or a session daemon running as user Bob.
71 NOTE: It is highly recommended to start the session daemon at boot time
72 for stable and long-term tracing.
74 User applications instrumented with LTTng automatically register to the
75 root session daemon and to user session daemons. This allows any session
76 daemon to list the available traceable applications and event sources
77 (see man:lttng-list(1)).
79 By default, the man:lttng-create(1) command automatically spawns a
80 user session daemon if none is currently running. The
81 option:--no-sessiond general option can be set to avoid this.
86 option:-g 'GROUP', option:--group='GROUP'::
87 Use 'GROUP' as Unix tracing group (default: `tracing`).
89 option:-m 'TYPE', option:--mi='TYPE'::
90 Print the command's result using the machine interface type 'TYPE'
91 instead of a human-readable output.
93 Supported types: `xml`.
95 The machine interface (MI) mode converts the traditional pretty-printing
96 to a machine output syntax. The MI mode provides a change-resistant way
97 to access information generated by the `lttng` command-line program.
99 When using the MI mode, the data is printed to the standard output.
100 Errors and warnings are printed on the standard error with the
101 pretty-print default format.
103 If any error occurs during the execution of a command, the return value
104 of the command will be different than 0. In this case, `lttng` does
105 :not: guarantee the syntax and data validity of the generated MI output.
107 For the `xml` MI type, an XML schema definition (XSD) file used for
108 validation is available: see the `src/common/mi_lttng.xsd` file in
109 the LTTng-tools source tree.
111 option:-n, option:--no-sessiond::
112 Do not automatically spawn a session daemon.
114 option:-q, option:--quiet::
115 Suppress all messages, including warnings and errors.
117 option:--sessiond-path='PATH'::
118 Set the session daemon binary's absolute path to 'PATH'.
120 option:-v, option:--verbose::
123 Three levels of verbosity are available, which are triggered by
124 appending additional `v` letters to the option
125 (that is, `-vv` and `-vvv`).
130 option:-h, option:--help::
133 option:--list-commands::
134 List available commands.
136 option:--list-options::
137 List available general options.
139 option:-V, option:--version::
146 The following commands also have their own nloption:--help option.
151 man:lttng-create(1)::
154 man:lttng-destroy(1)::
160 man:lttng-regenerate(1)::
161 {cmd_descr_regenerate}.
166 man:lttng-set-session(1)::
167 {cmd_descr_set_session}.
172 man:lttng-add-context(1)::
173 {cmd_descr_add_context}.
175 man:lttng-disable-channel(1)::
176 {cmd_descr_disable_channel}.
178 man:lttng-enable-channel(1)::
179 {cmd_descr_enable_channel}.
184 man:lttng-disable-event(1)::
185 {cmd_descr_disable_event}.
187 man:lttng-enable-event(1)::
188 {cmd_descr_enable_event}.
196 man:lttng-status(1)::
202 man:lttng-snapshot(1)::
203 {cmd_descr_snapshot}.
212 Tracing session rotation
213 ~~~~~~~~~~~~~~~~~~~~~~~~
214 man:lttng-disable-rotation(1)::
215 {cmd_descr_disable_rotation}.
217 man:lttng-enable-rotation(1)::
218 {cmd_descr_enable_rotation}.
220 man:lttng-rotate(1)::
230 man:lttng-untrack(1)::
239 man:lttng-version(1)::
246 include::common-cmd-footer.txt[]
251 man:lttng-sessiond(8),