lttng-disable-rotation(1): add usage examples
[lttng-tools.git] / doc / man / lttng-enable-rotation.1.txt
CommitLineData
980bb5fd
PP
1lttng-enable-rotation(1)
2========================
188419c4 3:revdate: 3 May 2021
980bb5fd
PP
4
5
6NAME
7----
188419c4 8lttng-enable-rotation - Set an LTTng tracing session rotation schedule
980bb5fd
PP
9
10
11SYNOPSIS
12--------
13[verse]
eb027cfc 14*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *enable-rotation* [option:--session='SESSION']
484b2a0c 15 (option:--timer='PERIODUS' | option:--size='SIZE' | option:--timer='PERIODUS' option:--size='SIZE')
980bb5fd
PP
16
17
18DESCRIPTION
19-----------
484b2a0c
PP
20The `lttng enable-rotation` command sets a tracing session rotation
21schedule for:
980bb5fd 22
484b2a0c
PP
23With the option:--session='SESSION' option::
24 The tracing session named 'SESSION'.
980bb5fd 25
484b2a0c 26Without the option:--session option::
188419c4
PP
27 The current tracing session (see man:lttng-concepts(7) to learn more
28 about the current tracing session).
980bb5fd 29
188419c4
PP
30See man:lttng-concepts(7) to learn more about the tracing session
31rotation and trace chunk concepts.
437afa71 32
484b2a0c
PP
33With the option:--timer='PERIODUS' option, the `enable-rotation` command
34sets a rotation schedule so that LTTng performs an automatic rotation at
35least every 'PERIODUS'.
437afa71 36
484b2a0c
PP
37With the option:--size='SIZE' option, the `enable-rotation` command sets
38a rotation schedule so that LTTng performs an automatic rotation every
39time the total size of the flushed part of the current trace chunk is at
40least 'SIZE'.
980bb5fd 41
484b2a0c
PP
42For both the option:--timer and option:--size options, LTTng checks the
43schedule condition periodically using the monitor timers of the channels
44of the selected tracing session (see the nloption:--monitor-timer option
188419c4 45of the man:lttng-enable-channel(1) command). This means that:
484b2a0c
PP
46
47* With the option:--timer='PERIODUS' option, LTTng can perform an
48 automatic rotation when the elapsed time since the last automatic
49 rotation is slightly greater than 'PERIODUS'.
50+
51The exact precision depends on the precision of the monitor timer, which
52relies on the precision of the platform implementation of POSIX timers.
53
54* With the option:--size='SIZE' option, LTTng can perform an automatic
55 rotation when the size of the flushed part of the current trace chunk
56 is greater than 'SIZE'.
57
58You may combine the option:--timer and option:--size options.
eb027cfc 59
188419c4
PP
60See the man:lttng-concepts(7) to learn how LTTng names a trace chunk
61archive directory.
484b2a0c
PP
62
63Unset a tracing session rotation schedule with the
64man:lttng-disable-rotation(1) command.
65
66[IMPORTANT]
67====
188419c4 68You may only use the `enable-rotation` command when:
484b2a0c
PP
69
70* The selected tracing session was created in normal mode or in network
71 streaming mode (see man:lttng-create(1)).
980bb5fd 72
484b2a0c
PP
73* No channel was created with a configured trace file count or size
74 limit (see the nloption:--tracefile-size and
188419c4
PP
75 nloption:--tracefile-count options of the man:lttng-enable-channel(1)
76 command).
980bb5fd 77
484b2a0c 78For a given tracing session, LTTng only performs an automatic rotation
188419c4 79when it's not currently performing a rotation.
484b2a0c 80====
980bb5fd
PP
81
82
55e06994 83include::common-lttng-cmd-options-head.txt[]
980bb5fd
PP
84
85
31099add
PP
86Rotation schedule condition
87~~~~~~~~~~~~~~~~~~~~~~~~~~~
980bb5fd 88option:--size='SIZE'::
484b2a0c
PP
89 Set a rotation schedule so that LTTng performs an automatic rotation
90 every time the total size of the flushed part of the current trace
91 chunk is at least 'SIZE' bytes.
92+
93The `k`{nbsp}(KiB), `M`{nbsp}(MiB), and `G`{nbsp}(GiB) suffixes are
94supported.
95
96option:--timer='PERIODUS'::
188419c4
PP
97 Set a rotation schedule so that LTTng performs an automatic rotation
98 approximately every 'PERIODUS' microseconds.
484b2a0c
PP
99+
100The `ms`{nbsp}(milliseconds), `s`{nbsp}(seconds), `m`{nbsp}(minutes),
101and `h`{nbsp}(hours) suffixes are supported.
102
103
104Recording target
105~~~~~~~~~~~~~~~~
980bb5fd 106option:-s 'SESSION', option:--session='SESSION'::
31099add
PP
107 Set a rotation schedule for the tracing session named 'SESSION'
108 instead of the current tracing session.
980bb5fd
PP
109
110
55e06994 111include::common-lttng-cmd-help-options.txt[]
980bb5fd
PP
112
113
55e06994
PP
114include::common-lttng-cmd-after-options.txt[]
115
116
117include::common-footer.txt[]
980bb5fd
PP
118
119
120SEE ALSO
121--------
484b2a0c
PP
122man:lttng(1),
123man:lttng-create(1),
980bb5fd 124man:lttng-disable-rotation(1),
21b35b3a
PP
125man:lttng-rotate(1),
126man:lttng-concepts(7)
This page took 0.035688 seconds and 4 git commands to generate.