doc/man: add links between man pages about session rotation
[lttng-tools.git] / doc / man / lttng-snapshot.1.txt
... / ...
CommitLineData
1lttng-snapshot(1)
2=================
3
4
5NAME
6----
7lttng-snapshot - Take LTTng snapshots and configure snapshot outputs
8
9
10SYNOPSIS
11--------
12Add a snapshot output:
13
14[verse]
15*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *snapshot add-output* [option:--max-size='SIZE']
16 [option:--name='NAME'] [option:--session='SESSION']
17 (option:--ctrl-url='URL' option:--data-url='URL' | 'URL')
18
19Remove a snapshot output:
20
21[verse]
22*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *snapshot del-output* [option:--session='SESSION']
23 ('ID' | 'NAME')
24
25List current snapshot outputs:
26
27[verse]
28*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *snapshot list-output* [option:--session='SESSION']
29
30Take a snapshot:
31
32[verse]
33*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *snapshot record* [option:--max-size='SIZE']
34 [option:--name='NAME'] [option:--session='SESSION']
35 (option:--ctrl-url='URL' option:--data-url='URL' | 'URL')
36
37
38DESCRIPTION
39-----------
40The `lttng snapshot` command manages the snapshot outputs and takes
41snapshots.
42
43A _snapshot_ is a dump of the current sub-buffers of all the channels
44of a given tracing session. When a snapshot is taken, the memory dump
45is sent to the registered snapshot outputs.
46
47The tracing session should be created in _snapshot mode_ to make sure
48that taking snapshots is allowed. This is done at tracing session
49creation time using the man:lttng-create(1) command's
50nloption:--snapshot option.
51
52Note that, when a snapshot is taken, the sub-buffers are not cleared.
53This means that different recorded snapshots may contain the same
54events.
55
56If you want, instead, to keep all the trace data, but divide it into
57archived chunks which are then free to process (just like snapshots),
58see the lttng-rotate(1) and lttng-enable-rotation(1) commands. Trace
59chunk archives do not overlap like snapshots can.
60
61
62Snapshot outputs
63~~~~~~~~~~~~~~~~
64Snapshot outputs are the destinations of snapshot files when a
65snapshot is taken using the `record` action.
66
67As of this version, only one snapshot output is allowed.
68
69A snapshot output can be added using the `add-output` action. The
70output destination URL is set using either the 'URL' positional
71argument, or both the option:--ctrl-url and option:--data-url options.
72See man:lttng-create(1) to learn more about the URL format.
73
74A name can be assigned to an output when adding it using the
75option:--name option. This name is part of the names of the
76snapshot files written to this output.
77
78By default, the snapshot files can be as big as the sum of the
79sizes of all the sub-buffers or all the channels of the selected
80tracing session. The maximum total size of all the snapshot files can
81be configured using the option:--max-size option.
82
83Snapshot outputs can be listed using the `list-output` action.
84
85Snapshot outputs can be removed using the `del-output` action. The
86configured name can be used when removing an output, or an ID as
87listed by the `list-output` action.
88
89
90Taking a snapshot
91~~~~~~~~~~~~~~~~~
92Taking a snapshot of the current tracing session is as easy as:
93
94[role="term"]
95----
96$ lttng snapshot record
97----
98
99This writes the snapshot files to the configured output. It is possible
100to use a custom, unregistered output at record time using the same
101options supported by the `add-output` action.
102
103NOTE: Before taking a snapshot on a system with a high event throughput,
104it is recommended to first run `lttng stop` (see
105man:lttng-stop(1)). Otherwise, the snapshot could contain "holes",
106the result of the tracers overwriting unconsumed trace packets during
107the record operation. After the snapshot is recorded, the tracers can be
108started again with `lttng start` (see man:lttng-start(1)).
109
110
111include::common-cmd-options-head.txt[]
112
113
114Target
115~~~~~~
116option:-s 'SESSION', option:--session='SESSION'::
117 Take a snapshot of the sub-buffers of the channels contained in
118 the tracing session named 'SESSION' instead of the current
119 tracing session.
120
121
122Snapshot output
123~~~~~~~~~~~~~~~
124option:-C 'URL', option:--ctrl-url='URL'::
125 Set control path URL to 'URL' (must use option:--data-url option
126 also).
127
128option:-D 'URL', option:--data-url='URL'::
129 Set data path URL to 'URL' (must use option:--ctrl-url option
130 also).
131
132option:-m 'SIZE', option:--max-size='SIZE'::
133 Limit the total size of all the snapshot files written when
134 recording a snapshot to 'SIZE' bytes. The `k` (kiB), `M` (MiB),
135 and `G` (GiB) suffixes are supported.
136
137option:-n 'NAME', option:--name='NAME'::
138 Assign the name 'NAME' to the snapshot output.
139
140
141include::common-cmd-help-options.txt[]
142
143
144include::common-cmd-footer.txt[]
145
146
147SEE ALSO
148--------
149man:lttng(1)
This page took 0.024136 seconds and 5 git commands to generate.