Document tracing session rotation features
[lttng-tools.git] / doc / man / lttng.1.txt
CommitLineData
307a8468
PP
1lttng(1)
2========
307a8468
PP
3
4
5NAME
6----
5d231d82 7lttng - LTTng 2 tracer control command-line tool
307a8468
PP
8
9
10SYNOPSIS
11--------
5d231d82
PP
12[verse]
13*lttng* [option:--group='GROUP'] [option:--mi='TYPE'] [option:--no-sessiond | option:--sessiond-path='PATH']
790e4a4c 14 [option:--quiet | option:-v | option:-vv | option:-vvv] '<<commands,COMMAND>>' ['COMMAND OPTIONS']
307a8468
PP
15
16
17DESCRIPTION
18-----------
5d231d82
PP
19The http://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
20source software package used for correlated tracing of the Linux kernel,
21user applications, and user libraries.
307a8468 22
5d231d82
PP
23LTTng consists of Linux kernel modules (for Linux kernel tracing) and
24dynamically loaded libraries (for user application and library tracing).
307a8468 25
7c1a4458 26An LTTng _session daemon_, man:lttng-sessiond(8), receives
5d231d82
PP
27commands from the command-line interface `lttng` to control the LTTng
28tracers. All interactions with the LTTng tracers happen through the
29`lttng` tool or through the liblttng-ctl library shipped with the
30LTTng-tools package.
307a8468 31
5d231d82
PP
32A _tracing domain_ is a tracer category. There are five available
33domains. For some commands, the domain needs to be specified with a
34command-line option. The domain options are:
307a8468 35
b5217c86 36nloption:-j, nloption:--jul::
5d231d82 37 Apply command to the `java.util.logging` (JUL) domain.
307a8468 38
b5217c86 39nloption:-k, nloption:--kernel::
5d231d82 40 Apply command to the Linux kernel domain.
307a8468 41
b5217c86 42nloption:-l, nloption:--log4j::
edb4fc87
PP
43 Apply command to the https://logging.apache.org/log4j/1.2/[Apache log4j 1.2]
44 (Java) domain.
307a8468 45
b5217c86 46nloption:-p, nloption:--python::
edb4fc87 47 Apply command to the https://www.python.org/[Python] domain.
307a8468 48
b5217c86 49nloption:-u, nloption:--userspace::
edb4fc87 50 Apply command to the user space domain (application using
7c1a4458 51 liblttng-ust directly; see man:lttng-ust(3)).
307a8468 52
5d231d82
PP
53The LTTng session daemon is a tracing registry which allows the user to
54interact with multiple tracers (kernel and user space) within the same
55container, a _tracing session_. Traces can be gathered from the Linux
56kernel and/or from instrumented applications (see
7c1a4458
PP
57man:lttng-ust(3)). You can aggregate and read the events of LTTng
58traces using man:babeltrace(1).
307a8468 59
5d231d82
PP
60To trace the Linux kernel, the session daemon needs to be running as
61`root`. LTTng uses a _tracing group_ to allow specific users to interact
62with the root session daemon. The default tracing group name is
63`tracing`. You can use the option:--group option to set the tracing
64group name to use.
307a8468 65
5d231d82
PP
66Session daemons can coexist. You can have a session daemon running as
67user Alice that can be used to trace her applications alongside a root
68session daemon or a session daemon running as user Bob.
307a8468 69
5d231d82
PP
70NOTE: It is highly recommended to start the session daemon at boot time
71for stable and long-term tracing.
307a8468 72
5d231d82
PP
73User applications instrumented with LTTng automatically register to the
74root session daemon and to user session daemons. This allows any session
75daemon to list the available traceable applications and event sources
7c1a4458 76(see man:lttng-list(1)).
307a8468 77
7c1a4458 78By default, the man:lttng-create(1) command automatically spawns a
5d231d82
PP
79user session daemon if none is currently running. The
80option:--no-sessiond general option can be set to avoid this.
307a8468 81
307a8468 82
5d231d82
PP
83OPTIONS
84-------
59b19c3c 85option:-g 'GROUP', option:--group='GROUP'::
5d231d82 86 Use 'GROUP' as Unix tracing group (default: `tracing`).
307a8468 87
59b19c3c 88option:-m 'TYPE', option:--mi='TYPE'::
5d231d82
PP
89 Print the command's result using the machine interface type 'TYPE'
90 instead of a human-readable output.
91+
92Supported types: `xml`.
93+
94The machine interface (MI) mode converts the traditional pretty-printing
95to a machine output syntax. The MI mode provides a change-resistant way
96to access information generated by the `lttng` command-line program.
97+
98When using the MI mode, the data is printed to the standard output.
99Errors and warnings are printed on the standard error with the
100pretty-print default format.
101+
102If any error occurs during the execution of a command, the return value
103of the command will be different than 0. In this case, `lttng` does
104:not: guarantee the syntax and data validity of the generated MI output.
105+
106For the `xml` MI type, an XML schema definition (XSD) file used for
107validation is available: see the `src/common/mi_lttng.xsd` file in
108the LTTng-tools source tree.
307a8468 109
5d231d82
PP
110option:-n, option:--no-sessiond::
111 Do not automatically spawn a session daemon.
307a8468 112
5d231d82
PP
113option:-q, option:--quiet::
114 Suppress all messages, including warnings and errors.
307a8468 115
5d231d82
PP
116option:--sessiond-path='PATH'::
117 Set the session daemon binary's absolute path to 'PATH'.
307a8468 118
5d231d82
PP
119option:-v, option:--verbose::
120 Increase verbosity.
121+
122Three levels of verbosity are available, which are triggered by
123appending additional `v` letters to the option
124(that is, `-vv` and `-vvv`).
307a8468 125
307a8468 126
5d231d82
PP
127Program information
128~~~~~~~~~~~~~~~~~~~
129option:-h, option:--help::
130 Show help.
307a8468 131
5d231d82
PP
132option:--list-commands::
133 List available commands.
307a8468 134
5d231d82
PP
135option:--list-options::
136 List available general options.
307a8468 137
5d231d82
PP
138option:-V, option:--version::
139 Show version.
307a8468 140
307a8468 141
790e4a4c 142[[commands]]
5d231d82
PP
143COMMANDS
144--------
b5217c86 145The following commands also have their own nloption:--help option.
307a8468 146
307a8468 147
5d231d82
PP
148Tracing sessions
149~~~~~~~~~~~~~~~~
7c1a4458 150man:lttng-create(1)::
61fa5028 151 {cmd_descr_create}.
307a8468 152
7c1a4458 153man:lttng-destroy(1)::
61fa5028 154 {cmd_descr_destroy}.
307a8468 155
7c1a4458 156man:lttng-load(1)::
61fa5028 157 {cmd_descr_load}.
31415f87 158
faf04ce7
PP
159man:lttng-regenerate(1)::
160 {cmd_descr_regenerate}.
161
7c1a4458 162man:lttng-save(1)::
61fa5028 163 {cmd_descr_save}.
307a8468 164
7c1a4458 165man:lttng-set-session(1)::
61fa5028 166 {cmd_descr_set_session}.
307a8468 167
307a8468 168
5d231d82
PP
169Channels
170~~~~~~~~
7c1a4458 171man:lttng-add-context(1)::
61fa5028 172 {cmd_descr_add_context}.
307a8468 173
7c1a4458 174man:lttng-disable-channel(1)::
61fa5028 175 {cmd_descr_disable_channel}.
307a8468 176
7c1a4458 177man:lttng-enable-channel(1)::
61fa5028 178 {cmd_descr_enable_channel}.
307a8468 179
307a8468 180
5d231d82
PP
181Event rules
182~~~~~~~~~~~
7c1a4458 183man:lttng-disable-event(1)::
61fa5028 184 {cmd_descr_disable_event}.
307a8468 185
7c1a4458 186man:lttng-enable-event(1)::
61fa5028 187 {cmd_descr_enable_event}.
31415f87 188
307a8468 189
5d231d82
PP
190Status
191~~~~~~
7c1a4458 192man:lttng-list(1)::
61fa5028 193 {cmd_descr_list}.
307a8468 194
7c1a4458 195man:lttng-status(1)::
61fa5028 196 {cmd_descr_status}.
307a8468 197
307a8468 198
5d231d82
PP
199Control
200~~~~~~~
7c1a4458 201man:lttng-snapshot(1)::
61fa5028 202 {cmd_descr_snapshot}.
307a8468 203
7c1a4458 204man:lttng-start(1)::
61fa5028 205 {cmd_descr_start}.
307a8468 206
7c1a4458 207man:lttng-stop(1)::
61fa5028 208 {cmd_descr_stop}.
307a8468 209
307a8468 210
980bb5fd
PP
211Tracing session rotation
212~~~~~~~~~~~~~~~~~~~~~~~~
213man:lttng-disable-rotation(1)::
214 {cmd_descr_disable_rotation}.
215
216man:lttng-enable-rotation(1)::
217 {cmd_descr_enable_rotation}.
218
219man:lttng-rotate(1)::
220 {cmd_descr_rotate}.
221
222
223
5d231d82
PP
224Resource tracking
225~~~~~~~~~~~~~~~~~
7c1a4458 226man:lttng-track(1)::
61fa5028 227 {cmd_descr_track}.
307a8468 228
7c1a4458 229man:lttng-untrack(1)::
61fa5028 230 {cmd_descr_untrack}.
307a8468 231
307a8468 232
5d231d82
PP
233Miscellaneous
234~~~~~~~~~~~~~
7c1a4458 235man:lttng-help(1)::
61fa5028 236 {cmd_descr_help}.
307a8468 237
7c1a4458 238man:lttng-version(1)::
61fa5028 239 {cmd_descr_version}.
307a8468 240
7c1a4458 241man:lttng-view(1)::
61fa5028 242 {cmd_descr_view}.
307a8468
PP
243
244
5d231d82 245include::common-cmd-footer.txt[]
307a8468
PP
246
247
248SEE ALSO
249--------
7c1a4458
PP
250man:lttng-sessiond(8),
251man:lttng-relayd(8),
252man:lttng-crash(1),
253man:lttng-ust(3),
254man:babeltrace(1)
This page took 0.043482 seconds and 5 git commands to generate.