Commit | Line | Data |
---|---|---|
980bb5fd PP |
1 | lttng-rotate(1) |
2 | =============== | |
e9711845 | 3 | :revdate: 14 June 2021 |
980bb5fd PP |
4 | |
5 | ||
6 | NAME | |
7 | ---- | |
e9711845 | 8 | lttng-rotate - Archive the current trace chunk of an LTTng recording session |
980bb5fd PP |
9 | |
10 | ||
11 | SYNOPSIS | |
12 | -------- | |
13 | [verse] | |
14 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *rotate* [option:--no-wait] ['SESSION'] | |
15 | ||
16 | ||
17 | DESCRIPTION | |
18 | ----------- | |
26f0c779 PP |
19 | The `lttng rotate` command archives to the file system |
20 | the current trace chunk of: | |
adc4b5c8 | 21 | |
26f0c779 | 22 | With the 'SESSION' argument:: |
e9711845 | 23 | The recording session named 'SESSION'. |
980bb5fd | 24 | |
26f0c779 | 25 | Without the 'SESSION' argument:: |
e9711845 PP |
26 | The current recording session (see man:lttng-concepts(7) to learn |
27 | more about the current recording session). | |
980bb5fd | 28 | |
e9711845 | 29 | This action is called a _recording session rotation_. |
980bb5fd | 30 | |
e9711845 | 31 | See man:lttng-concepts(7) to learn more about the recording session |
26f0c779 | 32 | rotation and trace chunk concepts. |
adc4b5c8 | 33 | |
26f0c779 | 34 | You can use the `rotate` command: |
980bb5fd | 35 | |
e9711845 | 36 | * Any time the recording session is active. |
980bb5fd | 37 | |
e9711845 | 38 | * A single time once the recording session becomes inactive. |
980bb5fd | 39 | |
26f0c779 | 40 | See man:lttng-concepts(7) to learn more about the activity of a |
e9711845 | 41 | recording session. |
980bb5fd | 42 | |
26f0c779 | 43 | By default, the `rotate` command ensures that LTTng finished performing |
e9711845 PP |
44 | the recording session rotation before it prints the path of the archived |
45 | trace chunk and exits. The printed path is absolute when the recording | |
26f0c779 PP |
46 | session was created in normal mode and relative to the base output |
47 | directory of the relay daemon (see the nloption:--output option of | |
48 | man:lttng-relayd(8)) when it was created in network streaming mode (see | |
49 | man:lttng-create(1)). | |
980bb5fd | 50 | |
26f0c779 PP |
51 | Make the command exit immediately with the option:--no-wait option. In |
52 | this case, there's no easy way to know when the current trace chunk | |
53 | becomes archived, and the command does :not: print the path of the | |
54 | archived trace chunk. | |
980bb5fd | 55 | |
e9711845 PP |
56 | Because LTTng flushes the current sub-buffers of the selected recording |
57 | session when it performs a recording session rotation, archived trace | |
26f0c779 PP |
58 | chunks are never redundant, that is, they do not overlap over time like |
59 | snapshots can (see man:lttng-snapshot(1)). Also, a rotation does :not: | |
60 | directly cause discarded event records or packets. | |
980bb5fd | 61 | |
e9711845 PP |
62 | A `rotate-session` trigger action can also rotate a recording session |
63 | (see man:lttng-add-trigger(1)). | |
980bb5fd | 64 | |
da39b67c | 65 | See the ``<<examples,EXAMPLES>>'' section below for usage examples. |
42969a5f | 66 | |
26f0c779 PP |
67 | [IMPORTANT] |
68 | ==== | |
69 | You may only use the `rotate` command when: | |
980bb5fd | 70 | |
e9711845 PP |
71 | * The selected recording session was created in normal mode or in |
72 | network streaming mode (see man:lttng-create(1)). | |
980bb5fd | 73 | |
26f0c779 PP |
74 | * LTTng is not currently performing an immediate rotation (this |
75 | command). | |
76 | ==== | |
980bb5fd | 77 | |
980bb5fd | 78 | |
f5511eea | 79 | include::common-lttng-cmd-options-head.txt[] |
980bb5fd | 80 | |
980bb5fd | 81 | |
26f0c779 | 82 | option:-n, option:--no-wait:: |
e9711845 | 83 | Do not ensure that the recording session rotation operation is |
26f0c779 | 84 | completed before exiting. |
980bb5fd | 85 | |
980bb5fd | 86 | |
f5511eea | 87 | include::common-lttng-cmd-help-options.txt[] |
980bb5fd | 88 | |
980bb5fd | 89 | |
f5511eea PP |
90 | include::common-lttng-cmd-after-options.txt[] |
91 | ||
92 | ||
42969a5f PP |
93 | [[examples]] |
94 | EXAMPLES | |
95 | -------- | |
e9711845 | 96 | .Rotate the current recording session. |
42969a5f PP |
97 | ==== |
98 | [role="term"] | |
99 | ---- | |
100 | $ lttng rotate | |
101 | ---- | |
102 | ==== | |
103 | ||
e9711845 | 104 | .Rotate a specific recording session. |
42969a5f PP |
105 | ==== |
106 | [role="term"] | |
107 | ---- | |
108 | $ lttng rotate my-session | |
109 | ---- | |
110 | ==== | |
111 | ||
e9711845 | 112 | .Rotate the current recording session without waiting for completion. |
42969a5f PP |
113 | ==== |
114 | See the option:--no-wait option. | |
115 | ||
116 | [role="term"] | |
117 | ---- | |
118 | $ lttng rotate --no-wait | |
119 | ---- | |
120 | ==== | |
121 | ||
122 | ||
f5511eea | 123 | include::common-footer.txt[] |
980bb5fd PP |
124 | |
125 | ||
126 | SEE ALSO | |
127 | -------- | |
26f0c779 | 128 | man:lttng(1), |
980bb5fd | 129 | man:lttng-disable-rotation(1), |
af1c4164 PP |
130 | man:lttng-enable-rotation(1), |
131 | man:lttng-concepts(7) |