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