X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fman%2Flttng-enable-rotation.1.txt;h=e9571ca5be4d9f7e20afcf9908063bdc442ed339;hb=f5511eeafdb40b9589306519633566c3be48756c;hp=eb7622d54f86034169afaf37924440030005551b;hpb=17bb414db4aa496cf78525e10a947a4e47dd5f9c;p=lttng-tools.git diff --git a/doc/man/lttng-enable-rotation.1.txt b/doc/man/lttng-enable-rotation.1.txt index eb7622d54..e9571ca5b 100644 --- a/doc/man/lttng-enable-rotation.1.txt +++ b/doc/man/lttng-enable-rotation.1.txt @@ -1,107 +1,126 @@ lttng-enable-rotation(1) ======================== +:revdate: 3 May 2021 NAME ---- -lttng-enable-rotation - Set a tracing session's rotation schedule +lttng-enable-rotation - Set an LTTng tracing session rotation schedule SYNOPSIS -------- [verse] -*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *enable-rotation* (option:--timer='PERIOD' | option:--size='SIZE') - [option:--session='SESSION'] +*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 rotation schedule for the -current tracing session, or for the tracing session named 'SESSION' if -provided. See man:lttng-rotate(1) for more information about the -concepts of a tracing session _rotation_ and a _trace chunk_. +The `lttng enable-rotation` command sets a tracing session rotation +schedule for: -With the option:--timer option, the rotation schedule is set so that an -automatic rotation occurs at least every 'PERIOD' (microseconds without -a unit suffix). +With the option:--session='SESSION' option:: + The tracing session named 'SESSION'. -With the option:--size option, the rotation schedule is set -so that an automatic rotation occurs every time the total size of the -flushed part of the current trace chunk is at least 'SIZE' (bytes -without a unit suffix). +Without the option:--session option:: + The current tracing session (see man:lttng-concepts(7) to learn more + about the current tracing session). -For both option:--timer and option:--size options, LTTng checks the -schedule condition periodically using the monitor timers of the tracing -session's channels. This means that, with the option:--timer option, the -automatic rotation can occur when the elapsed time since the last -automatic rotation is greater than 'PERIOD', and with the option:--size -option, the automatic rotation can occur when the size of the flushed -part of the current trace chunk is greater than 'SIZE'. Therefore the -'PERIOD' and 'SIZE' arguments are approximations. See the -nloption:--monitor-timer option in man:lttng-enable-channel(1) for more -information about the monitor timer. +See man:lttng-concepts(7) to learn more about the tracing session +rotation and trace chunk concepts. -The naming convention of a trace chunk archive which an automatic -rotation creates is the same as with the immediate rotation command, -man:lttng-rotate(1). +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'. -You can unset a rotation schedule with the man:lttng-disable-rotation(1) -command. +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'. -See <> for important limitations regarding -this command. +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 tracing 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. -include::common-cmd-options-head.txt[] +* 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. -Rotation schedule condition -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -One of: +See the man:lttng-concepts(7) to learn how LTTng names a trace chunk +archive directory. -option:--size='SIZE':: - Set a rotation schedule so that an automatic rotation occurs every - time the total size of the flushed part of the current trace chunk - is at least 'SIZE' bytes. The `k` (kiB), `M` (MiB), and `G` (GiB) - suffixes are supported. +Unset a tracing session rotation schedule with the +man:lttng-disable-rotation(1) command. -option:--timer='PERIOD':: - Set a rotation schedule so that an automatic rotation occurs at - least every 'PERIOD' microseconds. The `ms` (milliseconds), `s` - (seconds), `m` (minutes), and `h` (hours) suffixes are supported. +[IMPORTANT] +==== +You may only use the `enable-rotation` command when: +* The selected tracing session was created in normal mode or in network + streaming mode (see man:lttng-create(1)). -Target -~~~~~~ -option:-s 'SESSION', option:--session='SESSION':: - Set a rotation schedule for the tracing session named 'SESSION' - instead of the current tracing session. +* 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 tracing session, LTTng only performs an automatic rotation +when it's not currently performing a rotation. +==== -include::common-cmd-help-options.txt[] +include::common-lttng-cmd-options-head.txt[] -[[limitations]] -LIMITATIONS ------------ -The `lttng enable-rotation` command only works when: -* The tracing session is created in normal mode or in network streaming - mode (see man:lttng-create(1)). +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 tracing session named 'SESSION' + instead of the current tracing session. -* No channel was created with a configured trace file count or size - limit (see the nloption:--tracefile-size and - nloption:--tracefile-count options in man:lttng-enable-channel(1)). -For a given tracing session, LTTng only performs an automatic rotation -when no other rotation is currently happening. +include::common-lttng-cmd-help-options.txt[] + + +include::common-lttng-cmd-after-options.txt[] -include::common-cmd-footer.txt[] +include::common-footer.txt[] SEE ALSO -------- -man:lttng-rotate(1), +man:lttng(1), +man:lttng-create(1), man:lttng-disable-rotation(1), -man:lttng(1) +man:lttng-rotate(1), +man:lttng-concepts(7)