LTTNG-DESTROY(1)
π LTTNG-DESTROY β¨
okay bestie, listen up β this is the manual page for the lttng-destroy command from the LTTng Manual. it destroys one or more LTTng recording sessions. yes. that's the whole vibe. let's get into it π«Ά
πΈ NAME πΈ
lttng-destroy β destroy one or more LTTng recording sessions ποΈβ¨
π¦ SYNOPSIS π¦
lttng [GENERAL OPTIONS] destroy [--no-wait]
[--all | --glob=PATTERN | SESSION]
like, that's the shape of it. general options first, then destroy, then you gotta pick your fighter π
π DESCRIPTION π
so the lttng destroy command destroys⦠a session. which one? depends on what you give it, bestie:
- With the
SESSIONargument β it destroys the recording session named SESSION. just that one. iconic. - With the
--glob=PATTERNoption β it destroys the recording sessions of which the globbing pattern PATTERN matches the name. matchy matchy π - With the
--alloption β it destroys all the recording sessions of the connected session daemon for your Unix user, or for all users if your Unix user is root, as listed in the output oflttng list(seelttng-list(1)).
See the βSession daemon connectionβ section of lttng(1) to learn how a user application connects to a session daemon. π
- Otherwise β it destroys the current recording session.
In that case, the current recording session becomes nonexistent. π gone. not there anymore.
See lttng-concepts(7) to learn more about the current recording session.
See lttng-concepts(7) to learn more about recording sessions, fr fr.
okay so βdestroyingβ a recording session means freeing the resources which the LTTng daemons and tracers acquired for it, and also making sure to flush all the recorded trace data to either the local file system or the connected LTTng relay daemon (see lttng-relayd(8)), depending on the recording session mode. no data left behind, we love a clean exit π
The destroy command stops any recording activity within the selected recording session(s). By default, the command runs an implicit lttng-stop(1) command to ensure that the trace data of the recording session(s) is valid before it exits. Make the command exit immediately with the --no-wait option. In this case, however, the traces(s) might not be valid when the command exits, and thereβs no way to know when it/they become valid. π so like, careful.
if youβre wondering βwhen are my trace chunk archives actually safe to poke atβ β hereβs the tea π
If, for a recording session RS to destroy with the destroy command, all of the following statements are true:
- You donβt specify the
--no-waitoption. - LTTng archived the current trace chunk (see
lttng-concepts(7)) of RS at least once during its lifetime.
Then all the subdirectories of the output directory of RS (local or remote) are considered trace chunk archives once the destroy command exits. In other words, itβs safe to read them, modify them, move them, or remove them. β¨ go wild β¨
See the βEXAMPLESβ section below for usage examples. π
β¨ OPTIONS β¨
See lttng(1) for GENERAL OPTIONS. π
-a,--allβ destroy all the recording sessions of your Unix user, or of all users if your Unix user is root, as listed in the output oflttng-list(1). total wipeout, main character energy π-gPATTERN,--glob=*PATTERN*β destroy the recording sessions of which the globbing pattern PATTERN matches the name.
In PATTERN, the * character means βmatch anythingβ. To match a literal * character, use \*. (yes bestie, escape it or it'll go feral π§)
-n,--no-waitβ do NOT ensure that the trace data of the recording session(s) to destroy is valid before exiting. you asked for speed, you got speed πβοΈπ¨
π Program information π
-h,--helpβ show 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β list available command options and quit.
π EXIT STATUS π
0β Success πΈ1β Command error π2β Undefined command π3β Fatal error π4β Command warning (something went wrong during the command) β οΈ
π ENVIRONMENT π
LTTNG_ABORT_ON_ERRORβ set to1to abort the process after the first error is encountered. no second chances, periodt.LTTNG_HOMEβ path to the LTTng home directory.
Defaults to $HOME.
Useful when the Unix user running the commands has a non-writable home directory. (weβve all been there π«Ά)
LTTNG_LIST_LEGACYβ set to1to use the legacy output format (LTTng 2.14 and earlier) for thelttng-list(1)command instead of the modern output format.
Note that the legacy output doesnβt show anything related to features introduced after LTTng 2.14. so like, retro mode. y2k vibes but make it tracing π
LTTNG_MAN_BIN_PATHβ absolute path to the manual pager to use to read the LTTng command-line help (withlttng-help(1)or with the--helpoption) instead of/usr/bin/man.LTTNG_NO_UTF_8β set to1to NOT emit multi-byte UTF-8 sequences, even if the locale claims to support it. (look, sometimes you just want plain ASCII, no judgement π)LTTNG_SESSION_CONFIG_XSD_PATHβ path to the directory containing 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.
The --sessiond-path general option overrides this environment variable. π
LTTNG_TERM_COLORβ controls when to emit terminal SGR codes in the output.
The NO_COLOR environment variable overrides this.
One of:
auto(default) β only emit SGR codes when the standard output is connected to a color-capable terminal.alwaysβ always emit SGR codes.neverβ never emit SGR codes.
NO_COLORβ if set and not empty, then itβs equivalent to settingLTTNG_TERM_COLORtonever.
See NO_COLOR <https://no-color.org/> to learn more.
π FILES π
$LTTNG_HOME/.lttngrcβ Unix userβs LTTng runtime configuration.
This is where LTTng stores the name of the Unix userβs current recording session between executions of lttng(1). lttng-create(1) and lttng-set-session(1) set the current recording session. π«Ά
$LTTNG_HOME/lttng-tracesβ default output directory of LTTng traces in local and snapshot modes.
Override this path with the --output option of the lttng-create(1) command.
$LTTNG_HOME/.lttngβ 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.
π EXAMPLES π
Example 1. Destroy the current recording session.
$ lttng destroy
Example 2. Destroy the current recording session without waiting for completion.
See the --no-wait option.
$ lttng destroy --no-wait
Example 3. Destroy a specific recording session.
$ lttng destroy my-session
Example 4. Destroy all the recording sessions.
See the --all option.
$ lttng destroy --all
Example 5. Destroy all the recording sessions of which the name contains meow.
See the --glob option.
$ lttng destroy --glob='*meow*'
π» cat-approved globbing. no cap.
π¦ RESOURCES π¦
- 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 <https://lists.lttng.org/> for support and development:
lttng-dev@lists.lttng.org - IRC channel <irc://irc.oftc.net/lttng>:
#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>. 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. absolute legends, fr fr π
π SEE ALSO π
lttng(1), lttng-create(1), lttng-list(1), lttng-concepts(7)
and that's the whole page bestie!! π this one's brought to you by LTTng 2.15.1, dated 1 April 2025 β go forth and destroy responsibly, 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