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