LTTNG-SESSIOND(8)
π LTTng Manual β lttng-sessiond(8) π
okay bestie, welcome to the lttng-sessiond manual page, part 1 of 3!! this is the LTTng session daemon and she is the main character of your tracing setup, fr fr. grab a snack π
β¨ NAME β¨
lttng-sessiond β the LTTng session daemon π
β¨ SYNOPSIS β¨
lttng-sessiond [--background | --daemonize] [--sig-parent]
[--config=PATH] [--group=GROUP] [--load=PATH]
[--default-trace-format=(ctf-1.8 | ctf-2)]
[--agent-tcp-port=PORT] [--pidfile=PATH]
[--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]]
likeβ¦ look at her. iconic. every single one of those flags gets its own moment further down, don't you worry π«Ά
β¨ 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. yes she's that girl π
LTTng consists of Linux kernel modules (for Linux kernel tracing) and dynamically loaded libraries (for user application and library tracing). two whole vibes, one project.
An LTTng session daemon, lttng-sessiond, is a program which:
- Manages recording sessions (see
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. not me sliding into your app's DMs π
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. kernel tracing is root's territory, no cap π
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. she handles her own staff π
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. Make lttng-sessiond write its process ID to a file with the --pidfile option.
Note π β The LTTng project recommends that you start the session daemon at boot time for stable and long-term tracing. trust the process bestie.
Note π β For an unprivileged Unix user runninglttng-sessiond, the maximum number of file descriptors per process is usually1024. 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 usually65,535.
πΈ Daemon configuration πΈ
When you run lttng-sessiond, it configures itself from, in this order:
- The INI configuration file
/etc/lttng/lttng.conf, if any. - The INI configuration file
$LTTNG_HOME/.lttng/lttng.conf, if any.$LTTNG_HOMEdefaults to$HOME. - With the
--config=PATHoption: the INI configuration file PATH. - The command-line options.
Each step can override a previous configuration property. last one standing wins, periodt β¨
In INI configuration files, the session daemon only reads the properties under the sessiond INI section. Each INI property is:
- Key β The long name of a command-line option to set (see the "OPTIONS" section below).
- Value
- The selected command-line option accepts an argument
- Option argument (string).
- The selected command-line option is a switch
true,yes,on- Enable the option.
false,no,off- Disable the option.
- The selected command-line option accepts an argument
INI configuration file example:
[sessiond]
daemonize=yes
default-trace-format=ctf-1.8
extra-kmod-probes=my-driver,other-module
see how cute and simple that is π
π¦ Recording session configuration loading π¦
When the session daemon starts, it loads recording session configurations from:
- Without the
--loadoption- In this order:
- All the files in
$LTTNG_HOME/.lttng/sessions/auto.$LTTNG_HOMEdefaults to$HOME. - All the files in
/etc/lttng/sessions/auto.
- All the files in
lttng-sessiondonly loads recording session configuration files from the directories above if its UID and their UID are the same. same UID or it's not happening, we don't do that here π
- In this order:
- With the
--load=PATHoption- PATH is a directory
- All the files in PATH.
- PATH is a file
- The file PATH.
- PATH is a directory
okay that's part 1 bestie, there is SO much more coming π
β¨ OPTIONS β¨
π οΈ General daemon configuration
-b,--backgroundβ bestie, this startslttng-sessiondas a Unix daemon but keeps the file descriptors (aka the console) open. With this one,lttng-sessiondmakes sure the daemon is ready to receive client commands before it exits, so you're never out here yelling into the void. If you'd rather close those file descriptors, use the--daemonizeoption instead. π-f PATH,--config=PATHβ configures the daemon using the INI configuration filePATHon top of the default configuration files and the command-line options. Check the "Daemon configuration" section above for the tea. π-d,--daemonizeβ starts as a Unix daemon and closes the file descriptors (console). Same deal as above:lttng-sessiondensures the daemon is ready to receive client commands before it exits. Want the file descriptors kept open instead? That's the--backgroundoption's whole moment.--default-trace-format=FORMATβ sets the default trace format of recording sessions toFORMAT. AndFORMATis one of these two icons:ctf-1.8CTF 1.8https://diamon.org/ctf/v1.8.3/(yes, the legacy one, she's vintage β¨)ctf-2CTF 2https://diamon.org/ctf/(the preferred one, the moment, the main character π)
When a user application creates a recording session using the lttng-create(1) command or the liblttng-ctl API and doesn't explicitly specify a trace format, lttng-sessiond uses FORMAT.
Default: ctf-2. Periodt.
Also peep the LTTNG_SESSIOND_DEFAULT_TRACE_FORMAT environment variable. π
-g GROUP,--group=GROUPβ sets the Unix tracing group toGROUPinstead oftracing. This one is only meaningful when the root Unix user startslttng-sessiond, no cap. Members of the Unix tracing group may connect to the root session daemon and therefore control LTTng kernel tracing. Big power, handle with care π«Ά-l PATH,--load=PATHβ loads recording session configurations fromPATHβ either a directory or a file β instead of loading them from the default search directories. See the "Recording session configuration loading" section above for the full lore.-p PATH,--pidfile=PATHβ writes the process ID (PID) of thelttng-sessiondprocess toPATH. Such a file contains the textual PID (decimal) followed with a newline. Very tidy, very demure. π-S,--sig-parentβ sends theUSR1signal to the parent process to notify readiness. You can also use the--daemonizeor--backgroundoption instead, in which caselttng-sessiondmakes sure the daemon is ready to receive client commands before it exits. β¨
π§ Linux kernel tracing
At most one of these, bestie β pick your fighter:
--extra-kmod-probes=PROBE[,PROBE]...β for eachPROBEargument, loads the LTTng kernel probe module namedlttng-probe-PROBE.ko, in addition to loading the default LTTng kernel probe modules.
Also see the LTTNG_EXTRA_KMOD_PROBES environment variable. π
--kmod-probes=PROBE[,PROBE]...β only loads, for eachPROBEargument, the LTTng kernel probe module namedlttng-probe-PROBE.ko, instead of loading the default LTTng kernel probe modules. Exclusive vibes only.
Also see the LTTNG_KMOD_PROBES environment variable. π
--no-kernelβ disables Linux kernel tracing. That's it, that's the whole thing. π«
π Paths and ports
--agent-tcp-port=PORTβ listens on TCP portPORTfor agent application registration instead of a port within the range[5345, 5354]).-a PATH,--apps-sock=PATHβ sets the application Unix socket path toPATH. And listen: this option sets the application Unix socket path even if you set theLTTNG_UST_CTL_PATHenvironment variable. She overrides, she does not negotiate. π-c PATH,--client-sock=PATHβ sets the client Unix socket path toPATH.--consumerd32-libdir=PATHβ sets the 32-bit consumer daemon library directory toPATH. Also seeLTTNG_CONSUMERD32_LIBDIR. β¨--consumerd32-path=PATHβ sets the 32-bit consumer daemon binary path toPATH. Also seeLTTNG_CONSUMERD32_BIN. β¨--consumerd64-libdir=PATHβ sets the 64-bit consumer daemon library directory toPATH. Also seeLTTNG_CONSUMERD64_LIBDIR. β¨--consumerd64-path=PATHβ sets the 64-bit consumer daemon binary path toPATH. Also seeLTTNG_CONSUMERD64_BIN. β¨--kconsumerd-cmd-sock=PATHβ sets the command Unix socket path of the Linux kernel consumer daemon toPATH.--kconsumerd-err-sock=PATHβ sets the error Unix socket path of the Linux kernel consumer daemon toPATH.--ustconsumerd32-cmd-sock=PATHβ sets the Unix socket path of the 32-bit consumer daemon command toPATH.--ustconsumerd64-cmd-sock=PATHβ sets the Unix socket path of the 64-bit consumer daemon command toPATH.--ustconsumerd32-err-sock=PATHβ sets the Unix socket path of the 32-bit consumer daemon error toPATH.--ustconsumerd64-err-sock=PATHβ sets the Unix socket path of the 64-bit consumer daemon error toPATH.
π Buffer size of event notifier error counters
--event-notifier-error-buffer-size-kernel=SLOTSβ sets the size of the kernel event notifier error counter buffers toSLOTSslots.--event-notifier-error-buffer-size-userspace=SLOTSβ sets the size of the user space event notifier error counter buffers toSLOTSslots.
As of LTTng 2.15.1, a slot is a 32-bit counter, but this may change in the future. Noted, bestie, future-proofing is real. π¦
π Verbosity
-q,--quietβ suppresses all messages, including warnings and errors. Like, silence. You may NOT use this option with the--verboseand--verbose-consumeroptions, so don't even try it. π-v,--verboseβ increases verbosity. Specify this option up to three times to get more levels of verbosity. You may NOT use this option with the--quietoption. (They are not friends. They cannot sit together. π)--verbose-consumerβ increases the verbosity of the consumer daemons which this session daemon spawns. You may NOT use this option with the--quietoption.
π Program information
-h,--helpβ shows help. This option attempts to launch/usr/bin/manto view this manual page. Override the manual pager path with theLTTNG_MAN_BIN_PATHenvironment variable. π«Ά--list-optionsβ lists available command options and quits. Snackable. β¨-V,--versionβ shows the version and quits.
π EXIT STATUS π
0Success. Slay. π1Error.3Fatal error. (The dramatic one. π)
π§ ENVIRONMENT π§
LTTNG_ABORT_ON_ERRORβ set to1to abort the process after the first error is encountered. One strike and she's out.LTTNG_APP_SOCKET_TIMEOUTβ timeout (in seconds) of the application socket when sending/receiving commands. After this period of time,lttng-sessiondunregisters the application. Set to0or-1to set an infinite timeout. Default:5. β°LTTNG_CONSUMERD32_BINβ 32-bit consumer daemon binary path. The--consumerd32-pathoption overrides this environment variable.LTTNG_CONSUMERD32_LIBDIRβ 32-bit consumer daemon library directory path. The--consumerd32-libdiroption overrides this environment variable.LTTNG_CONSUMERD64_BINβ 64-bit consumer daemon binary path. The--consumerd64-pathoption overrides this environment variable.LTTNG_CONSUMERD64_LIBDIRβ 64-bit consumer daemon library directory path. The--consumerd64-libdiroption overrides this environment variable.LTTNG_DEBUG_NOCLONEβ set to1to disable the use ofclone(2)/fork(2). Setting this environment variable is considered insecure, but it's required to allow debuggers to work withlttng-sessiondon some operating systems. So likeβ¦ insecure but necessary, iykyk. πLTTNG_EXTRA_KMOD_PROBESβ extra LTTng kernel probe modules to load. See the--extra-kmod-probesoption which overrides this environment variable.LTTNG_KMOD_PROBESβ exclusive LTTng kernel probe modules to load. See the--kmod-probesoption which overrides this environment variable.LTTNG_NETWORK_SOCKET_TIMEOUTβ socket connection, receive, and send timeout (milliseconds). Set to0or-1to use the timeout of the operating system (default). πLTTNG_RUNDIRβ the directory containing the control files instead of:- Session daemon of the root user (root session daemon) The value of the
--with-lttng-system-rundiroption when configuring the build of the project (/var/run/lttngby default). - Other session daemon
$LTTNG_HOME/.lttng
- Session daemon of the root user (root session daemon) The value of the
This environment variable is particularly useful to run multiple root session daemons. Iconic for the multi-daemon girlies. π
LTTNG_SESSION_CONFIG_XSD_PATHβ recording session configuration XML schema definition (XSD) path.LTTNG_SESSIOND_DEFAULT_TRACE_FORMATβ default trace format of recording sessions. The value is eitherctf-1.8orctf-2.
Note The --default-trace-format option overrides this environment variable. β¨
LTTNG_UST_CTL_PATHβ colon-delimited paths of the directories wherelttng-sessiondplaces:- The application registration Unix socket.
Note The --apps-sock option overrides this specific path.
- The
"wait"shared memory files to wake up instrumented applications that are waiting for a session daemon to start. - The agent port file. This file contains the TCP port the agents must connect to to enable LTTng tracing.
Any such directory must exist when you start lttng-sessiond. No directory, no party. π
As of LTTng 2.15.1:
lttng-sessiondignores any path after the first colon (:) and prints a warning.- You cannot escape a colon within a specific path.
When tracing an application, start it with the LTTNG_UST_APP_PATH environment variable set to the same value as this environment variable.
If not set, the default directory path is the effective control file directory (see the LTTNG_RUNDIR environment variable). π¦
π FILES (the places your faves live)
$LTTNG_HOME/.lttngβ bestie this is THE spot: your Unix user's LTTng runtime and configuration directory. everything hangs out here. π$LTTNG_HOME/lttng-tracesβ where traces go by default in local mode and snapshot mode. it's the default output directory, periodt.
Wanna send them somewhere else? Override it with the --output option of the lttng-create(1) command. it's giving "I make the rules actually". π
$LTTNG_HOME/.lttng/sessions/autoβ whenlttng-sessiondstarts up, this is the directory it pulls your Unix user recording session configurations from. β¨
See the βRecording session configuration loadingβ section above to learn more (yes, the one we already went over, go look, it's all there).
/etc/lttng/sessions/autoβ same energy but system-wide:lttng-sessiondloads system-wide recording session configurations from here when it starts.
See the βRecording session configuration loadingβ section above to learn more. π
$LTTNG_HOME/.lttng/lttng.confβ your Unix user's LTTng daemon INI configuration file. π
See the βDaemon configurationβ section above to learn more.
/etc/lttng/lttng.confβ the system-wide LTTng daemon INI configuration file. the big one. π
See the βDaemon configurationβ section above to learn more.
Note π«Ά$LTTNG_HOMEdefaults to$HOME. like, if you don't set it, that's what you get. no cap.
π RESOURCES (come hang out)
- LTTng project website:
https://lttng.org - LTTng documentation:
https://lttng.org/docs - LTTng bug tracker:
https://bugs.lttng.org - Git repositories:
https://git.lttng.org - GitHub organization:
https://github.com/lttng - Continuous integration:
https://ci.lttng.org/ - Mailing list for support and development:
https://lists.lttng.org/β hmu atlttng-dev@lists.lttng.orgπ - IRC channel:
irc://irc.oftc.net/lttngβ that's#lttngonirc.oftc.net - Mastodon:
https://mastodon.social/@lttngπ¦
βοΈ COPYRIGHT
This program is part of the LTTng-tools project. fr fr.
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 file (https://github.com/lttng/lttng-tools/blob/master/LICENSE) for details. iconic licensing behaviour, honestly. π
π THANKS (the shoutout section, as she deserves)
Special thanks to Michel Dagenais and the DORSAL laboratory (http://www.dorsal.polymtl.ca/) at Γcole Polytechnique de MontrΓ©al for the LTTng journey. literal main character energy. π
Also thanks to the Ericsson teams working on tracing, who helped greatly with detailed bug reports and unusual test cases. not all heroes wear capes, some of them file the weirdest repro steps imaginable and we are OBSESSED. ππ₯
π SEE ALSO
and that's the whole page bestie!! π«Ά this was LTTNG-SESSIOND(8) from LTTng 2.15.1, dated 7 October 2025 β go forth and trace, you absolute legend β¨ππΈ
π¦ where this page comes from
- ubuntu stonking: lttng-tools 2.15.1-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms