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