LTTNG(1)
πΈ NAME πΈ
lttng β control LTTng tracing. (This is the lttng(1) page, straight out of the LTTng Manual, bestie π
)
π¦ SYNOPSIS π¦
lttng [--group=GROUP] [--mi=xml] [--no-sessiond | --sessiond-path=PATH]
[--relayd-path=PATH] [--quiet | -verbose...]
COMMAND [COMMAND OPTIONS]
β¨ DESCRIPTION β¨
Okay so The Linux Trace Toolkit: next generation https://lttng.org/ is an open-source software package, and its whole thing is correlated tracing of the Linux kernel, user applications, and user libraries. Iconic behaviour honestly. π
LTTng is made of:
- Linux kernel modules (these do the Linux kernel tracing)
- dynamically loaded libraries (these do the user application and library tracing)
The lttng command-line tool β and literally any user app linked with the LTTng control library (liblttng-ctl) β sends commands to a listening LTTng session daemon, aka lttng-sessiond(8). And that session daemon:
- Manages recording sessions (peep
lttng-concepts(7)if you wanna learn more about recording sessions π) - Controls the various components of LTTng (tracers, consumer daemons, the whole squad)
- Sends asynchronous notifications to user applications
By default, the lttng-create(1) command auto-spawns:
- A session daemon for your Unix user, if none is currently running.
- Override the path of the session daemon binary to spawn with the
--sessiond-pathoption. - Avoid automatically spawning a session daemon with the
--no-sessiondoption.
- Override the path of the session daemon binary to spawn with the
- A relay daemon (see
lttng-relayd(8)) β but ONLY if literally all of these are true:- You specify the
--liveoption. - You don't specify any of the
--set-url,--ctrl-url, or--data-urloptions. - No relay daemon is currently listening for TCP connections on
127.0.0.1:5344(that's the default LTTng live reader connection address and port, periodt).
- You specify the
Override the path of the relay daemon binary to spawn with the --relayd-path option.
π Note: the LTTng project recommends you start the session daemon at boot time for stable and long-term tracing. fr fr, take the advice.
See lttng-concepts(7) to learn more about the foundational concepts of LTTng.
The lttng tool offers a subcommand-based command-line interface. The βCOMMANDSβ section below lists the available commands. Slay.
π Session daemon connection π
For most of its commands, the lttng tool needs to connect to a listening LTTng session daemon (lttng-sessiond(8)) to control LTTng tracing.
Each Unix user may have its own independent running session daemon. However, the lttng tool must connect to the session daemon of the root user (the root session daemon) to control Linux kernel tracing. No cap, that's just how it is.
How the lttng tool chooses which session daemon to connect to goes like this:
- If your Unix user is root β connect to the root session daemon.
- If your Unix user is not root
- If your Unix user is part of the Unix tracing group
- Try to connect to the root session daemon.
- If the root session daemon isn't running, connect to the session daemon of your Unix user.
- If your Unix user is not part of the tracing group β connect to the session daemon of your Unix user.
- If your Unix user is part of the Unix tracing group
The name of the Unix tracing group is one of these:
- With the
--group=GROUPoption of the root session daemon (lttng-sessiond(8)) βGROUP.- In that case, you must use the
--group=GROUPoption, with the sameGROUPargument, of thelttngtool.
- In that case, you must use the
- Without the
--groupoption of the root session daemon βtracing.
LTTng-instrumented user applications automatically register to both the root and user session daemons. Which means both session daemons can list the available instrumented applications and their instrumentation points (see lttng-list(1)). Teamwork makes the dream work π«Ά
π OPTIONS π
-g GROUP,--group=GROUPβ set the name of the Unix tracing group toGROUPinstead oftracing.- You must use this option to be able to connect to a root session daemon (
lttng-sessiond(8)) which was started with its own--group=GROUPoption.
- You must use this option to be able to connect to a root session daemon (
-m xml,--mi=xmlβ print the command result using a stable XML machine interface (MI) output instead of the default, unstable human-readable output.- With this mode,
lttngprints the resulting XML document to the standard output, while it prints any error/warning to the standard error with an unstable, human-readable format. - If any error occurs during the execution of
lttng, the command exits with a status different than0, andlttngdoes NOT guarantee the syntax and data validity of its MI output. π - An XML schema definition (XSD) file used for validation of the MI output is available: see the
src/common/mi_lttng.xsdfile in the LTTng-tools source tree.
- With this mode,
-n,--no-sessiondβ do not automatically spawn a session daemon for your Unix user when running thelttng-create(1)command.- You may NOT use this option with the
--sessiond-pathoption.
- You may NOT use this option with the
-q,--quietβ suppress all messages, including warnings and errors. π€«- You may NOT use this option with the
--verboseoption.
- You may NOT use this option with the
--sessiond-path=PATHβ set the absolute path of the session daemon binary to spawn from thelttng-create(1)command toPATH.- You may NOT use this option with the
--no-sessiondoption.
- You may NOT use this option with the
--relayd-path=PATHβ set the absolute path of the relay daemon binary to spawn from thelttng-create(1)command toPATH.-v,--verboseβ increase verbosity.- Specify this option up to three times to get more levels of verbosity.
- You may NOT use this option with the
--quietoption.
π Program information π
-h,--helpβ show help.- This option attempts to launch
/usr/bin/manto view this manual page. Override the manual pager path with theLTTNG_MAN_BIN_PATHenvironment variable.
- This option attempts to launch
--list-optionsβ list available command options and quit.--list-commandsβ list available commands and quit.-V,--versionβ show version and quit.
π COMMANDS π
The following commands also have their own --help option. β¨
π Recording session π
Okay bestie, this is the main character cluster of commands β everything you need to run a recording session from birth to archive. Every one of these is its own manpage, so go read them when you need the deets:
lttng-create(1)β Create a recording session. Baby's first session β¨lttng-destroy(1)β Destroy recording sessions. Yeah, it's giving bye-bye πlttng-disable-rotation(1)β Unset a recording session rotation schedule.lttng-enable-rotation(1)β Set a recording session rotation schedule.lttng-load(1)β Load recording session configurations. Your saved faves, restored πlttng-regenerate(1)β Regenerate specific recording session data.lttng-rotate(1)β Archive the current trace chunk of a recording session.lttng-save(1)β Save recording session configurations.lttng-set-session(1)β Set the current recording session.lttng-snapshot(1)β Take a recording session snapshot πΈlttng-start(1)β Start recording sessions. Go go go π₯lttng-status(1)β Show the status of the current recording session.lttng-stop(1)β Stop recording sessions. Nap time π΄
π Channel π
Channels are lowkey the whole vibe β this is where your events actually live. Group chat for your trace data, fr fr:
lttng-add-context(1)β Add context fields to be recorded.lttng-disable-channel(1)β Disable channels.lttng-enable-channel(1)β Create or enable a channel.lttng-reclaim-memory(1)β Reclaim channel memory. Give that RAM back to the people π«Ά
π¦ Recording event rule π¦
The what of your recording β these two are the gatekeepers of which events make it into the trace:
lttng-disable-event(1)β Disable recording event rules.lttng-enable-event(1)β Create or enable recording event rules.
π Information π
Just the one here, but she's iconic and she's doing the most:
lttng-list(1)β List recording sessions and instrumentation points.
π Resource tracking π
Tracking who's allowed to be part of the recording β it's giving VIP list energy:
lttng-track(1)β Allow specific processes to record events.lttng-untrack(1)β Disallow specific processes to record events.
β Trigger β
Triggers = your "when X happens, do Y" automation besties. Set it and forget it, no cap:
lttng-add-trigger(1)β Add a trigger.lttng-list-triggers(1)β List triggers.lttng-remove-trigger(1)β Remove a trigger.
β¨ Miscellaneous β¨
okay these are the lil extra commands that don't fit anywhere else, they're the side quests of the lttng universe π«Ά
lttng-help(1)β shows you the help for a command, like when you forget how anything works (relatable)lttng-version(1)β spills all the LTTng-tools version info, iykyklttng-view(1)β launches a trace reader, so you can actually look at your traces π
π EXIT STATUS π
bestie, when a command finishes it hands you back a number and that number is telling you something, so pay attention:
0β success!! we ate, no crumbs π1β command error, something went wrong inside the command itself π2β undefined command, like you typed a command that doesn't exist... not me doing that π3β fatal error, the serious kind π4β command warning β basically "it worked but something went wrong during the command", the chaotic middle child β¨
πΈ ENVIRONMENT πΈ
these are the environment variables, aka the settings you can set outside of typing a command, and they change how everything behaves:
LTTNG_ABORT_ON_ERRORβ set it to1and the process will straight up abort after it hits the first error it encounters. no second chances, periodt.LTTNG_HOMEβ the path to the LTTng home directory. defaults to$HOME. this one's your bestie when the Unix user running the commands has a home directory that isn't writable, which is such a vibe killer.LTTNG_LIST_LEGACYβ set it to1to use the legacy output format (that's LTTng 2.14 and earlier) for thelttng-list(1)command instead of the modern output format. just know that the legacy output doesn't show anything related to features introduced after LTTng 2.14, so it's giving nostalgia but missing stuff.LTTNG_MAN_BIN_PATHβ absolute path to the manual pager you wanna use to read the LTTng command-line help (withlttng-help(1)or with the--helpoption) instead of the default/usr/bin/man.LTTNG_NO_UTF_8β set it to1to NOT emit multi-byte UTF-8 sequences, even if your locale is out here claiming it supports it. the audacity.LTTNG_SESSION_CONFIG_XSD_PATHβ path to the directory that contains thesession.xsdrecording session configuration XML schema.LTTNG_SESSIOND_PATHβ absolute path to the LTTng session daemon binary (seelttng-sessiond(8)) to spawn from thelttng-create(1)command. heads up: the--sessiond-pathgeneral option overrides this environment variable, so like, the option wins the argument πLTTNG_TERM_COLORβ controls when to emit terminal SGR codes in the output. also: theNO_COLORenvironment variable overrides this one. it can be one of:auto(this is the default) β only emits SGR codes when standard output is connected to a color-capable terminal πalwaysβ always emits SGR codes, no matter what πneverβ never emits SGR codes, boring but valid β¨
NO_COLORβ if it's set and not empty, then it's equivalent to settingLTTNG_TERM_COLORtonever. go check outhttps://no-color.org/to learn more about it.
π FILES π
here's every path that matters, no skips:
$LTTNG_HOME/.lttngrcβ the Unix user's LTTng runtime configuration. this is where LTTng stores the name of the Unix user's current recording session between executions oflttng(1).lttng-create(1)andlttng-set-session(1)are the ones that set the current recording session. main character file, fr fr.$LTTNG_HOME/lttng-tracesβ default output directory of LTTng traces in local and snapshot modes. you can override this path with the--outputoption of thelttng-create(1)command if you want it somewhere else π$LTTNG_HOME/.lttngβ the Unix user's LTTng runtime and configuration directory.$LTTNG_HOME/.lttng/sessionsβ default directory containing the Unix user's saved recording session configurations (seelttng-save(1)andlttng-load(1))./etc/lttng/sessionsβ directory containing the system-wide saved recording session configurations (seelttng-save(1)andlttng-load(1)).
Note β$LTTNG_HOMEdefaults to the value of theHOMEenvironment variable. don't forget it π«Ά
π¦ RESOURCES π¦
if you wanna go deeper, here's where the lore lives:
- 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/and the address islttng-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.
LTTng-tools is distributed under the GNU General Public License version 2 β http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html β and you can peep the LICENSE file at https://github.com/lttng/lttng-tools/blob/master/LICENSE for all the 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. iconic.
Also thanks to the Ericsson teams working on tracing, who helped us greatly with detailed bug reports and unusual test cases. genuinely so helpful, we love to see it π«Ά
π SEE ALSO π
lttng-concepts(7) lttng-relayd(8), lttng-sessiond(8)
and that's the whole page bestie!! this was LTTng 2.15.1, dated 4 December 2025, and it's the LTTNG(1) manual page π
β¨ thanks for reading all the way to the end, you're literally the best, mwah ππ
π¦ 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