1 lttng-enable-rotation(1)
2 ========================
3 :revdate: 21 April 2021
8 lttng-enable-rotation - Set a tracing session rotation schedule
14 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *enable-rotation* [option:--session='SESSION']
15 (option:--timer='PERIODUS' | option:--size='SIZE' | option:--timer='PERIODUS' option:--size='SIZE')
20 The `lttng enable-rotation` command sets a tracing session rotation
23 With the option:--session='SESSION' option::
24 The tracing session named 'SESSION'.
26 Without the option:--session option::
27 The current tracing session (see man:lttng-create(1) and
28 man:lttng-set-session(1) to learn more about the current tracing
31 See man:lttng-rotate(1) for more information about the concepts of a
32 tracing session _rotation_ and a _trace chunk_.
34 With the option:--timer='PERIODUS' option, the `enable-rotation` command
35 sets a rotation schedule so that LTTng performs an automatic rotation at
36 least every 'PERIODUS'.
38 With the option:--size='SIZE' option, the `enable-rotation` command sets
39 a rotation schedule so that LTTng performs an automatic rotation every
40 time the total size of the flushed part of the current trace chunk is at
43 For both the option:--timer and option:--size options, LTTng checks the
44 schedule condition periodically using the monitor timers of the channels
45 of the selected tracing session (see the nloption:--monitor-timer option
46 of man:lttng-enable-channel(1)). This means that:
48 * With the option:--timer='PERIODUS' option, LTTng can perform an
49 automatic rotation when the elapsed time since the last automatic
50 rotation is slightly greater than 'PERIODUS'.
52 The exact precision depends on the precision of the monitor timer, which
53 relies on the precision of the platform implementation of POSIX timers.
55 * With the option:--size='SIZE' option, LTTng can perform an automatic
56 rotation when the size of the flushed part of the current trace chunk
57 is greater than 'SIZE'.
59 You may combine the option:--timer and option:--size options.
61 The naming convention of a trace chunk archive which an automatic
62 rotation operation creates is the same as with the immediate rotation
63 command, man:lttng-rotate(1).
65 Unset a tracing session rotation schedule with the
66 man:lttng-disable-rotation(1) command.
70 The `enable-rotation` command only works when:
72 * The selected tracing session was created in normal mode or in network
73 streaming mode (see man:lttng-create(1)).
75 * No channel was created with a configured trace file count or size
76 limit (see the nloption:--tracefile-size and
77 nloption:--tracefile-count options of man:lttng-enable-channel(1)).
79 For a given tracing session, LTTng only performs an automatic rotation
80 when no other rotation is currently happening.
84 include::common-cmd-options-head.txt[]
87 Rotation schedule condition
88 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
89 option:--size='SIZE'::
90 Set a rotation schedule so that LTTng performs an automatic rotation
91 every time the total size of the flushed part of the current trace
92 chunk is at least 'SIZE' bytes.
94 The `k`{nbsp}(KiB), `M`{nbsp}(MiB), and `G`{nbsp}(GiB) suffixes are
97 option:--timer='PERIODUS'::
98 Set a rotation schedule so that LTTng performs an automatic rotation at
99 least every 'PERIODUS' microseconds.
101 The `ms`{nbsp}(milliseconds), `s`{nbsp}(seconds), `m`{nbsp}(minutes),
102 and `h`{nbsp}(hours) suffixes are supported.
107 option:-s 'SESSION', option:--session='SESSION'::
108 Set a rotation schedule for the tracing session named 'SESSION'
109 instead of the current tracing session.
112 include::common-cmd-help-options.txt[]
115 include::common-cmd-footer.txt[]
122 man:lttng-disable-rotation(1),