lttng-rotate.1.txt: update voice and document the `archives` subdir.
[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
adc4b5c8 23Once LTTng archives a trace chunk, it does not manage it anymore: you
980bb5fd
PP
24can read it, modify it, move it, or remove it.
25
adc4b5c8
PP
26An _archived trace chunk_ is a collection of metadata and data stream
27files which form a self-contained LTTng trace.
980bb5fd
PP
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
adc4b5c8
PP
42You can use `lttng rotate`:
43
44* At any time when the tracing session is active (see
45 man:lttng-start(1)).
46* A single time once the tracing session becomes inactive
47 (see man:lttng-stop(1)).
48
49By default, the `lttng rotate` command ensures that LTTng finished
50performing the tracing session rotation before it prints the archived
51trace chunk's path and exits. The printed path is absolute when the
52tracing session was created in normal mode and relative to the relay
53daemon's output directory (see the nloption:--output option in
54man:lttng-relayd(8)) when it was created in network streaming mode (see
55man:lttng-create(1)).
56
57With the option:--no-wait option, the command finishes immediately, so
58that LTTng might not have completed the rotation when the command exits.
59In this case, there is no easy way to know when the current trace chunk
60becomes archived, and the command does not print the archived trace
61chunk's path.
62
63Because when LTTng performs a tracing session rotation, it flushes the
64tracing session's current sub-buffers, archived trace chunks are never
65redundant, that is, they do not overlap over time like snapshots can
66(see man:lttng-snapshot(1)). Also, a rotation does not directly cause
67discarded event records or packets.
980bb5fd
PP
68
69See <<limitations,LIMITATIONS>> for important limitations regarding
70this command.
71
72
73Trace chunk archive naming
74~~~~~~~~~~~~~~~~~~~~~~~~~~
adc4b5c8
PP
75A trace chunk archive is a subdirectory of the `archives` subdirectory
76within a tracing session's output directory (see the nloption:--output
77option in man:lttng-create(1) and man:lttng-relayd(8)).
78
79A trace chunk archive contains, through tracing domain and possibly
b7b42334 80UID/PID subdirectories, metadata and data stream files.
980bb5fd
PP
81
82A trace chunk archive is, at the same time:
83
84* A self-contained LTTng trace.
85* A member of a set of trace chunk archives which form the complete
86 trace of a tracing session.
87
88In other words, an LTTng trace reader can read both the tracing
89session output directory (all the trace chunk archives), or a
90single trace chunk archive.
91
adc4b5c8
PP
92When LTTng performs a tracing session rotation, it names the resulting
93trace chunk archive as such, relative to the tracing session's output
94directory:
980bb5fd
PP
95
96[verse]
adc4b5c8 97archives/__BEGIN__-__END__-__ID__
980bb5fd
PP
98
99__BEGIN__::
100 Date and time of the beginning of the trace chunk archive with
adc4b5c8 101 the ISO{nbsp}8601-compatible `YYYYmmddTHHMMSS±HHMM` form, where
980bb5fd
PP
102 `YYYYmmdd` is the date and `HHMMSS±HHMM` is the time with the
103 time zone offset from UTC.
104+
105Example: `20171119T152407-0500`
106
107__END__::
108 Date and time of the end of the trace chunk archive with
adc4b5c8 109 the ISO{nbsp}8601-compatible `YYYYmmddTHHMMSS±HHMM` form, where
980bb5fd
PP
110 `YYYYmmdd` is the date and `HHMMSS±HHMM` is the time with the
111 time zone offset from UTC.
112+
113Example: `20180118T152407+0930`
114
115__ID__::
adc4b5c8
PP
116 Unique numeric identifier of the trace chunk within its tracing
117 session.
118
119Trace chunk archive name example:
980bb5fd 120
adc4b5c8
PP
121----
122archives/20171119T152407-0500-20171119T151422-0500-3
123----
980bb5fd
PP
124
125
126include::common-cmd-options-head.txt[]
127
128
129option:-n, option:--no-wait::
130 Do not ensure that the rotation is done before returning to
131 the prompt.
132
133
134include::common-cmd-help-options.txt[]
135
136
137[[limitations]]
138LIMITATIONS
139-----------
140The `lttng rotate` command only works when:
141
142* The tracing session is created in normal mode or in network streaming
143 mode (see man:lttng-create(1)).
144
145* No channel was created with a configured trace file count or size
146 limit (see the nloption:--tracefile-size and
147 nloption:--tracefile-count options in man:lttng-enable-channel(1)).
148
31099add 149* No immediate rotation (`lttng rotate`) is currently happening.
980bb5fd 150
980bb5fd
PP
151
152include::common-cmd-footer.txt[]
153
154
155SEE ALSO
156--------
157man:lttng-enable-rotation(1),
158man:lttng-disable-rotation(1),
159man:lttng(1)
This page took 0.030143 seconds and 4 git commands to generate.