table of contents
LTTNG-SESSIOND(8) | LTTng Manual | LTTNG-SESSIOND(8) |
NAME¶
lttng-sessiond - LTTng session daemon
SYNOPSIS¶
lttng-sessiond [--background | --daemonize] [--sig-parent]
[--config=PATH] [--group=GROUP] [--load=PATH]
[--agent-tcp-port=PORT]
[--apps-sock=PATH] [--client-sock=PATH]
[--no-kernel | [--kmod-probes=PROBE[,PROBE]...]
[--extra-kmod-probes=PROBE[,PROBE]...]
[--kconsumerd-err-sock=PATH]
[--kconsumerd-cmd-sock=PATH]]
[--ustconsumerd32-err-sock=PATH]
[--ustconsumerd64-err-sock=PATH]
[--ustconsumerd32-cmd-sock=PATH]
[--ustconsumerd64-cmd-sock=PATH]
[--consumerd32-path=PATH] [--consumerd32-libdir=PATH]
[--consumerd64-path=PATH] [--consumerd64-libdir=PATH]
[--event-notifier-error-buffer-size-kernel=SLOTS]
[--event-notifier-error-buffer-size-userspace=SLOTS]
[--quiet | [--verbose]... [--verbose-consumer]]
DESCRIPTION¶
The Linux Trace Toolkit: next generation <https://lttng.org/> is an open-source software package used for correlated tracing of the Linux kernel, user applications, and user libraries.
LTTng consists of Linux kernel modules (for Linux kernel tracing) and dynamically loaded libraries (for user application and library tracing).
An LTTng session daemon, lttng-sessiond, is a program which:
A session daemon receives commands from the 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 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 --group option.
See the “Session daemon connection” section of 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 --daemonize or --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.
Daemon configuration¶
When you run lttng-sessiond, it configures itself from, in this order:
$LTTNG_HOME defaults to $HOME.
Each step can override a previous configuration property.
In INI configuration files, the session daemon only reads the properties under the sessiond INI section. Each INI property is:
Key
Value
The selected command-line option accepts an argument
The selected command-line option is a switch
true, yes, on
false, no, off
INI configuration file example:
[sessiond] daemonize=yes extra-kmod-probes=my-driver,other-module
Recording session configuration loading¶
When the session daemon starts, it loads recording session configurations from:
Without the --load option
$LTTNG_HOME defaults to $HOME.
lttng-sessiond only loads recording session configuration files from the directories above if its UID and their UID are the same.
With the --load=PATH option
PATH is a directory
PATH is a file
OPTIONS¶
General daemon configuration¶
-b, --background
With this option, lttng-sessiond ensures the daemon is ready to receive client commands before it exits.
Use the --daemonize option instead to close the file descriptors.
-f PATH, --config=PATH
See the “Daemon configuration” section above.
-d, --daemonize
With this option, lttng-sessiond ensures the daemon is ready to receive client commands before it exits.
Use the --background option instead to keep the file descriptors open.
-g GROUP, --group=GROUP
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.
-l PATH, --load=PATH
See the “Recording session configuration loading” section above.
-S, --sig-parent
You can also use the --daemonize or --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:
--extra-kmod-probes=PROBE[,PROBE]...
See also the LTTNG_EXTRA_KMOD_PROBES environment variable.
--kmod-probes=PROBE[,PROBE]...
See also the LTTNG_KMOD_PROBES environment variable.
--no-kernel
Paths and ports¶
--agent-tcp-port=PORT
-a PATH, --apps-sock=PATH
-c PATH, --client-sock=PATH
--consumerd32-libdir=PATH
See also the LTTNG_CONSUMERD32_LIBDIR environment variable.
--consumerd32-path=PATH
See also the LTTNG_CONSUMERD32_BIN environment variable.
--consumerd64-libdir=PATH
See also the LTTNG_CONSUMERD64_LIBDIR environment variable.
--consumerd64-path=PATH
See also the LTTNG_CONSUMERD32_BIN environment variable.
--kconsumerd-cmd-sock=PATH
--kconsumerd-err-sock=PATH
--ustconsumerd32-cmd-sock=PATH
--ustconsumerd64-cmd-sock=PATH
--ustconsumerd32-err-sock=PATH
--ustconsumerd64-err-sock=PATH
Buffer size of event notifier error counters¶
--event-notifier-error-buffer-size-kernel=SLOTS
--event-notifier-error-buffer-size-userspace=SLOTS
As of LTTng 2.13.14, a slot is a 32-bit counter, but this may change in the future.
Verbosity¶
-q, --quiet
You may NOT use this option with the --verbose and --verbose-consumer options.
-v, --verbose
Specify this option up to three times to get more levels of verbosity.
You may NOT use this option with the --quiet option.
--verbose-consumer
You may NOT use this option with the --quiet option.
Program information¶
-h, --help
This option attempts to launch /usr/bin/man to view this manual page. Override the manual pager path with the LTTNG_MAN_BIN_PATH environment variable.
--list-options
-V, --version
EXIT STATUS¶
0
1
3
ENVIRONMENT¶
LTTNG_ABORT_ON_ERROR
LTTNG_APP_SOCKET_TIMEOUT
After this period of time, lttng-sessiond unregisters the application.
Set to 0 or -1 to set an infinite timeout.
Default: 5.
LTTNG_CONSUMERD32_BIN
The --consumerd32-path option overrides this environment variable.
LTTNG_CONSUMERD32_LIBDIR
The --consumerd32-libdir option overrides this environment variable.
LTTNG_CONSUMERD64_BIN
The --consumerd64-path option overrides this environment variable.
LTTNG_CONSUMERD64_LIBDIR
The --consumerd64-libdir option overrides this environment variable.
LTTNG_DEBUG_NOCLONE
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
See the --extra-kmod-probes option which overrides this environment variable.
LTTNG_KMOD_PROBES
See the --kmod-probes option which overrides this environment variable.
LTTNG_NETWORK_SOCKET_TIMEOUT
Set to 0 or -1 to use the timeout of the operating system (default).
LTTNG_SESSION_CONFIG_XSD_PATH
FILES¶
$LTTNG_HOME/.lttng
$LTTNG_HOME/lttng-traces
Override this path with the --output option of the lttng-create(1) command.
$LTTNG_HOME/.lttng/sessions/auto
See the “Recording session configuration loading” section above to learn more.
/etc/lttng/sessions/auto
See the “Recording session configuration loading” section above to learn more.
$LTTNG_HOME/.lttng/lttng.conf
See the “Daemon configuration” section above to learn more.
/etc/lttng/lttng.conf
See the “Daemon configuration” section above to learn more.
Note
$LTTNG_HOME defaults to $HOME.
RESOURCES¶
COPYRIGHT¶
This program is part of the LTTng-tools project.
LTTng-tools is distributed under the GNU General Public License version 2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>. See the LICENSE <https://github.com/lttng/lttng-tools/blob/master/LICENSE> file for details.
THANKS¶
Special thanks to Michel Dagenais and the DORSAL laboratory <http://www.dorsal.polymtl.ca/> at École Polytechnique de Montréal for the LTTng journey.
Also thanks to the Ericsson teams working on tracing which helped us greatly with detailed bug reports and unusual test cases.
SEE ALSO¶
14 June 2021 | LTTng 2.13.14 |