Fix: return NULL on trace chunk registry failure
[lttng-tools.git] / doc / man / lttng-enable-rotation.1.txt
CommitLineData
980bb5fd
PP
1lttng-enable-rotation(1)
2========================
3
4
5NAME
6----
31099add 7lttng-enable-rotation - Set a tracing session's rotation schedule
980bb5fd
PP
8
9
10SYNOPSIS
11--------
12[verse]
eb027cfc
PP
13*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *enable-rotation* [option:--session='SESSION']
14 (option:--timer='PERIOD' | option:--size='SIZE' | option:--timer='PERIOD' option:--size='SIZE')
980bb5fd
PP
15
16
17DESCRIPTION
18-----------
31099add
PP
19The `lttng enable-rotation` command sets a rotation schedule for the
20current tracing session, or for the tracing session named 'SESSION' if
21provided. See man:lttng-rotate(1) for more information about the
22concepts of a tracing session _rotation_ and a _trace chunk_.
980bb5fd
PP
23
24With the option:--timer option, the rotation schedule is set so that an
25automatic rotation occurs at least every 'PERIOD' (microseconds without
26a unit suffix).
27
28With the option:--size option, the rotation schedule is set
29so that an automatic rotation occurs every time the total size of the
30flushed part of the current trace chunk is at least 'SIZE' (bytes
31without a unit suffix).
32
17bb414d 33For both option:--timer and option:--size options, LTTng checks the
980bb5fd 34schedule condition periodically using the monitor timers of the tracing
437afa71
PP
35session's channels (see the nloption:--monitor-timer option of the
36man:lttng-enable-channel(1) command). This means that:
37
38* With the option:--timer option, the automatic rotation can occur when
39 the elapsed time since the last automatic rotation is slightly greater
40 than 'PERIOD'. The exact precision is governed by the monitor timer's
41 precision, which relies on the precision of the platform's
42 implementation of POSIX timers.
43
44* With the option:--size option, the automatic rotation can occur when
45 the size of the flushed part of the current trace chunk is greater
46 than 'SIZE'.
980bb5fd 47
eb027cfc
PP
48You can combine the option:--timer and option:--size options.
49
980bb5fd 50The naming convention of a trace chunk archive which an automatic
31099add 51rotation creates is the same as with the immediate rotation command,
980bb5fd
PP
52man:lttng-rotate(1).
53
31099add
PP
54You can unset a rotation schedule with the man:lttng-disable-rotation(1)
55command.
980bb5fd
PP
56
57See <<limitations,LIMITATIONS>> for important limitations regarding
58this command.
59
60
61include::common-cmd-options-head.txt[]
62
63
31099add
PP
64Rotation schedule condition
65~~~~~~~~~~~~~~~~~~~~~~~~~~~
980bb5fd 66option:--size='SIZE'::
31099add
PP
67 Set a rotation schedule so that an automatic rotation occurs every
68 time the total size of the flushed part of the current trace chunk
69 is at least 'SIZE' bytes. The `k` (kiB), `M` (MiB), and `G` (GiB)
70 suffixes are supported.
980bb5fd
PP
71
72option:--timer='PERIOD'::
31099add
PP
73 Set a rotation schedule so that an automatic rotation occurs at
74 least every 'PERIOD' microseconds. The `ms` (milliseconds), `s`
75 (seconds), `m` (minutes), and `h` (hours) suffixes are supported.
980bb5fd
PP
76
77
78Target
79~~~~~~
80option:-s 'SESSION', option:--session='SESSION'::
31099add
PP
81 Set a rotation schedule for the tracing session named 'SESSION'
82 instead of the current tracing session.
980bb5fd
PP
83
84
85include::common-cmd-help-options.txt[]
86
87
88[[limitations]]
89LIMITATIONS
90-----------
91The `lttng enable-rotation` command only works when:
92
93* The tracing session is created in normal mode or in network streaming
94 mode (see man:lttng-create(1)).
95
96* No channel was created with a configured trace file count or size
97 limit (see the nloption:--tracefile-size and
98 nloption:--tracefile-count options in man:lttng-enable-channel(1)).
99
100For a given tracing session, LTTng only performs an automatic rotation
101when no other rotation is currently happening.
102
103
104include::common-cmd-footer.txt[]
105
106
107SEE ALSO
108--------
109man:lttng-rotate(1),
110man:lttng-disable-rotation(1),
111man:lttng(1)
This page took 0.033685 seconds and 5 git commands to generate.