Docs: immadiate rotations can be performed with active schedules
[lttng-tools.git] / doc / man / lttng-rotate.1.txt
CommitLineData
980bb5fd
PP
1lttng-rotate(1)
2===============
3
4
5NAME
6----
7lttng-rotate - Archive a tracing session's current trace chunk
8
9
10SYNOPSIS
11--------
12[verse]
13*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *rotate* [option:--no-wait] ['SESSION']
14
15
16DESCRIPTION
17-----------
18The `lttng rotate` command archives the current trace chunk of the
19current tracing session, or of the tracing session named 'SESSION' if
20provided, to the file system. This action is called a tracing session
21_rotation_.
22
23Once a trace chunk is archived, LTTng does not manage it anymore: you
24can read it, modify it, move it, or remove it.
25
26An archived trace chunk is a collection of metadata and data stream
27files which form a self-contained trace.
28
29The _current trace chunk_ of a given tracing session includes:
30
31* The stream files already written to the file system, and which are
32 not part of a previously archived trace chunk, since the most recent
33 event amongst:
34** The first time the tracing session was started with
35 man:lttng-start(1).
31099add 36** The last rotation, either an immediate one with `lttng rotate`, or an
980bb5fd
PP
37 automatic one from a rotation schedule previously set with
38 man:lttng-enable-rotation(1).
39* The content of all the non-flushed sub-buffers of the tracing
40 session's channels.
41
42You can use `lttng rotate` either at any time when the tracing session
43is active (see man:lttng-start(1)), or a single time once the tracing
44session becomes inactive (see man:lttng-stop(1)).
45
46By default, the `lttng rotate` command ensures that the rotation is done
47before printing the archived trace chunk's path and returning to the
48prompt. The printed path is absolute when the tracing session was
49created in normal mode and relative to the relay daemon's output
50directory (see the nloption:--output option in man:lttng-relayd(8)) when
51it was created in network streaming mode (see man:lttng-create(1)).
52
53With the option:--no-wait option, the command finishes immediately,
54hence a rotation might not be completed when the command is done. In
55this case, there is no easy way to know when the current trace chunk is
56archived, and the command does not print the archived trace chunk's
57path.
58
59Because a rotation causes the tracing session's current sub-buffers to
60be flushed, archived trace chunks are never redundant, that is, they do
61not overlap over time like snapshots can (see man:lttng-snapshot(1)).
62Also, a rotation does not directly cause discarded event records or
63packets.
64
65See <<limitations,LIMITATIONS>> for important limitations regarding
66this command.
67
68
69Trace chunk archive naming
70~~~~~~~~~~~~~~~~~~~~~~~~~~
71A trace chunk archive is a subdirectory of a tracing session's output
72directory (see the nloption:--output option in man:lttng-create(1))
73which contains, through tracing domain and possibly UID/PID
74subdirectories, metadata and data stream files.
75
76A trace chunk archive is, at the same time:
77
78* A self-contained LTTng trace.
79* A member of a set of trace chunk archives which form the complete
80 trace of a tracing session.
81
82In other words, an LTTng trace reader can read both the tracing
83session output directory (all the trace chunk archives), or a
84single trace chunk archive.
85
86When a tracing session rotation occurs, the created trace chunk
87archive is named:
88
89[verse]
90__BEGIN__-__END__-__ID__
91
92__BEGIN__::
93 Date and time of the beginning of the trace chunk archive with
94 the ISO 8601-compatible `YYYYmmddTHHMMSS±HHMM` form, where
95 `YYYYmmdd` is the date and `HHMMSS±HHMM` is the time with the
96 time zone offset from UTC.
97+
98Example: `20171119T152407-0500`
99
100__END__::
101 Date and time of the end of the trace chunk archive with
102 the ISO 8601-compatible `YYYYmmddTHHMMSS±HHMM` form, where
103 `YYYYmmdd` is the date and `HHMMSS±HHMM` is the time with the
104 time zone offset from UTC.
105+
106Example: `20180118T152407+0930`
107
108__ID__::
109 Unique numeric identifier of the trace chunk within its
110 tracing session.
111
112Trace chunk archive name example: `20171119T152407-0500-20171119T151422-0500-3`
113
114
115include::common-cmd-options-head.txt[]
116
117
118option:-n, option:--no-wait::
119 Do not ensure that the rotation is done before returning to
120 the prompt.
121
122
123include::common-cmd-help-options.txt[]
124
125
126[[limitations]]
127LIMITATIONS
128-----------
129The `lttng rotate` command only works when:
130
131* The tracing session is created in normal mode or in network streaming
132 mode (see man:lttng-create(1)).
133
134* No channel was created with a configured trace file count or size
135 limit (see the nloption:--tracefile-size and
136 nloption:--tracefile-count options in man:lttng-enable-channel(1)).
137
31099add 138* No immediate rotation (`lttng rotate`) is currently happening.
980bb5fd 139
980bb5fd
PP
140
141include::common-cmd-footer.txt[]
142
143
144SEE ALSO
145--------
146man:lttng-enable-rotation(1),
147man:lttng-disable-rotation(1),
148man:lttng(1)
This page took 0.030134 seconds and 5 git commands to generate.