Commit | Line | Data |
---|---|---|
980bb5fd PP |
1 | lttng-enable-rotation(1) |
2 | ======================== | |
3 | ||
4 | ||
5 | NAME | |
6 | ---- | |
31099add | 7 | lttng-enable-rotation - Set a tracing session's rotation schedule |
980bb5fd PP |
8 | |
9 | ||
10 | SYNOPSIS | |
11 | -------- | |
12 | [verse] | |
13 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *enable-rotation* (option:--timer='PERIOD' | option:--size='SIZE') | |
14 | [option:--session='SESSION'] | |
15 | ||
16 | ||
17 | DESCRIPTION | |
18 | ----------- | |
31099add PP |
19 | The `lttng enable-rotation` command sets a rotation schedule for the |
20 | current tracing session, or for the tracing session named 'SESSION' if | |
21 | provided. See man:lttng-rotate(1) for more information about the | |
22 | concepts of a tracing session _rotation_ and a _trace chunk_. | |
980bb5fd PP |
23 | |
24 | With the option:--timer option, the rotation schedule is set so that an | |
25 | automatic rotation occurs at least every 'PERIOD' (microseconds without | |
26 | a unit suffix). | |
27 | ||
28 | With the option:--size option, the rotation schedule is set | |
29 | so that an automatic rotation occurs every time the total size of the | |
30 | flushed part of the current trace chunk is at least 'SIZE' (bytes | |
31 | without a unit suffix). | |
32 | ||
33 | With both the option:--timer and option:--size options, LTTng checks the | |
34 | schedule condition periodically using the monitor timers of the tracing | |
35 | session's channels. This means that, with the option:--timer option, the | |
36 | automatic rotation can occur when the elapsed time since the last | |
37 | automatic rotation is greater than 'PERIOD', and with the option:--size | |
38 | option, the automatic rotation can occur when the size of the flushed | |
39 | part of the current trace chunk is greater than 'SIZE'. See the | |
40 | nloption:--monitor-timer option in man:lttng-enable-channel(1) for more | |
41 | information about the monitor timer. | |
42 | ||
43 | The naming convention of a trace chunk archive which an automatic | |
31099add | 44 | rotation creates is the same as with the immediate rotation command, |
980bb5fd PP |
45 | man:lttng-rotate(1). |
46 | ||
31099add PP |
47 | You can unset a rotation schedule with the man:lttng-disable-rotation(1) |
48 | command. | |
980bb5fd PP |
49 | |
50 | See <<limitations,LIMITATIONS>> for important limitations regarding | |
51 | this command. | |
52 | ||
53 | ||
54 | include::common-cmd-options-head.txt[] | |
55 | ||
56 | ||
31099add PP |
57 | Rotation schedule condition |
58 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
980bb5fd PP |
59 | One of: |
60 | ||
61 | option:--size='SIZE':: | |
31099add PP |
62 | Set a rotation schedule so that an automatic rotation occurs every |
63 | time the total size of the flushed part of the current trace chunk | |
64 | is at least 'SIZE' bytes. The `k` (kiB), `M` (MiB), and `G` (GiB) | |
65 | suffixes are supported. | |
980bb5fd PP |
66 | |
67 | option:--timer='PERIOD':: | |
31099add PP |
68 | Set a rotation schedule so that an automatic rotation occurs at |
69 | least every 'PERIOD' microseconds. The `ms` (milliseconds), `s` | |
70 | (seconds), `m` (minutes), and `h` (hours) suffixes are supported. | |
980bb5fd PP |
71 | |
72 | ||
73 | Target | |
74 | ~~~~~~ | |
75 | option:-s 'SESSION', option:--session='SESSION':: | |
31099add PP |
76 | Set a rotation schedule for the tracing session named 'SESSION' |
77 | instead of the current tracing session. | |
980bb5fd PP |
78 | |
79 | ||
80 | include::common-cmd-help-options.txt[] | |
81 | ||
82 | ||
83 | [[limitations]] | |
84 | LIMITATIONS | |
85 | ----------- | |
86 | The `lttng enable-rotation` command only works when: | |
87 | ||
88 | * The tracing session is created in normal mode or in network streaming | |
89 | mode (see man:lttng-create(1)). | |
90 | ||
91 | * No channel was created with a configured trace file count or size | |
92 | limit (see the nloption:--tracefile-size and | |
93 | nloption:--tracefile-count options in man:lttng-enable-channel(1)). | |
94 | ||
95 | For a given tracing session, LTTng only performs an automatic rotation | |
96 | when no other rotation is currently happening. | |
97 | ||
98 | ||
99 | include::common-cmd-footer.txt[] | |
100 | ||
101 | ||
102 | SEE ALSO | |
103 | -------- | |
104 | man:lttng-rotate(1), | |
105 | man:lttng-disable-rotation(1), | |
106 | man:lttng(1) |