doc/man: lttng(1) command pages: always include `common-footer.txt`
[lttng-tools.git] / doc / man / lttng.1.txt
CommitLineData
307a8468
PP
1lttng(1)
2========
26f0c779 3:revdate: 3 May 2021
307a8468
PP
4
5
6NAME
7----
26f0c779 8lttng - Control LTTng tracing
307a8468
PP
9
10
11SYNOPSIS
12--------
5d231d82 13[verse]
26f0c779 14*lttng* [option:--group='GROUP'] [option:--mi=**xml**] [option:--no-sessiond | option:--sessiond-path='PATH']
484b2a0c 15 [option:--quiet | option:-verbose...] '<<commands,COMMAND>>' ['COMMAND OPTIONS']
307a8468
PP
16
17
18DESCRIPTION
19-----------
484b2a0c 20include::common-intro.txt[]
307a8468 21
484b2a0c
PP
22The `lttng` command-line tool, as well as any user application linked
23with the LTTng control library (`liblttng-ctl`), sends commands to a
24listening LTTng session daemon (man:lttng-sessiond(8)). A session
25daemon:
307a8468 26
26f0c779 27* Manages tracing sessions (see man:lttng-concepts(7) to learn more
484b2a0c 28 about tracing sessions).
307a8468 29
484b2a0c
PP
30* Controls the various components (like tracers and consumer daemons) of
31 LTTng.
307a8468 32
484b2a0c 33* Sends asynchronous notifications to user applications.
307a8468 34
484b2a0c
PP
35By default, the man:lttng-create(1) command automatically spawns a
36session daemon for your Unix user if none is currently running. Override
37the path of the session daemon binary to spawn with the
38option:--sessiond-path option. Avoid automatically spawning a session
39daemon with the option:--no-sessiond option.
307a8468 40
484b2a0c
PP
41NOTE: The LTTng project recommends that you start the session daemon at
42boot time for stable and long-term tracing.
307a8468 43
26f0c779
PP
44See man:lttng-concepts(7) to learn more about the foundational concepts
45of LTTng.
46
47The `lttng` tool offers a subcommand-based command-line interface. The
48<<commands,COMMANDS>> section below lists the available commands.
49
307a8468 50
484b2a0c
PP
51Session daemon connection
52~~~~~~~~~~~~~~~~~~~~~~~~~
53For most of its commands, the `lttng` tool needs to connect to a
54listening LTTng session daemon (man:lttng-sessiond(8)) to control LTTng
55tracing.
307a8468 56
484b2a0c
PP
57Each Unix user may have its own independent running session daemon.
58However, the `lttng` tool must connect to the session daemon of the
59`root` user (the root session daemon) to control Linux kernel tracing.
307a8468 60
484b2a0c
PP
61How the `lttng` tool chooses which session daemon to connect to
62is as follows:
307a8468 63
484b2a0c
PP
64If your Unix user is `root`::
65 Connect to the root session daemon.
307a8468 66
484b2a0c
PP
67If your Unix user is not `root`::
68 If your Unix user is part of the Unix tracing group:::
69 Try to connect to the root session daemon.
70+
71If the root session daemon isn't running, connect to the session daemon
72of your Unix user.
307a8468 73
484b2a0c
PP
74 If your Unix user is not part of the tracing group:::
75 Connect to the session daemon of your Unix user.
307a8468 76
484b2a0c
PP
77The name of the Unix tracing group is one of:
78
79With the nloption:--group='GROUP' option of the root session daemon (man:lttng-sessiond(8))::
80 'GROUP'
81+
82In that case, you must use the option:--group='GROUP' option, with
83the same 'GROUP' argument, of the `lttng` tool.
84
85Without the nloption:--group option of the root session daemon::
86 `tracing`
87
88LTTng-instrumented user applications automatically register to both the
26f0c779
PP
89root and user session daemons. This makes it possible for both session
90daemons to list the available instrumented applications and their
91instrumentation points (see man:lttng-list(1)).
307a8468 92
307a8468 93
5d231d82
PP
94OPTIONS
95-------
59b19c3c 96option:-g 'GROUP', option:--group='GROUP'::
484b2a0c
PP
97 Set the name of the Unix tracing group to 'GROUP' instead of
98 `tracing`.
5d231d82 99+
484b2a0c
PP
100You must use this option to be able to connect to a root session daemon
101(man:lttng-sessiond(8)) which was started with its own
102nloption:--group='GROUP' option.
103
104option:-m `xml`, option:--mi=++xml++::
105 Print the command's result using a stable XML machine interface (MI)
106 output instead of the default, unstable human-readable output.
5d231d82 107+
484b2a0c
PP
108With this mode, `lttng` prints the resulting XML document to the
109standard output, while it prints any error/warning to the standard error
110with an unstable, human-readable format.
5d231d82 111+
484b2a0c
PP
112If any error occurs during the execution of `lttng`, the command
113exits with a status different than{nbsp}0, and `lttng` does
114:not: guarantee the syntax and data validity of its MI output.
5d231d82 115+
484b2a0c
PP
116An XML schema definition (XSD) file used for validation of the MI output
117is available: see the `src/common/mi_lttng.xsd` file in the LTTng-tools
118source tree.
307a8468 119
5d231d82 120option:-n, option:--no-sessiond::
484b2a0c
PP
121 Do not automatically spawn a session daemon for your Unix user when
122 running the man:lttng-create(1) command.
123+
124You may :not: use this option with the option:--sessiond-path option.
307a8468 125
5d231d82
PP
126option:-q, option:--quiet::
127 Suppress all messages, including warnings and errors.
484b2a0c
PP
128+
129You may :not: use this option with the option:--verbose option.
307a8468 130
5d231d82 131option:--sessiond-path='PATH'::
484b2a0c
PP
132 Set the absolute path of the session daemon binary to spawn from the
133 man:lttng-create(1) command to 'PATH'.
134+
135You may :not: use this option with the option:--no-sessiond option.
307a8468 136
5d231d82
PP
137option:-v, option:--verbose::
138 Increase verbosity.
139+
484b2a0c
PP
140Specify this option up to three times to get more levels of verbosity.
141+
142You may :not: use this option with the option:--quiet option.
307a8468 143
307a8468 144
5d231d82
PP
145Program information
146~~~~~~~~~~~~~~~~~~~
484b2a0c 147include::common-help-option.txt[]
307a8468 148
5d231d82 149option:--list-commands::
484b2a0c 150 List available commands and quit.
307a8468 151
5d231d82 152option:-V, option:--version::
484b2a0c 153 Show version and quit.
307a8468 154
307a8468 155
790e4a4c 156[[commands]]
5d231d82
PP
157COMMANDS
158--------
b5217c86 159The following commands also have their own nloption:--help option.
307a8468 160
307a8468 161
484b2a0c
PP
162Tracing session
163~~~~~~~~~~~~~~~
164[options="header"]
165|===
166|Command |Description
167
168|man:lttng-create(1) |{cmd_descr_create}.
169|man:lttng-destroy(1) |{cmd_descr_destroy}.
170|man:lttng-disable-rotation(1) |{cmd_descr_disable_rotation}.
171|man:lttng-enable-rotation(1) |{cmd_descr_enable_rotation}.
172|man:lttng-load(1) |{cmd_descr_load}.
173|man:lttng-regenerate(1) |{cmd_descr_regenerate}.
174|man:lttng-rotate(1) |{cmd_descr_rotate}.
175|man:lttng-save(1) |{cmd_descr_save}.
176|man:lttng-set-session(1) |{cmd_descr_set_session}.
177|man:lttng-snapshot(1) |{cmd_descr_snapshot}.
178|man:lttng-start(1) |{cmd_descr_start}.
179|man:lttng-status(1) |{cmd_descr_status}.
180|man:lttng-stop(1) |{cmd_descr_stop}.
181|===
182
183
184Channel
5d231d82 185~~~~~~~
484b2a0c
PP
186[options="header"]
187|===
188|Command |Description
307a8468 189
484b2a0c
PP
190|man:lttng-add-context(1) |{cmd_descr_add_context}.
191|man:lttng-disable-channel(1) |{cmd_descr_disable_channel}.
192|man:lttng-enable-channel(1) |{cmd_descr_enable_channel}.
193|===
307a8468 194
980bb5fd 195
484b2a0c
PP
196Recording event rule
197~~~~~~~~~~~~~~~~~~~~
198[options="header"]
199|===
200|Command |Description
980bb5fd 201
484b2a0c
PP
202|man:lttng-disable-event(1) |{cmd_descr_disable_event}.
203|man:lttng-enable-event(1) |{cmd_descr_enable_event}.
204|===
980bb5fd 205
484b2a0c
PP
206Information
207~~~~~~~~~~~
208[options="header"]
209|===
210|Command |Description
980bb5fd 211
484b2a0c
PP
212|man:lttng-list(1) |{cmd_descr_list}.
213|===
980bb5fd 214
5d231d82
PP
215Resource tracking
216~~~~~~~~~~~~~~~~~
484b2a0c
PP
217[options="header"]
218|===
219|Command |Description
220
221|man:lttng-track(1) |{cmd_descr_track}.
222|man:lttng-untrack(1) |{cmd_descr_untrack}.
223|===
307a8468 224
484b2a0c
PP
225Trigger
226~~~~~~~
227[options="header"]
228|===
229|Command |Description
307a8468 230
484b2a0c
PP
231|man:lttng-add-trigger(1) |{cmd_descr_add_trigger}.
232|man:lttng-list-triggers(1) |{cmd_descr_list_triggers}.
233|man:lttng-remove-trigger(1) |{cmd_descr_remove_trigger}.
234|===
307a8468 235
5d231d82
PP
236Miscellaneous
237~~~~~~~~~~~~~
484b2a0c
PP
238[options="header"]
239|===
240|Command |Description
307a8468 241
484b2a0c
PP
242|man:lttng-help(1) |{cmd_descr_help}.
243|man:lttng-version(1) |{cmd_descr_version}.
244|man:lttng-view(1) |{cmd_descr_view}.
245|===
307a8468
PP
246
247
f5511eea
PP
248include::common-lttng-cmd-after-options.txt[]
249
250
251include::common-footer.txt[]
307a8468
PP
252
253
254SEE ALSO
255--------
26f0c779 256man:lttng-concepts(7)
7c1a4458 257man:lttng-relayd(8),
484b2a0c 258man:lttng-sessiond(8)
This page took 0.043258 seconds and 4 git commands to generate.