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