LTTNG-STOP(1)

πŸ’… lttng-stop β€” the "okay bestie, we're DONE recording" command πŸ’…

part of the LTTng Manual girlies ✨ β€” stop one or more LTTng recording sessions, no cap


🌸 SYNOPSIS 🌸

lttng [GENERAL OPTIONS] stop [--no-wait]
      [--all | --glob=PATTERN | SESSION]

✨ DESCRIPTION ✨

Okay so lttng stop stops one or more recording sessions. Translation for the group chat: it deactivates the LTTng tracers for whichever sessions you point at. 🫷

Here's who gets stopped, depending on what you hand it:

  • With the SESSION argument β€” the recording session named SESSION. Just say their name and they come running. πŸ’β€β™€οΈ
  • With the --glob=PATTERN option β€” every recording session whose name matches the globbing pattern PATTERN. Fashion-matching but for session names. πŸŽ€
  • With the --all option β€” literally all the recording sessions of the connected session daemon for your Unix user, or for all users if your Unix user is root β€” exactly as listed in the output of lttng list (peep lttng-list(1)). πŸ‘‘
Wanna know how a user application even connects to a session daemon? Go read the "Session daemon connection" section of lttng(1). It's giving required reading fr fr.
  • Otherwise (you gave it nothing, iconique) β€” the current recording session. The default one. The main character. 🫢

Want the lore on what a "current recording session" even is? That's lttng-concepts(7). Also lttng-concepts(7) for recording sessions in general. Same page, double duty, slay. πŸ’–


Important vibe check: the recording session(s) you selected must be active (started β€” see lttng-start(1)). A recording session is inactive when it's created (see lttng-create(1)), like a phone that's off, bestie.

Alsooo, a stop-session trigger action can stop a recording session too (see lttng-add-trigger(1)). Not everything has to be typed by hand, iykyk. ✨

Need to wake some inactive sessions back up? That's lttng-start(1). The circle of life. πŸ¦‹


By default, the stop command is a perfectionist 😌 β€” it makes sure the trace data of the selected recording session(s) is valid before it exits. If you want it to just dip immediately, use the --no-wait option. But hear me out on the trade-off:

⚠️ With --no-wait, the trace(s) might not be valid when the command exits, and there's no way to know when it/they becomes valid. Not knowing is the worst. 😭

Peep the "EXAMPLES" section below for usage examples! πŸ“


🌈 OPTIONS 🌈

See lttng(1) for GENERAL OPTIONS. (The ✨general✨ ones, not these.)

  • -a, --all β€” Stop all the recording sessions of your Unix user, or of all users if your Unix user is root, as listed in the output of lttng-list(1). Go big or go home. πŸ‘‘
  • -g PATTERN, --glob=PATTERN β€” Stop the recording sessions of which the globbing pattern PATTERN matches the name.

In PATTERN, the * character means "match anything". Wanna match a literal * character instead? Use \*. Escape her. πŸ’…

  • -n, --no-wait β€” Do NOT ensure that the trace data of the selected recording session(s) is valid before exiting. Live fast, exit immediately. πŸƒβ€β™€οΈ

πŸŽ€ 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. She knows a guy. 🧚

  • --list-options β€” List available command options and quit. A little menu, a little treat. πŸ“

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” Success. Ate. πŸ’…
  • 1 β€” Command error.
  • 2 β€” Undefined command.
  • 3 β€” Fatal error.
  • 4 β€” Command warning (something went wrong during the command).

she tells you exactly how it went, no guessing ✨


🌸 ENVIRONMENT 🌸

  • LTTNG_ABORT_ON_ERROR β€” Set to 1 to abort the process after the first error is encountered. Zero tolerance policy. πŸ™ˆ
  • 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. (Your home dir said "no" but LTTng said "bet".) πŸ’œ

  • LTTNG_LIST_LEGACY β€” Set to 1 to use the legacy output format (LTTng 2.14 and earlier) for the lttng-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. It's giving vintage, and vintage misses out. πŸ•°οΈ
  • LTTNG_MAN_BIN_PATH β€” Absolute path to the manual pager to use to read the LTTng command-line help (with lttng-help(1) or with the --help option) instead of /usr/bin/man. Pick your own man girlie. πŸ’–
  • LTTNG_NO_UTF_8 β€” Set to 1 to NOT emit multi-byte UTF-8 sequences, even if the locale claims to support it. The locale is lying, bestie. 😭
  • LTTNG_SESSION_CONFIG_XSD_PATH β€” Path to the directory containing the session.xsd recording session configuration XML schema. The blueprint. πŸ“œ
  • LTTNG_SESSIOND_PATH β€” Absolute path to the LTTng session daemon binary (see lttng-sessiond(8)) to spawn from the lttng-create(1) command.

The --sessiond-path general option overrides this environment variable. Options stay winning. πŸ‘‘

  • LTTNG_TERM_COLOR β€” Controls when to emit terminal SGR codes in the output.

The NO_COLOR environment variable overrides this. (Yes, it's a whole hierarchy. Respect it.)

One of:

  • auto (default) β€” Only emit SGR codes when the standard output is connected to a color-capable terminal. She reads the room. πŸ’…
  • always β€” Always emit SGR codes. Color maximalist behavior. 🌈
  • never β€” Never emit SGR codes. Minimalist era. πŸ–€
  • NO_COLOR β€” If set and not empty, then it's equivalent to setting LTTNG_TERM_COLOR to never.

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. (Where the "who am I recording as" memory lives. 🧠)

  • $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. Do not let the default decide your destiny. ✨

  • $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 (see lttng-save(1) and lttng-load(1)).
  • /etc/lttng/sessions β€” Directory containing the system-wide saved recording session configurations (see lttng-save(1) and lttng-load(1)). The communal closet. πŸŽ€
Note πŸ“ $LTTNG_HOME defaults to the value of the HOME environment variable.

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Stop the current recording session. β€” the "you know who" of sessions πŸ’…

$ lttng stop

Example 2. Stop a specific recording session. β€” name names, bestie

$ lttng stop my-session

Example 3. Stop the current recording session without waiting for completion.

Peep the --no-wait option.

$ lttng stop --no-wait

Example 4. Stop all the recording sessions.

Peep the --all option.

$ lttng stop --all

Example 5. Stop all the recording sessions of which the name starts with bar.

Peep the --glob option.

$ lttng stop --glob='bar*'

🌈 RESOURCES 🌈

link in bio, every single one of them πŸ”—βœ¨


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.

read the license, bestie, it's the rules πŸ“œ


πŸ’– 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. The bug reports were detailed, the test cases were unusual, and honestly? Iconic. 🧚


🌟 SEE ALSO 🌟

lttng(1), lttng-add-trigger(1), lttng-create(1), lttng-enable-event(1), lttng-rotate(1), lttng-start(1), lttng-concepts(7)


mwah πŸ’‹ that's a wrap β€” this page is straight out of LTTng 2.15.1, dated 1 April 2025, LTTNG-STOP(1) girlie. Go stop something (a session, obviously 🫢). bye bestie! βœ¨πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from