3 :revdate: 17 September 2018
8 lttng-sessiond - LTTng 2 tracing session daemon
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:--quiet | [option:-v | option:-vv | option:-vvv] [option:--verbose-consumer]]
33 The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
34 source software package used for correlated tracing of the Linux kernel,
35 user applications, and user libraries.
37 LTTng consists of Linux kernel modules (for Linux kernel tracing) and
38 dynamically loaded libraries (for user application and library tracing).
40 The _LTTng session daemon_ is a tracing registry which allows the user
41 to interact with multiple tracers (kernel and user space) within the
42 same container, a _tracing session_. Traces can be gathered from the
43 Linux kernel and/or from instrumented applications (see
44 man:lttng-ust(3)). You can aggregate and read the events of LTTng
45 traces using man:babeltrace(1).
47 To trace the Linux kernel, the session daemon needs to be running as
48 `root`. LTTng uses a _tracing group_ to allow specific users to interact
49 with the root session daemon. The default tracing group name is
50 `tracing`. You can use the option:--group option to set the tracing
53 Session daemons can coexist. You can have a session daemon running as
54 user Alice that can be used to trace her applications alongside a root
55 session daemon or a session daemon running as user Bob.
57 The LTTng session daemon manages trace data consumer daemons by spawning
58 them when necessary. You do not need to manage the consumer daemons
61 NOTE: It is highly recommended to start the session daemon at boot time
62 for stable and long-term tracing.
65 Automatic loading of tracing session configurations
66 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 When the session daemon starts, it automatically loads session
70 The following directories are searched, non-recursively, in this order
71 for configuration files to load on launch:
73 . `$LTTNG_HOME/.lttng/sessions/auto` (`$LTTNG_HOME` defaults to `$HOME`)
74 . +{system_sessions_auto_dir}+
76 Note that both the directory containing the tracing session
77 configurations _and_ the session daemon binary _must_ share the same UID
78 for the configurations to be automatically loaded.
80 The option:--load option overrides the default directories _and_ the UID
81 check. The session daemon simply checks if the path is accessible and
82 tries to load every tracing session configuration in it. When this
83 option is specified, the default directories are :not: searched for
84 configuration files. When the option is not specified, _both_ default
85 directories are searched for configuration files.
87 If the option:--load option's argument is a directory, then all the
88 tracing session configurations found in all the files in this directory
89 are loaded. If the argument is a file, then all the tracing session
90 configurations found in this file are loaded.
97 option:-b, option:--background::
98 Start as Unix daemon, but keep file descriptors (console) open.
99 Use the option:--daemonize option instead to close the file
102 option:-d, option:--daemonize::
103 Start as Unix daemon, and close file descriptors (console). Use the
104 option:--background option instead to keep the file descriptors
107 option:-f, option:--config='PATH'::
108 Load session daemon configuration from path 'PATH'.
110 option:-g, option:--group='GROUP'::
111 Use 'GROUP' as Unix tracing group (default: `tracing`).
113 option:-l, option:--load='PATH'::
114 Automatically load tracing session configurations from 'PATH',
115 either a directory or a file, instead of loading them from the
116 default search directories.
118 option:-S, option:--sig-parent::
119 Send `SIGUSR1` to parent process to notify readiness.
121 NOTE: This is used by man:lttng(1) to get notified when the
122 session daemon is ready to accept commands. When building a third party
123 tool on liblttng-ctl, this option can be very handy to synchronize the
124 control tool and the session daemon.
129 option:--extra-kmod-probes='PROBE'[,'PROBE']...::
130 Load specific LTTng Linux kernel modules when kernel tracing
131 is enabled (option:--no-kernel option is :not: specified), in
132 addition to loading the default list of LTTng kernel modules.
134 Only the name of the probe needs to be specified, without the
135 `lttng-probe-` prefix and without the kernel module extension suffix.
136 For example, specify `sched` to load the `lttng-probe-sched.ko` kernel
139 option:--kmod-probes='PROBE'[,'PROBE']...::
140 Only load specific LTTng Linux kernel modules when kernel tracing
141 is enabled (option:--no-kernel option is :not: specified).
143 Only the name of the probe needs to be specified, without the
144 `lttng-probe-` prefix and without the kernel module extension suffix.
145 For example, specify `sched` to load the `lttng-probe-sched.ko` kernel
149 Disable Linux kernel tracing.
154 option:--agent-tcp-port='PORT'::
155 Listen on TCP port 'PORT' for agent application registrations
156 (default: a port within the range
157 [{default_agent_tcp_port_range_begin},{nbsp}{default_agent_tcp_port_range_end}]).
159 option:-a 'PATH', option:--apps-sock='PATH'::
160 Set application Unix socket path to 'PATH'.
162 option:-c 'PATH', option:--client-sock='PATH'::
163 Set client Unix socket path to 'PATH'.
165 option:--consumerd32-libdir='PATH'::
166 Set 32-bit consumer daemon library directory to 'PATH'.
168 option:--consumerd32-path='PATH'::
169 Set 32-bit consumer daemon binary path to 'PATH'.
171 option:--consumerd64-libdir='PATH'::
172 Set 64-bit consumer daemon library directory to 'PATH'.
174 option:--consumerd64-path='PATH'::
175 Set 64-bit consumer daemon binary path to 'PATH'.
177 option:--kconsumerd-cmd-sock='PATH'::
178 Set Linux kernel consumer daemon's command Unix socket path
181 option:--kconsumerd-err-sock='PATH'::
182 Set Linux kernel consumer daemon's error Unix socket path
185 option:--ustconsumerd32-cmd-sock='PATH'::
186 Set 32-bit consumer daemon's command Unix socket path to 'PATH'.
188 option:--ustconsumerd64-cmd-sock='PATH'::
189 Set 64-bit consumer daemon's command Unix socket path to 'PATH'.
191 option:--ustconsumerd32-err-sock='PATH'::
192 Set 32-bit consumer daemon's error Unix socket path to 'PATH'.
194 option:--ustconsumerd64-err-sock='PATH'::
195 Set 64-bit consumer daemon's error Unix socket path to 'PATH'.
200 option:-q, option:--quiet::
201 Suppress all messages, including warnings and errors.
203 option:-v, option:--verbose::
206 Three levels of verbosity are available, which are triggered by
207 appending additional `v` letters to the option
208 (that is, `-vv` and `-vvv`).
210 option:--verbose-consumer::
211 Increase verbosity of consumer daemons spawned by this session
217 option:-h, option:--help::
220 option:-V, option:--version::
224 ENVIRONMENT VARIABLES
225 ---------------------
226 Note that command-line options override their equivalent environment
229 `LTTNG_ABORT_ON_ERROR`::
230 Set to 1 to abort the process after the first error is encountered.
232 `LTTNG_APP_SOCKET_TIMEOUT`::
233 Application socket's timeout (seconds) when sending/receiving
234 commands. After this period of time, the application is unregistered
235 by the session daemon. A value of 0 or -1 means an infinite timeout.
236 Default value: {default_app_socket_rw_timeout}.
238 `LTTNG_CONSUMERD32_BIN`::
239 32-bit consumer daemon binary path.
241 The option:--consumerd32-path option overrides this variable.
243 `LTTNG_CONSUMERD32_LIBDIR`::
244 32-bit consumer daemon library path.
246 The option:--consumerd32-libdir option overrides this variable.
248 `LTTNG_CONSUMERD64_BIN`::
249 64-bit consumer daemon binary path.
251 The option:--consumerd64-path option overrides this variable.
253 `LTTNG_CONSUMERD64_LIBDIR`::
254 64-bit consumer daemon library path.
256 The option:--consumerd64-libdir option overrides this variable.
258 `LTTNG_DEBUG_NOCLONE`::
259 Set to 1 to disable the use of `clone()`/`fork()`. Setting this
260 variable is considered insecure, but it is required to allow
261 debuggers to work with the session daemon on some operating systems.
263 `LTTNG_EXTRA_KMOD_PROBES`::
264 Load specific LTTng Linux kernel modules when kernel tracing
265 is enabled (option:--no-kernel option is :not: specified), in
266 addition to loading the default list of LTTng kernel modules.
268 The option:--extra-kmod-probes option overrides this variable.
270 `LTTNG_KMOD_PROBES`::
271 Only load specific LTTng Linux kernel modules when kernel tracing
272 is enabled (option:--no-kernel option is :not: specified).
274 The option:--kmod-probes option overrides this variable.
276 `LTTNG_NETWORK_SOCKET_TIMEOUT`::
277 Socket connection, receive and send timeout (milliseconds). A value
278 of 0 or -1 uses the timeout of the operating system (default).
280 `LTTNG_SESSION_CONFIG_XSD_PATH`::
281 Tracing session configuration XML schema definition (XSD) path.
286 `$LTTNG_HOME/.lttng`::
287 User LTTng runtime and configuration directory.
289 `$LTTNG_HOME/lttng-traces`::
290 Default output directory of LTTng traces. This can be overridden
291 with the nloption:--output option of the man:lttng-create(1)
294 `$LTTNG_HOME/.lttng/sessions/auto`::
295 Directory from which user tracing configuration files are
296 automatically loaded when the session daemon starts (see
297 man:lttng-save(1) and man:lttng-load(1) for saving
298 and loading tracing sessions).
300 +{system_sessions_auto_dir}+::
301 Directory from which system-wide tracing configuration files are
302 automatically loaded when the session daemon starts (see
303 man:lttng-save(1) and man:lttng-load(1) for saving
304 and loading tracing sessions).
306 `$LTTNG_HOME/.lttng/lttng.conf`::
307 Default location of the session daemon configuration file (see the
308 option:--config option).
310 +{system_lttng_conf}+::
311 System-wide location of the session daemon configuration file (see
312 the option:--config option).
314 NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
331 For an unprivileged user running `lttng-sessiond`, the maximum number of
332 file descriptors per process is usually 1024. This limits the number of
333 traceable applications, since for each instrumented application, there
334 is two file descriptors per CPU and one more socket for bidirectional
337 For the root user, the limit is bumped to 65535. A future version will
338 deal with this limitation.
341 include::common-footer.txt[]