Commit | Line | Data |
---|---|---|
980bb5fd PP |
1 | lttng-rotate(1) |
2 | =============== | |
42969a5f | 3 | :revdate: 17 May 2021 |
980bb5fd PP |
4 | |
5 | ||
6 | NAME | |
7 | ---- | |
26f0c779 | 8 | lttng-rotate - Archive the current trace chunk of an LTTng tracing 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 PP |
22 | With the 'SESSION' argument:: |
23 | The tracing session named 'SESSION'. | |
980bb5fd | 24 | |
26f0c779 PP |
25 | Without the 'SESSION' argument:: |
26 | The current tracing session (see man:lttng-concepts(7) to learn more | |
27 | about the current tracing session). | |
980bb5fd | 28 | |
26f0c779 | 29 | This action is called a _tracing session rotation_. |
980bb5fd | 30 | |
26f0c779 PP |
31 | See man:lttng-concepts(7) to learn more about the tracing session |
32 | rotation and trace chunk concepts. | |
adc4b5c8 | 33 | |
26f0c779 | 34 | You can use the `rotate` command: |
980bb5fd | 35 | |
26f0c779 | 36 | * Any time the tracing session is active. |
980bb5fd | 37 | |
26f0c779 | 38 | * A single time once the tracing session becomes inactive. |
980bb5fd | 39 | |
26f0c779 PP |
40 | See man:lttng-concepts(7) to learn more about the activity of a |
41 | tracing session. | |
980bb5fd | 42 | |
26f0c779 PP |
43 | By default, the `rotate` command ensures that LTTng finished performing |
44 | the tracing session rotation before it prints the path of the archived | |
45 | trace chunk and exits. The printed path is absolute when the tracing | |
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 | |
26f0c779 PP |
56 | Because LTTng flushes the current sub-buffers of the selected tracing |
57 | session when it performs a tracing session rotation, archived trace | |
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 | |
26f0c779 PP |
62 | A `rotate-session` trigger action can also rotate a tracing session (see |
63 | man:lttng-add-trigger(1)). | |
980bb5fd | 64 | |
42969a5f PP |
65 | See the <<examples,EXAMPLES>> section below for usage examples. |
66 | ||
26f0c779 PP |
67 | [IMPORTANT] |
68 | ==== | |
69 | You may only use the `rotate` command when: | |
980bb5fd | 70 | |
26f0c779 PP |
71 | * The selected tracing session was created in normal mode or in network |
72 | streaming mode (see man:lttng-create(1)). | |
980bb5fd | 73 | |
26f0c779 PP |
74 | * No channel was created with a configured trace file count or size |
75 | limit (see the nloption:--tracefile-size and | |
76 | nloption:--tracefile-count options of the man:lttng-enable-channel(1) | |
77 | command). | |
980bb5fd | 78 | |
26f0c779 PP |
79 | * LTTng is not currently performing an immediate rotation (this |
80 | command). | |
81 | ==== | |
980bb5fd | 82 | |
980bb5fd | 83 | |
f5511eea | 84 | include::common-lttng-cmd-options-head.txt[] |
980bb5fd | 85 | |
980bb5fd | 86 | |
26f0c779 PP |
87 | option:-n, option:--no-wait:: |
88 | Do not ensure that the tracing session rotation operation is | |
89 | completed before exiting. | |
980bb5fd | 90 | |
980bb5fd | 91 | |
f5511eea | 92 | include::common-lttng-cmd-help-options.txt[] |
980bb5fd | 93 | |
980bb5fd | 94 | |
f5511eea PP |
95 | include::common-lttng-cmd-after-options.txt[] |
96 | ||
97 | ||
42969a5f PP |
98 | [[examples]] |
99 | EXAMPLES | |
100 | -------- | |
101 | .Rotate the current tracing session. | |
102 | ==== | |
103 | [role="term"] | |
104 | ---- | |
105 | $ lttng rotate | |
106 | ---- | |
107 | ==== | |
108 | ||
109 | .Rotate a specific tracing session. | |
110 | ==== | |
111 | [role="term"] | |
112 | ---- | |
113 | $ lttng rotate my-session | |
114 | ---- | |
115 | ==== | |
116 | ||
117 | .Rotate the current tracing session without waiting for completion. | |
118 | ==== | |
119 | See the option:--no-wait option. | |
120 | ||
121 | [role="term"] | |
122 | ---- | |
123 | $ lttng rotate --no-wait | |
124 | ---- | |
125 | ==== | |
126 | ||
127 | ||
f5511eea | 128 | include::common-footer.txt[] |
980bb5fd PP |
129 | |
130 | ||
131 | SEE ALSO | |
132 | -------- | |
26f0c779 | 133 | man:lttng(1), |
980bb5fd | 134 | man:lttng-disable-rotation(1), |
af1c4164 PP |
135 | man:lttng-enable-rotation(1), |
136 | man:lttng-concepts(7) |