The LTTng project aims at providing highly efficient tracing tools for Linux. It's tracers help tracking down performance issues and debugging problems involving multiple concurrent processes and threads. Tracing across multiple systems is also possible.
The session daemon, acting as a tracing registry, allow you to interact with multiple tracers (kernel and user-space) inside the same container, a tracing session. Trace can be gathered from the kernel and/or instrumented applications (lttng-ust(3)). Aggregating those traces is done using a viewer, like the babeltrace(1) text viewer.
In order to trace the kernel, the session daemon needs to be running as root. LTTng provides the use of a tracing group (default: tracing). Whomever is in that group can interact with the root session daemon and thus trace the kernel. Session daemons can co-exist meaning that you can have a session daemon running as Alice that can be used to trace her applications along side with a root daemon or even a Bob daemon. We highly recommend to start the session daemon at boot time for stable and long term tracing.
The session daemon is in charge of managing trace data consumers by spawning them when the time has come. The user don't need to manage the lttng-consumerd.
This program follow the usual GNU command line syntax with long options starting with two dashes. Below is a summary of the available options.
Show summary of possible options and commands
There is three debugging level which will print on stderr. Maximum verbosity is -vvv.
Verbose mode for consumer. Activate DBG() macro.
Start as a daemon
Start as a daemon, keeping console open
Specify the tracing group name. (default: tracing)
Show version number
Send SIGUSR1 to parent pid to notify readiness.
This is used by lttng(1) to get notified when the session daemon is ready to accept command. When building a third party tool over liblttng-ctl, this option can be very handy to synchronize the control tool and the session daemon.
No output at all.
No kernel tracer support
JUL application registration TCP port (default: 5345)
Specify the kernel modules containing LTTng probes to load by the session daemon. Only the component name of the probe needs to be specified, e.g. to load the lttng-probe-irq and lttng-probe-sched use: --kmod-probes="irq, sched".
Specify path for the client unix socket
Specify path for apps unix socket
Specify path for the kernel consumer error socket
Specify path for the kernel consumer command socket
Specify path for the 32-bit UST consumer error socket
Specify path for the 64-bit UST consumer error socket
Specify path for the 32-bit UST consumer command socket
Specify path for the 64-bit UST consumer command socket
Specify path for the 32-bit UST consumer daemon binary
Specify path for the 32-bit UST consumer daemon libraries
Specify path for the 64-bit UST consumer daemon binary
Specify path for the 64-bit UST consumer daemon libraries
Specify path from which to automatically load session configuration(s).
Specify path from which to load daemon configuration.
By default, the session daemon tries to load session configuration(s) located in the user default directory ~/.lttng/sessions/auto/ and in the system wide one in /etc/lttng/sessions/auto/. Note that the directory containing the session's configuration and lttng-sessiond MUST have the same UID for them to be automatically loaded.
Specifying a path with -l, --load PATH overrides the default directory and UID check. The lttng-sessiond will simply check if it's accessible and try to load every session file in it.
Note that all command line options will override environment variables.
Specify the 32-bit consumer binary path. --consumerd32-path override this variable.
Specify the 64-bit consumer binary path. --consumerd64-path override this variable.
Specify the 64-bit library path containing libconsumer.so. --consumerd32-libdir override this variable.
Specify the 32-bit library path containing libconsumer.so. --consumerd64-libdir override this variable.
Debug-mode disabling use of clone/fork. Insecure, but required to allow debuggers to work with sessiond on some operating systems.
Control the timeout of application's socket when sending and receiving commands. Takes an integer parameter: the timeout value, in seconds. After this period of time, the application is unregistered by the session daemon. A value of 0 or -1 means an infinite timeout. Default value is 5 seconds.
Control timeout of socket connection, receive and send. Takes an integer parameter: the timeout value, in milliseconds. A value of 0 or -1 uses the timeout of the operating system (this is the default).
Specify the path that contains the XML session configuration schema (xsd).
Specify the kernel modules probes that should be loaded by the session daemon.
For unprivileged 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 is two file descriptors per-CPU and one more socket for bidirectional communication.
For the root user, the limit is bumped to 65535. Future version will deal with this limitation.
No show stopper bugs are known yet in this version.
If you encounter any issues or usability problem, please report it on our mailing list <firstname.lastname@example.org> to help improve this project.
lttng-sessiond is distributed under the GNU General Public License version 2. See the file COPYING for details.
A Web site is available at http://lttng.org for more information on the LTTng project.
You can also find our git tree at http://git.lttng.org.
Mailing lists for support and development: <email@example.com>.
You can find us on IRC server irc.oftc.net (OFTC) in #lttng.
Thanks to Yannick Brosseau without whom this project would never have been so lean and mean! Also thanks to the Ericsson teams working on tracing which helped us greatly with detailed bug reports and unusual test cases.
Thanks to our beloved packager Alexandre Montplaisir-Goncalves (Ubuntu and PPA maintainer) and Jon Bernard for our Debian packages.
Special thanks to Michel Dagenais and the DORSAL laboratory at Polytechnique de Montreal for the LTTng journey.