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