LTTNG-ROTATE(1)
π LTTNG-ROTATE π
okay bestie, welcome to the lttng-rotate page from the LTTng Manual π sit down, grab a strawberry, and let's talk about archiving trace chunks. this is literally the moment your traces get their own little scrapbook era β¨
β¨ NAME β¨
lttng-rotate β archive the current trace chunk of an LTTng recording session π
πΈ SYNOPSIS πΈ
lttng [GENERAL OPTIONS] rotate [--no-wait] [SESSION]
π DESCRIPTION π
so, the lttng rotate command archives the current trace chunk of a recording session to the file system. which session, bestie? depends:
- With the
SESSIONargument β it's the recording session namedSESSION. you said the name, it does the thing π«Ά - Without the
SESSIONargument β it's the current recording session (peeplttng-concepts(7)to learn more about the current recording session).
this whole operation is called a recording session rotation β
also go read lttng-concepts(7) because it explains the recording session rotation and trace chunk concepts way better than I can in one breath, fr fr.
you can use the rotate command:
- Any time the recording session is active π₯
- A single time once the recording session becomes inactive
and yes, lttng-concepts(7) also covers what "activity of a recording session" even means π
by default, the rotate command makes sure LTTng finished performing the recording session rotation before it prints the path of the archived trace chunk and exits. the printed path is:
- absolute when the recording session was created in normal mode, and
- relative to the base output directory of the relay daemon (see the
--outputoption oflttng-relayd(8)) when it was created in network streaming mode (seelttng-create(1)).
want it to dip out immediately instead? use the --no-wait option. but bestie, heads up: in that case there's no easy way to know when the current trace chunk becomes archived, and the command does NOT print the path of the archived trace chunk. it's giving mystery π΅οΈ
here's the part that's actually kind of iconic: because LTTng flushes the current sub-buffers of the selected recording session when it performs a recording session rotation, archived trace chunks are never redundant β that is, they do not overlap over time the way snapshots can (see lttng-snapshot(1)). also, a rotation does NOT directly cause discarded event records or packets. we love a clean cut βοΈβ¨
oh and p.s. a rotate-session trigger action can also rotate a recording session (see lttng-add-trigger(1)). multitasking queen.
scroll down to the "EXAMPLES" section for usage examples π
Important π you may only use therotatecommand when all of the following conditions are true: - The selected recording session was created in normal mode or in network streaming mode (seelttng-create(1)). - LTTng is not currently performing an immediate rotation (this command). both, bestie. not one. both. π
π OPTIONS π
see lttng(1) for GENERAL OPTIONS.
-n,--no-waitβ do not ensure that the recording session rotation operation is completed before exiting. bye, no notes, no receipts π¦
π 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. iykyk π--list-optionsβ list available command options and quit. that's it, that's the whole job β¨
π 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. shoutout to the locked-down homedir girlies π«Ά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. it's giving vintage, not vintage-chic π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. beware, the emoji economy collapses πΈ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-pathgeneral option overrides this environment variable. πLTTNG_TERM_COLORβ controls when to emit terminal SGR codes in the output. theNO_COLORenvironment 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. rainbow mode, no cap πneverβ never emit SGR codes.
NO_COLORβ if set and not empty, then it's equivalent to settingLTTNG_TERM_COLORtonever. see NO_COLORhttps://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 oflttng(1).lttng-create(1)andlttng-set-session(1)set the current recording session. so basically it's the "who am i right now" file π$LTTNG_HOME/lttng-tracesβ default output directory of LTTng traces in local and snapshot modes. override this path with the--outputoption of thelttng-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. Rotate the current recording session.
$ lttng rotate
Example 2. Rotate a specific recording session.
$ lttng rotate my-session
Example 3. Rotate the current recording session without waiting for completion.
see the --no-wait option.
$ lttng rotate --no-wait
π¦ 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. absolute legends, no notes π«Ά
also thanks to the Ericsson teams working on tracing which helped us greatly with detailed bug reports and unusual test cases. unusual test cases are the main character energy of QA, fr fr π₯
π SEE ALSO π
lttng(1), lttng-disable-rotation(1), lttng-enable-rotation(1), lttng-concepts(7)
okay that's the whole page, bestie π this was LTTng 2.15.1, dated 14 June 2021 β go archive a trace chunk and slay β¨π¦π
π¦ 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