doc/man/manpage.xsl: do not indent the title of an admonition block
[lttng-tools.git] / doc / man / lttng-sessiond.8.txt
... / ...
CommitLineData
1lttng-sessiond(8)
2=================
3:revdate: 21 April 2021
4
5
6NAME
7----
8lttng-sessiond - LTTng session daemon
9
10
11SYNOPSIS
12--------
13[verse]
14*lttng-sessiond* [option:--background | option:--daemonize] [option:--sig-parent]
15 [option:--config='PATH'] [option:--group='GROUP'] [option:--load='PATH']
16 [option:--agent-tcp-port='PORT']
17 [option:--apps-sock='PATH'] [option:--client-sock='PATH']
18 [option:--no-kernel | [option:--kmod-probes='PROBE'[,'PROBE']...]
19 [option:--extra-kmod-probes='PROBE'[,'PROBE']...]
20 [option:--kconsumerd-err-sock='PATH']
21 [option:--kconsumerd-cmd-sock='PATH']]
22 [option:--ustconsumerd32-err-sock='PATH']
23 [option:--ustconsumerd64-err-sock='PATH']
24 [option:--ustconsumerd32-cmd-sock='PATH']
25 [option:--ustconsumerd64-cmd-sock='PATH']
26 [option:--consumerd32-path='PATH'] [option:--consumerd32-libdir='PATH']
27 [option:--consumerd64-path='PATH'] [option:--consumerd64-libdir='PATH']
28 [option:--event-notifier-error-buffer-size-kernel='SLOTS']
29 [option:--event-notifier-error-buffer-size-userspace='SLOTS']
30 [option:--quiet | [option:--verbose]... [option:--verbose-consumer]]
31
32
33DESCRIPTION
34-----------
35include::common-intro.txt[]
36
37An LTTng session daemon, `lttng-sessiond`, is a program which:
38
39* Manages tracing sessions (see man:lttng-create(1) to learn more about
40 tracing sessions).
41
42* Controls the various components (like tracers and consumer daemons) of
43 LTTng.
44
45* Sends asynchronous notifications to user applications.
46
47A session daemon receives commands from the man:lttng(1) command-line
48tool, as well as from any user application linked with the LTTng control
49library (`liblttng-ctl`).
50
51Each Unix user may have its own independent running session daemon.
52However, the man:lttng(1) tool must connect to the session daemon of the
53`root` user (the root session daemon) to control Linux kernel tracing.
54
55When you start `lttng-sessiond` as the `root` Unix user, a non-root Unix
56user can connect to it if it's part of the Unix tracing group. By
57default, the name of the tracing group is `tracing`. Override the
58tracing group name with the option:--group option.
59
60See the ``Session daemon connection'' section of man:lttng(1) to learn
61how a user application connects to a session daemon.
62
63A session daemon manages trace data consumer daemons, spawning them when
64necessary. You do :not: need to manage the consumer daemons yourself.
65
66By default, `lttng-sessiond` doesn't start as a daemon. Make it a daemon
67with the option:--daemonize or option:--background option. With those
68options, `lttng-sessiond` ensures the daemon is ready to receive client
69commands before it exits.
70
71NOTE: The LTTng project recommends that you start the session daemon at
72boot time for stable and long-term tracing.
73
74
75[[cfg]]
76Daemon configuration
77~~~~~~~~~~~~~~~~~~~~
78When you run `lttng-sessiond`, it configures itself from, in this order:
79
80. The INI configuration file +{system_lttng_conf}+, if any.
81
82. The INI configuration file `$LTTNG_HOME/.lttng/lttng.conf`, if any.
83+
84`$LTTNG_HOME` defaults to `$HOME`.
85
86. With the option:--config='PATH' option: the INI configuration file
87 'PATH'.
88
89. The command-line options.
90
91Each step can override a previous configuration property.
92
93In INI configuration files, the session daemon only reads the properties
94under the `sessiond` INI section. Each INI property is:
95
96Key::
97 The long name of a command-line option to set (see the
98 <<options,OPTIONS>> section below).
99
100Value::
101 The selected command-line option accepts an argument:::
102 Option argument (string).
103
104 The selected command-line option is a switch:::
105 `true`::::
106 `yes`::::
107 `on`::::
108 Enable the option.
109
110 `false`::::
111 `no`::::
112 `off`::::
113 Disable the option.
114
115INI configuration file example:
116
117[source,ini]
118----
119[sessiond]
120daemonize=yes
121extra-kmod-probes=my-driver,other-module
122----
123
124
125[[load]]
126Tracing session configuration loading
127~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128When the session daemon starts, it loads tracing session configurations
129from:
130
131Without the option:--load option::
132 In this order:
133+
134--
135. All the files in `$LTTNG_HOME/.lttng/sessions/auto`.
136+
137`$LTTNG_HOME` defaults to `$HOME`.
138
139. All the files in +{system_sessions_auto_dir}+.
140--
141+
142`lttng-sessiond` only loads tracing configuration files from the
143directories above if its UID and their UID are the same.
144
145With the option:--load='PATH' option::
146 'PATH' is a directory:::
147 All the files in 'PATH'.
148
149 'PATH' is a file:::
150 The file 'PATH'.
151
152
153[[options]]
154OPTIONS
155-------
156Daemon configuration
157~~~~~~~~~~~~~~~~~~~~
158option:-b, option:--background::
159 Start as a Unix daemon, but keep file descriptors (console) open.
160+
161With this option, `lttng-sessiond` ensures the daemon is ready to
162receive client commands before it exits.
163+
164Use the option:--daemonize option instead to close the file descriptors.
165
166option:-f 'PATH', option:--config='PATH'::
167 Configure the daemon using the INI configuration file 'PATH' in
168 addition to the default configuration files and the command-line
169 options.
170+
171See the <<cfg,Daemon configuration>> section above.
172
173option:-d, option:--daemonize::
174 Start as a Unix daemon and close file descriptors (console).
175+
176With this option, `lttng-sessiond` ensures the daemon is ready to
177receive client commands before it exits.
178+
179Use the option:--background option instead to keep the file descriptors
180open.
181
182option:-g 'GROUP', option:--group='GROUP'::
183 Set the Unix tracing group to 'GROUP' instead of `tracing`.
184+
185This option is only meaningful when the `root` Unix user starts
186`lttng-sessiond`.
187+
188Members of the Unix tracing group may connect to the root session daemon
189and, therefore, control LTTng kernel tracing.
190
191option:-l 'PATH', option:--load='PATH'::
192 Load tracing session configurations from 'PATH', either a directory
193 or a file, instead of loading them from the default search
194 directories.
195+
196See the <<load,Tracing session configuration loading>> section above.
197
198option:-S, option:--sig-parent::
199 Send the `USR1` signal to the parent process to notify readiness.
200+
201You can also use the option:--daemonize or option:--background option,
202in which case `lttng-sessiond` ensures the daemon is ready to receive
203client commands before it exits.
204
205
206Linux kernel tracing
207~~~~~~~~~~~~~~~~~~~~
208At most one of:
209
210option:--extra-kmod-probes='PROBE'[,'PROBE']...::
211 For each 'PROBE' argument, load the LTTng kernel probe module
212 named ++lttng-probe-++__PROBE__++.ko++, in addition to loading the
213 default LTTng kernel probe modules.
214
215option:--kmod-probes='PROBE'[,'PROBE']...::
216 Only load, for each 'PROBE' argument, the LTTng kernel probe
217 module named ++lttng-probe-++__PROBE__++.ko++, instead of loading
218 the default LTTng kernel probe modules.
219
220option:--no-kernel::
221 Disable Linux kernel tracing.
222
223
224Paths and ports
225~~~~~~~~~~~~~~~
226option:--agent-tcp-port='PORT'::
227 Listen on TCP port 'PORT' for agent application registration
228 instead of a port within the range
229 [{default_agent_tcp_port_range_begin},{nbsp}{default_agent_tcp_port_range_end}]).
230
231option:-a 'PATH', option:--apps-sock='PATH'::
232 Set the application Unix socket path to 'PATH'.
233
234option:-c 'PATH', option:--client-sock='PATH'::
235 Set the client Unix socket path to 'PATH'.
236
237option:--consumerd32-libdir='PATH'::
238 Set the 32-bit consumer daemon library directory to 'PATH'.
239
240option:--consumerd32-path='PATH'::
241 Set the 32-bit consumer daemon binary path to 'PATH'.
242
243option:--consumerd64-libdir='PATH'::
244 Set the 64-bit consumer daemon library directory to 'PATH'.
245
246option:--consumerd64-path='PATH'::
247 Set the 64-bit consumer daemon binary path to 'PATH'.
248
249option:--kconsumerd-cmd-sock='PATH'::
250 Set the command Unix socket path of the Linux kernel consumer daemon
251 to 'PATH'.
252
253option:--kconsumerd-err-sock='PATH'::
254 Set the error Unix socket path of the Linux kernel consumer daemon
255 to 'PATH'.
256
257option:--ustconsumerd32-cmd-sock='PATH'::
258 Set the Unix socket path of the 32-bit consumer daemon command to
259 'PATH'.
260
261option:--ustconsumerd64-cmd-sock='PATH'::
262 Set the Unix socket path of the 64-bit consumer daemon command to
263 'PATH'.
264
265option:--ustconsumerd32-err-sock='PATH'::
266 Set the Unix socket path of the 32-bit consumer daemon error to
267 'PATH'.
268
269option:--ustconsumerd64-err-sock='PATH'::
270 Set the Unix socket path of the 64-bit consumer daemon error to
271 'PATH'.
272
273
274Buffer size of event notifier error counters
275~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276option:--event-notifier-error-buffer-size-kernel='SLOTS'::
277 Set the size of the kernel event notifier error counter buffers to
278 'SLOTS'{nbsp}slots.
279
280option:--event-notifier-error-buffer-size-userspace='SLOTS'::
281 Set the size of the user space event notifier error counter buffers
282 to 'SLOTS'{nbsp}slots.
283
284As of LTTng{nbsp}{lttng_version}, a _slot_ is a 32-bit counter, but this
285may change in the future.
286
287
288Verbosity
289~~~~~~~~~
290option:-q, option:--quiet::
291 Suppress all messages, including warnings and errors.
292+
293You may :not: use this option with the option:--verbose and
294option:--verbose-consumer options.
295
296option:-v, option:--verbose::
297 Increase verbosity.
298+
299Specify this option up to three times to get more levels of verbosity.
300+
301You may :not: use this option with the option:--quiet option.
302
303option:--verbose-consumer::
304 Increase the verbosity of the consumer daemons which this session
305 daemon spawns.
306+
307You may :not: use this option with the option:--quiet option.
308
309
310Program information
311~~~~~~~~~~~~~~~~~~~
312include::common-help-option.txt[]
313
314option:-V, option:--version::
315 Show version and quit.
316
317
318ENVIRONMENT VARIABLES
319---------------------
320`LTTNG_ABORT_ON_ERROR`::
321 Set to `1` to abort the process after the first error is
322 encountered.
323
324`LTTNG_APP_SOCKET_TIMEOUT`::
325 Timeout (in seconds) of the application socket when
326 sending/receiving commands.
327+
328After this period of time, `lttng-sessiond` unregisters the application.
329+
330Set to `0` or `-1` to set an infinite timeout.
331+
332Default: +{default_app_socket_rw_timeout}+.
333
334`LTTNG_CONSUMERD32_BIN`::
335 32-bit consumer daemon binary path.
336+
337The option:--consumerd32-path option overrides this variable.
338
339`LTTNG_CONSUMERD32_LIBDIR`::
340 32-bit consumer daemon library directory path.
341+
342The option:--consumerd32-libdir option overrides this variable.
343
344`LTTNG_CONSUMERD64_BIN`::
345 64-bit consumer daemon binary path.
346+
347The option:--consumerd64-path option overrides this variable.
348
349`LTTNG_CONSUMERD64_LIBDIR`::
350 64-bit consumer daemon library directory path.
351+
352The option:--consumerd64-libdir option overrides this variable.
353
354`LTTNG_DEBUG_NOCLONE`::
355 Set to `1` to disable the use of man:clone(2)/man:fork(2).
356+
357Setting this variable is considered insecure, but it's required to allow
358debuggers to work with `lttng-sessiond` on some operating systems.
359
360`LTTNG_EXTRA_KMOD_PROBES`::
361 Extra LTTng kernel probe modules to load.
362+
363See the option:--extra-kmod-probes option which overrides this
364environment variable.
365
366`LTTNG_KMOD_PROBES`::
367 Exclusive LTTng kernel probe modules to load.
368+
369See the option:--kmod-probes option which overrides this environment
370variable.
371
372`LTTNG_NETWORK_SOCKET_TIMEOUT`::
373 Socket connection, receive, and send timeout (milliseconds).
374+
375Set to `0` or `-1` to use the timeout of the operating system (default).
376
377`LTTNG_SESSION_CONFIG_XSD_PATH`::
378 Tracing session configuration XML schema definition (XSD) path.
379
380
381FILES
382-----
383`$LTTNG_HOME/.lttng`::
384 Unix user's LTTng runtime and configuration directory.
385
386`$LTTNG_HOME/lttng-traces`::
387 Default output directory of LTTng traces in local and snapshot
388 modes.
389+
390Override this path with the nloption:--output option of the
391man:lttng-create(1) command.
392
393`$LTTNG_HOME/.lttng/sessions/auto`::
394 Directory from which `lttng-sessiond` loads Unix user tracing
395 session configurations when starting.
396+
397See the <<load,Tracing session configuration loading>> section above to
398learn more.
399
400+{system_sessions_auto_dir}+::
401 Directory from which `lttng-sessiond` loads system-wide tracing
402 session configurations when starting.
403+
404See the <<load,Tracing session configuration loading>> section above to
405learn more.
406
407`$LTTNG_HOME/.lttng/lttng.conf`::
408 Unix user's LTTng daemon INI configuration file.
409+
410See the <<cfg,Daemon configuration>> section above to learn more.
411
412+{system_lttng_conf}+::
413 System-wide LTTng daemon INI configuration file.
414+
415See the <<cfg,Daemon configuration>> section above to learn more.
416
417NOTE: `$LTTNG_HOME` defaults to `$HOME`.
418
419
420EXIT STATUS
421-----------
422*0*::
423 Success
424
425*1*::
426 Error
427
428*3*::
429 Fatal error
430
431
432LIMITATIONS
433-----------
434For an unprivileged Unix user running `lttng-sessiond`, the maximum
435number of file descriptors per process is usually 1024. This limits the
436number of traceable applications, since, for each instrumented
437application, there are two file descriptors per CPU as well as one
438socket for bidirectional communication.
439
440For the `root` user, the limit is usually 65,535.
441
442
443include::common-footer.txt[]
444
445
446SEE ALSO
447--------
448man:lttng(1)
This page took 0.024154 seconds and 4 git commands to generate.