lttng — LTTng 2 tracer control command-line tool
-vvv] COMMAND [
The Linux Trace Toolkit: next generation 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(8), receives
commands from the command-line interface
lttng to control the LTTng
tracers. All interactions with the LTTng tracers happen through the
lttng tool or through the liblttng-ctl library shipped with the
A tracing domain is a tracer category. There are five available domains. For some commands, the domain needs to be specified with a command-line option. The domain options are:
Apply command to the
java.util.logging (JUL) domain.
Apply command to the Linux kernel domain.
Apply command to the Apache log4j 1.2 (Java) domain.
Apply command to the Python domain.
Apply command to the user space domain (application using liblttng-ust directly; see lttng-ust(3)).
The LTTng session daemon is a tracing registry which allows the user to interact with multiple tracers (kernel and user space) within the same container, a tracing session. Traces can be gathered from the Linux kernel and/or from instrumented applications (see lttng-ust(3)). You can aggregate and read the events of LTTng traces using babeltrace2(1).
To trace the Linux kernel, the session daemon needs to be running as
root. LTTng uses a tracing group to allow specific users to interact
with the root session daemon. The default tracing group name is
tracing. You can use the
--group option to set the tracing
group name to use.
Session daemons can coexist. You can have a session daemon running as user Alice that can be used to trace her applications alongside a root session daemon or a session daemon running as user Bob.
Note:It is highly recommended to start the session daemon at boot time for stable and long-term tracing.
User applications instrumented with LTTng automatically register to the root session daemon and to user session daemons. This allows any session daemon to list the available traceable applications and event sources (see lttng-list(1)).
By default, the lttng-create(1) command automatically spawns a
user session daemon if none is currently running. The
--no-sessiond general option can be set to avoid this.
GROUP as Unix tracing group (default:
Print the command’s result using the machine interface type
instead of a human-readable output.
The machine interface (MI) mode converts the traditional pretty-printing
to a machine output syntax. The MI mode provides a change-resistant way
to access information generated by the
lttng command-line program.
When using the MI mode, the data is printed to the standard output. Errors and warnings are printed on the standard error with the pretty-print default format.
If any error occurs during the execution of a command, the return value
of the command will be different than 0. In this case,
not guarantee the syntax and data validity of the generated MI output.
xml MI type, an XML schema definition (XSD) file used for
validation is available: see the
src/common/mi_lttng.xsd file in
the LTTng-tools source tree.
Do not automatically spawn a session daemon.
Suppress all messages, including warnings and errors.
Set the session daemon binary’s absolute path to
Three levels of verbosity are available, which are triggered by
v letters to the option
List available commands.
List available general options.
The following commands also have their own
Create a recording session.
Destroy recording sessions.
Load recording session configurations.
Regenerate specific recording session data.
Save recording session configurations.
Set the current recording session.
Add context fields to be recorded.
Create or enable a channel.
Disable recording event rules.
Create or enable recording event rules.
List recording sessions and instrumentation points.
Show the status of the current recording session.
Take a recording session snapshot.
Start a recording session.
Stop a recording session.
Unset a recording session rotation schedule.
Set a recording session rotation schedule.
Archive the current trace chunk of a recording session.
Allow specific processes to record events.
Disallow specific processes to record events.
Show the help of a command.
Show LTTng-tools version information.
Launch a trace reader.
Set to 1 to abort the process after the first error is encountered.
$HOME environment variable. Useful when the user
running the commands has a non-writable home directory.
Absolute path to the man pager to use for viewing help information
about LTTng commands (using lttng-help(1) or
lttng COMMAND --help).
Path in which the
session.xsd session configuration XML
schema may be found.
Full session daemon binary path.
--sessiond-path option has precedence over this
Note that the lttng-create(1) command can spawn an LTTng session daemon automatically if none is running. See lttng-sessiond(8) for the environment variables influencing the execution of the session daemon.
User LTTng runtime configuration.
This is where the per-user current tracing session is stored between executions of lttng(1). The current tracing session can be set with lttng-set-session(1). See lttng-create(1) for more information about tracing sessions.
Default output directory of LTTng traces. This can be overridden
--output option of the lttng-create(1)
User LTTng runtime and configuration directory.
Default location of saved user tracing sessions (see lttng-save(1) and lttng-load(1)).
System-wide location of saved tracing sessions (see lttng-save(1) and lttng-load(1)).
$LTTNG_HOME defaults to
$HOME when not explicitly set.
Command warning (something went wrong during the command)
If you encounter any issue or usability problem, please report it on the LTTng bug tracker.
Mailing list for support and
This program is part of the LTTng-tools project.
LTTng-tools is distributed under the
Public License version 2. See the
Special thanks to Michel Dagenais and the DORSAL laboratory 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.