File: lttng-sessiond.8.txt

package info (click to toggle)
ltt-control 2.13.9-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,668 kB
  • sloc: ansic: 166,727; sh: 26,657; makefile: 2,804; python: 1,374; yacc: 692; lex: 129; java: 109; perl: 99; cpp: 27; xml: 23
file content (431 lines) | stat: -rw-r--r-- 12,937 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
lttng-sessiond(8)
=================
:revdate: 14 June 2021
:daemon-bin-name: lttng-sessiond
:daemon-ini-section: sessiond


NAME
----
lttng-sessiond - LTTng session daemon


SYNOPSIS
--------
[verse]
*lttng-sessiond* [option:--background | option:--daemonize] [option:--sig-parent]
               [option:--config='PATH'] [option:--group='GROUP'] [option:--load='PATH']
               [option:--agent-tcp-port='PORT']
               [option:--apps-sock='PATH'] [option:--client-sock='PATH']
               [option:--no-kernel | [option:--kmod-probes='PROBE'[,'PROBE']...]
                              [option:--extra-kmod-probes='PROBE'[,'PROBE']...]
                              [option:--kconsumerd-err-sock='PATH']
                              [option:--kconsumerd-cmd-sock='PATH']]
               [option:--ustconsumerd32-err-sock='PATH']
               [option:--ustconsumerd64-err-sock='PATH']
               [option:--ustconsumerd32-cmd-sock='PATH']
               [option:--ustconsumerd64-cmd-sock='PATH']
               [option:--consumerd32-path='PATH'] [option:--consumerd32-libdir='PATH']
               [option:--consumerd64-path='PATH'] [option:--consumerd64-libdir='PATH']
               [option:--event-notifier-error-buffer-size-kernel='SLOTS']
               [option:--event-notifier-error-buffer-size-userspace='SLOTS']
               [option:--quiet | [option:--verbose]... [option:--verbose-consumer]]


DESCRIPTION
-----------
include::common-intro.txt[]

An LTTng session daemon, `lttng-sessiond`, is a program which:

* Manages recording sessions (see man:lttng-concepts(7) to learn more
  about recording sessions).

* Controls the various components (like tracers and consumer daemons) of
  LTTng.

* Sends asynchronous notifications to user applications.

A session daemon receives commands from the man:lttng(1) command-line
tool, as well as from any user application linked with the LTTng control
library (`liblttng-ctl`).

Each Unix user may have its own independent running session daemon.
However, the man:lttng(1) tool must connect to the session daemon of the
`root` user (the root session daemon) to control Linux kernel tracing.

When you start `lttng-sessiond` as the `root` Unix user, a non-root Unix
user can connect to it if it's part of the Unix tracing group. By
default, the name of the tracing group is `tracing`. Override the
tracing group name with the option:--group option.

See the ``Session daemon connection'' section of man:lttng(1) to learn
how a user application connects to a session daemon.

A session daemon manages trace data consumer daemons, spawning them when
necessary. You do :not: need to manage the consumer daemons yourself.

By default, `lttng-sessiond` doesn't start as a daemon. Make it a daemon
with the option:--daemonize or option:--background option. With those
options, `lttng-sessiond` ensures the daemon is ready to receive client
commands before it exits.

NOTE: The LTTng project recommends that you start the session daemon at
boot time for stable and long-term tracing.

[NOTE]
====
For an unprivileged Unix user running `lttng-sessiond`, the maximum
number of file descriptors per process is usually 1024. This limits the
number of traceable applications, since, for each instrumented
application, there are two file descriptors per CPU as well as one
socket for bidirectional communication.

For the `root` user, the limit is usually 65,535.
====


include::common-daemon-cfg.txt[]

INI configuration file example:

[source,ini]
----
[sessiond]
daemonize=yes
extra-kmod-probes=my-driver,other-module
----


[[load]]
Recording session configuration loading
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When the session daemon starts, it loads recording session
configurations from:

Without the option:--load option::
    In this order:
+
--
. All the files in `$LTTNG_HOME/.lttng/sessions/auto`.
+
`$LTTNG_HOME` defaults to `$HOME`.

. All the files in +{system_sessions_auto_dir}+.
--
+
`lttng-sessiond` only loads recording session configuration files from
the directories above if its UID and their UID are the same.

With the option:--load='PATH' option::
    'PATH' is a directory:::
        All the files in 'PATH'.

    'PATH' is a file:::
        The file 'PATH'.


[[options]]
OPTIONS
-------
General daemon configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
option:-b, option:--background::
    Start as a Unix daemon, but keep file descriptors (console) open.
