1 lttng-enable-rotation(1)
2 ========================
3 :revdate: 13 November 2018
8 lttng-enable-rotation - Set a tracing session's rotation schedule
14 *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *enable-rotation* [option:--session='SESSION']
15 (option:--timer='PERIOD' | option:--size='SIZE' | option:--timer='PERIOD' option:--size='SIZE')
20 The `lttng enable-rotation` command sets a rotation schedule for the
21 current tracing session, or for the tracing session named 'SESSION' if
22 provided. See man:lttng-rotate(1) for more information about the
23 concepts of a tracing session _rotation_ and a _trace chunk_.
25 With the option:--timer option, the rotation schedule is set so that an
26 automatic rotation occurs at least every 'PERIOD' (microseconds without
29 With the option:--size option, the rotation schedule is set
30 so that an automatic rotation occurs every time the total size of the
31 flushed part of the current trace chunk is at least 'SIZE' (bytes
32 without a unit suffix).
34 For both option:--timer and option:--size options, LTTng checks the
35 schedule condition periodically using the monitor timers of the tracing
36 session's channels (see the nloption:--monitor-timer option of the
37 man:lttng-enable-channel(1) command). This means that:
39 * With the option:--timer option, the automatic rotation can occur when
40 the elapsed time since the last automatic rotation is slightly greater
41 than 'PERIOD'. The exact precision is governed by the monitor timer's
42 precision, which relies on the precision of the platform's
43 implementation of POSIX timers.
45 * With the option:--size option, the automatic rotation can occur when
46 the size of the flushed part of the current trace chunk is greater
49 You can combine the option:--timer and option:--size options.
51 The naming convention of a trace chunk archive which an automatic
52 rotation creates is the same as with the immediate rotation command,
55 You can unset a rotation schedule with the man:lttng-disable-rotation(1)
58 See <<limitations,LIMITATIONS>> for important limitations regarding
62 include::common-cmd-options-head.txt[]
65 Rotation schedule condition
66 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 option:--size='SIZE'::
68 Set a rotation schedule so that an automatic rotation occurs every
69 time the total size of the flushed part of the current trace chunk
70 is at least 'SIZE' bytes. The `k` (kiB), `M` (MiB), and `G` (GiB)
71 suffixes are supported.
73 option:--timer='PERIOD'::
74 Set a rotation schedule so that an automatic rotation occurs at
75 least every 'PERIOD' microseconds. The `ms` (milliseconds), `s`
76 (seconds), `m` (minutes), and `h` (hours) suffixes are supported.
81 option:-s 'SESSION', option:--session='SESSION'::
82 Set a rotation schedule for the tracing session named 'SESSION'
83 instead of the current tracing session.
86 include::common-cmd-help-options.txt[]
92 The `lttng enable-rotation` command only works when:
94 * The tracing session is created in normal mode or in network streaming
95 mode (see man:lttng-create(1)).
97 * No channel was created with a configured trace file count or size
98 limit (see the nloption:--tracefile-size and
99 nloption:--tracefile-count options in man:lttng-enable-channel(1)).
101 For a given tracing session, LTTng only performs an automatic rotation
102 when no other rotation is currently happening.
105 include::common-cmd-footer.txt[]
111 man:lttng-disable-rotation(1),