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