+
With this option, `lttng-sessiond` ensures the daemon is ready to
receive client commands before it exits.
+
Use the option:--daemonize option instead to close the file descriptors.

option:-f 'PATH', option:--config='PATH'::
    Configure the daemon using the INI configuration file 'PATH' in
    addition to the default configuration files and the command-line
    options.
+
See the ``<<cfg,Daemon configuration>>'' section above.

option:-d, option:--daemonize::
    Start as a Unix daemon and close file descriptors (console).
+
With this option, `lttng-sessiond` ensures the daemon is ready to
receive client commands before it exits.
+
Use the option:--background option instead to keep the file descriptors
open.

option:-g 'GROUP', option:--group='GROUP'::
    Set the Unix tracing group to 'GROUP' instead of `tracing`.
+
This option is only meaningful when the `root` Unix user starts
`lttng-sessiond`.
+
Members of the Unix tracing group may connect to the root session daemon
and, therefore, control LTTng kernel tracing.

option:-l 'PATH', option:--load='PATH'::
    Load recording session configurations from 'PATH', either a
    directory or a file, instead of loading them from the default search
    directories.
+
See the ``<<load,Recording session configuration loading>>'' section
above.

option:-S, option:--sig-parent::
    Send the `USR1` signal to the parent process to notify readiness.
+
You can also use the option:--daemonize or option:--background option,
in which case `lttng-sessiond` ensures the daemon is ready to receive
client commands before it exits.


Linux kernel tracing
~~~~~~~~~~~~~~~~~~~~
At most one of:

option:--extra-kmod-probes='PROBE'[,'PROBE']...::
    For each 'PROBE' argument, load the LTTng kernel probe module
    named ++lttng-probe-++__PROBE__++.ko++, in addition to loading the
    default LTTng kernel probe modules.
+
See also the `LTTNG_EXTRA_KMOD_PROBES` environment variable.

option:--kmod-probes='PROBE'[,'PROBE']...::
    Only load, for each 'PROBE' argument, the LTTng kernel probe
    module named ++lttng-probe-++__PROBE__++.ko++, instead of loading
    the default LTTng kernel probe modules.
+
See also the `LTTNG_KMOD_PROBES` environment variable.

option:--no-kernel::
    Disable Linux kernel tracing.


Paths and ports
~~~~~~~~~~~~~~~
option:--agent-tcp-port='PORT'::
    Listen on TCP port 'PORT' for agent application registration
    instead of a port within the range
    [{default_agent_tcp_port_range_begin},{nbsp}{default_agent_tcp_port_range_end}]).

option:-a 'PATH', option:--apps-sock='PATH'::
    Set the application Unix socket path to 'PATH'.

option:-c 'PATH', option:--client-sock='PATH'::
    Set the client Unix socket path to 'PATH'.

option:--consumerd32-libdir='PATH'::
    Set the 32-bit consumer daemon library directory to 'PATH'.
+
See also the `LTTNG_CONSUMERD32_LIBDIR` environment variable.

option:--consumerd32-path='PATH'::
    Set the 32-bit consumer daemon binary path to 'PATH'.
+
See also the `LTTNG_CONSUMERD32_BIN` environment variable.

option:--consumerd64-libdir='PATH'::
    Set the 64-bit consumer daemon library directory to 'PATH'.
+
See also the `LTTNG_CONSUMERD64_LIBDIR` environment variable.

option:--consumerd64-path='PATH'::
    Set the 64-bit consumer daemon binary path to 'PATH'.
+
See also the `LTTNG_CONSUMERD32_BIN` environment variable.

option:--kconsumerd-cmd-sock='PATH'::
    Set the command Unix socket path of the Linux kernel consumer daemon
    to 'PATH'.

option:--kconsumerd-err-sock='PATH'::
    Set the error Unix socket path of the Linux kernel consumer daemon
    to 'PATH'.

option:--ustconsumerd32-cmd-sock='PATH'::
    Set the Unix socket path of the 32-bit consumer daemon command to
    'PATH'.

option:--ustconsumerd64-cmd-sock='PATH'::
    Set the Unix socket path of the 64-bit consumer daemon command to
    'PATH'.

option:--ustconsumerd32-err-sock='PATH'::
    Set the Unix socket path of the 32-bit consumer daemon error to
    'PATH'.

option:--ustconsumerd64-err-sock='PATH'::
    Set the Unix socket path of the 64-bit consumer daemon error to
    'PATH'.


Buffer size of event notifier error counters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
option:--event-notifier-error-buffer-size-kernel='SLOTS'::
    Set the size of the kernel event notifier error counter buffers to
    'SLOTS'{nbsp}slots.

option:--event-notifier-error-buffer-size-userspace='SLOTS'::
    Set the size of the user space event notifier error counter buffers
    to 'SLOTS'{nbsp}slots.

As of LTTng{nbsp}{lttng_version}, a _slot_ is a 32-bit counter, but this
may change in the future.


Verbosity
~~~~~~~~~
option:-q, option:--quiet::
    Suppress all messages, including warnings and errors.
+
You may :not: use this option with the option:--verbose and
option:--verbose-consumer options.

option:-v, option:--verbose::
    Increase verbosity.
+
Specify this option up to three times to get more levels of verbosity.
+
You may :not: use this option with the option:--quiet option.

option:--verbose-consumer::
    Increase the verbosity of the consumer daemons which this session
    daemon spawns.
+
You may :not: use this option with the option:--quiet option.


Program information
~~~~~~~~~~~~~~~~~~~
include::common-help-option.txt[]

option:-V, option:--version::
    Show version and quit.


EXIT STATUS
-----------
*0*::
    Success

*1*::
    Error

*3*::
    Fatal error


ENVIRONMENT
-----------
`LTTNG_ABORT_ON_ERROR`::
    Set to `1` to abort the process after the first error is
    encountered.

`LTTNG_APP_SOCKET_TIMEOUT`::
    Timeout (in seconds) of the application socket when
    sending/receiving commands.
+
After this period of time, `lttng-sessiond` unregisters the application.
+
Set to `0` or `-1` to set an infinite timeout.
+
Default: +{default_app_socket_rw_timeout}+.

`LTTNG_CONSUMERD32_BIN`::
    32-bit consumer daemon binary path.
+
The option:--consumerd32-path option overrides this environment
variable.

`LTTNG_CONSUMERD32_LIBDIR`::
    32-bit consumer daemon library directory path.
+
The option:--consumerd32-libdir option overrides this environment
variable.

`LTTNG_CONSUMERD64_BIN`::
    64-bit consumer daemon binary path.
+
The option:--consumerd64-path option overrides this environment
variable.

`LTTNG_CONSUMERD64_LIBDIR`::
    64-bit consumer daemon library directory path.
+
The option:--consumerd64-libdir option overrides this environment
variable.

`LTTNG_DEBUG_NOCLONE`::
    Set to `1` to disable the use of man:clone(2)/man:fork(2).
+
Setting this environment variable is considered insecure, but it's
required to allow debuggers to work with `lttng-sessiond` on some
operating systems.

`LTTNG_EXTRA_KMOD_PROBES`::
    Extra LTTng kernel probe modules to load.
+
See the option:--extra-kmod-probes option which overrides this
environment variable.

`LTTNG_KMOD_PROBES`::
    Exclusive LTTng kernel probe modules to load.
+
See the option:--kmod-probes option which overrides this environment
variable.

`LTTNG_NETWORK_SOCKET_TIMEOUT`::
    Socket connection, receive, and send timeout (milliseconds).
+
Set to `0` or `-1` to use the timeout of the operating system (default).

`LTTNG_SESSION_CONFIG_XSD_PATH`::
    Recording session configuration XML schema definition (XSD) path.


FILES
-----
`$LTTNG_HOME/.lttng`::
    Unix user's LTTng runtime and configuration directory.

`$LTTNG_HOME/lttng-traces`::
    Default output directory of LTTng traces in local and snapshot
    modes.
+
Override this path with the nloption:--output option of the
man:lttng-create(1) command.

`$LTTNG_HOME/.lttng/sessions/auto`::
    Directory from which `lttng-sessiond` loads Unix user recording
    session configurations when starting.
+
See the ``<<load,Recording session configuration loading>>'' section
above to learn more.

+{system_sessions_auto_dir}+::
    Directory from which `lttng-sessiond` loads system-wide recording
    session configurations when starting.
+
See the ``<<load,Recording session configuration loading>>'' section
above to learn more.

`$LTTNG_HOME/.lttng/lttng.conf`::
    Unix user's LTTng daemon INI configuration file.
+
See the ``<<cfg,Daemon configuration>>'' section above to learn more.

+{system_lttng_conf}+::
    System-wide LTTng daemon INI configuration file.
+
See the ``<<cfg,Daemon configuration>>'' section above to learn more.

NOTE: `$LTTNG_HOME` defaults to `$HOME`.


include::common-footer.txt[]


SEE ALSO
--------
man:lttng(1),
man:lttng-concepts(7)