doc/man: lttng(1) command pages: always include `common-footer.txt`
[lttng-tools.git] / doc / man / lttng.1.txt
... / ...
CommitLineData
1lttng(1)
2========
3:revdate: 3 May 2021
4
5
6NAME
7----
8lttng - Control LTTng tracing
9
10
11SYNOPSIS
12--------
13[verse]
14*lttng* [option:--group='GROUP'] [option:--mi=**xml**] [option:--no-sessiond | option:--sessiond-path='PATH']
15 [option:--quiet | option:-verbose...] '<<commands,COMMAND>>' ['COMMAND OPTIONS']
16
17
18DESCRIPTION
19-----------
20include::common-intro.txt[]
21
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:
26
27* Manages tracing sessions (see man:lttng-concepts(7) to learn more
28 about tracing sessions).
29
30* Controls the various components (like tracers and consumer daemons) of
31 LTTng.
32
33* Sends asynchronous notifications to user applications.
34
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.
40
41NOTE: The LTTng project recommends that you start the session daemon at
42boot time for stable and long-term tracing.
43
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
50
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.
56
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.
60
61How the `lttng` tool chooses which session daemon to connect to
62is as follows:
63
64If your Unix user is `root`::
65 Connect to the root session daemon.
66
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.
73
74 If your Unix user is not part of the tracing group:::
75 Connect to the session daemon of your Unix user.
76
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
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)).
92
93
94OPTIONS
95-------
96option:-g 'GROUP', option:--group='GROUP'::
97 Set the name of the Unix tracing group to 'GROUP' instead of
98 `tracing`.
99+
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.
107+
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.
111+
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.
115+
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.
119
120option:-n, option:--no-sessiond::
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.
125
126option:-q, option:--quiet::
127 Suppress all messages, including warnings and errors.
128+
129You may :not: use this option with the option:--verbose option.
130
131option:--sessiond-path='PATH'::
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.
136
137option:-v, option:--verbose::
138 Increase verbosity.
139+
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.
143
144
145Program information
146~~~~~~~~~~~~~~~~~~~
147include::common-help-option.txt[]
148
149option:--list-commands::
150 List available commands and quit.
151
152option:-V, option:--version::
153 Show version and quit.
154
155
156[[commands]]
157COMMANDS
158--------
159The following commands also have their own nloption:--help option.
160
161
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
185~~~~~~~
186[options="header"]
187|===
188|Command |Description
189
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|===
194
195
196Recording event rule
197~~~~~~~~~~~~~~~~~~~~
198[options="header"]
199|===
200|Command |Description
201
202|man:lttng-disable-event(1) |{cmd_descr_disable_event}.
203|man:lttng-enable-event(1) |{cmd_descr_enable_event}.
204|===
205
206Information
207~~~~~~~~~~~
208[options="header"]
209|===
210|Command |Description
211
212|man:lttng-list(1) |{cmd_descr_list}.
213|===
214
215Resource tracking
216~~~~~~~~~~~~~~~~~
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|===
224
225Trigger
226~~~~~~~
227[options="header"]
228|===
229|Command |Description
230
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|===
235
236Miscellaneous
237~~~~~~~~~~~~~
238[options="header"]
239|===
240|Command |Description
241
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|===
246
247
248include::common-lttng-cmd-after-options.txt[]
249
250
251include::common-footer.txt[]
252
253
254SEE ALSO
255--------
256man:lttng-concepts(7)
257man:lttng-relayd(8),
258man:lttng-sessiond(8)
This page took 0.023264 seconds and 4 git commands to generate.