1LTTNG-CLEAR(1)                   LTTng Manual                   LTTNG-CLEAR(1)
2
3
4

NAME

6       lttng-clear - Clear an LTTng recording session
7

SYNOPSIS

9       lttng [GENERAL OPTIONS] clear [SESSION | --all]
10

DESCRIPTION

12       The lttng clear command clears one or more recording sessions, that is,
13       it deletes the contents of their recording buffers and of all their
14       local and streamed trace data.
15
16       See lttng-concepts(7) to learn more about recording sessions.
17
18       The clear command clears:
19
20       Without any option
21           The current recording session.
22
23           See lttng-concepts(7) to learn more about the current recording
24           session.
25
26       With the SESSION argument
27           The recording session named SESSION.
28
29       With the --all option
30           All the recording sessions of the connected session daemon for your
31           Unix user, or for all users if your Unix user is root, as listed in
32           the output of lttng list (see lttng-list(1)).
33
34           See the “Session daemon connection” section of lttng(1) to learn
35           how a user application connects to a session daemon.
36
37       If a recording session is configured in snapshot mode (see the
38       --snapshot option of the lttng-create(1) command), the clear command
39       only clears the recording buffers.
40
41       For a given recording session, if at least one rotation occurred (see
42       lttng-concepts(7)), the clear command only clears its recording buffers
43       and its current trace chunk, NOT its archived trace chunks.
44
45       Note
46           The --disallow-clear option and the LTTNG_RELAYD_DISALLOW_CLEAR
47           environment variable of lttng-relayd(8) can disable remote clearing
48           operations. If LTTng sends recording data over the network for the
49           selected recording session(s) to an LTTng relay daemon configured
50           as such, the clear command fails.
51
52       See the “EXAMPLES” section below for usage examples.
53

OPTIONS

55       See lttng(1) for GENERAL OPTIONS.
56
57   Recording target
58       -a, --all
59           Clear all the recording sessions of your Unix user, or of all users
60           if your Unix user is root, as listed in the output of lttng-
61           list(1), instead of the current recording session or the recording
62           session named SESSION.
63
64   Program information
65       -h, --help
66           Show help.
67
68           This option attempts to launch /usr/bin/man to view this manual
69           page. Override the manual pager path with the LTTNG_MAN_BIN_PATH
70           environment variable.
71
72       --list-options
73           List available command options and quit.
74

EXIT STATUS

76       0
77           Success
78
79       1
80           Command error
81
82       2
83           Undefined command
84
85       3
86           Fatal error
87
88       4
89           Command warning (something went wrong during the command)
90

ENVIRONMENT

92       LTTNG_ABORT_ON_ERROR
93           Set to 1 to abort the process after the first error is encountered.
94
95       LTTNG_HOME
96           Path to the LTTng home directory.
97
98           Defaults to $HOME.
99
100           Useful when the Unix user running the commands has a non-writable
101           home directory.
102
103       LTTNG_MAN_BIN_PATH
104           Absolute path to the manual pager to use to read the LTTng
105           command-line help (with lttng-help(1) or with the --help option)
106           instead of /usr/bin/man.
107
108       LTTNG_SESSION_CONFIG_XSD_PATH
109           Path to the directory containing the session.xsd recording session
110           configuration XML schema.
111
112       LTTNG_SESSIOND_PATH
113           Absolute path to the LTTng session daemon binary (see lttng-
114           sessiond(8)) to spawn from the lttng-create(1) command.
115
116           The --sessiond-path general option overrides this environment
117           variable.
118

FILES

120       $LTTNG_HOME/.lttngrc
121           Unix user’s LTTng runtime configuration.
122
123           This is where LTTng stores the name of the Unix user’s current
124           recording session between executions of lttng(1).  lttng-create(1)
125           and lttng-set-session(1) set the current recording session.
126
127       $LTTNG_HOME/lttng-traces
128           Default output directory of LTTng traces in local and snapshot
129           modes.
130
131           Override this path with the --output option of the lttng-create(1)
132           command.
133
134       $LTTNG_HOME/.lttng
135           Unix user’s LTTng runtime and configuration directory.
136
137       $LTTNG_HOME/.lttng/sessions
138           Default directory containing the Unix user’s saved recording
139           session configurations (see lttng-save(1) and lttng-load(1)).
140
141       /usr/local/etc/lttng/sessions
142           Directory containing the system-wide saved recording session
143           configurations (see lttng-save(1) and lttng-load(1)).
144
145       Note
146           $LTTNG_HOME defaults to the value of the HOME environment variable.
147

EXAMPLES

149       Example 1. Clear the current recording session.
150
151               $ lttng clear
152
153       Example 2. Clear a specific recording session.
154
155               $ lttng clear my-session
156
157       Example 3. Clear all recording sessions.
158
159           See the --all option.
160
161               $ lttng clear --all
162

RESOURCES

164       •   LTTng project website <https://lttng.org>
165
166       •   LTTng documentation <https://lttng.org/docs>
167
168       •   LTTng bug tracker <https://bugs.lttng.org>
169
170       •   Git repositories <https://git.lttng.org>
171
172       •   GitHub organization <https://github.com/lttng>
173
174       •   Continuous integration <https://ci.lttng.org/>
175
176       •   Mailing list <https://lists.lttng.org/> for support and
177           development: lttng-dev@lists.lttng.org
178
179       •   IRC channel <irc://irc.oftc.net/lttng>: #lttng on irc.oftc.net
180
182       This program is part of the LTTng-tools project.
183
184       LTTng-tools is distributed under the GNU General Public License
185       version 2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>.
186       See the LICENSE <https://github.com/lttng/lttng-
187       tools/blob/master/LICENSE> file for details.
188

THANKS

190       Special thanks to Michel Dagenais and the DORSAL laboratory
191       <http://www.dorsal.polymtl.ca/> at École Polytechnique de Montréal for
192       the LTTng journey.
193
194       Also thanks to the Ericsson teams working on tracing which helped us
195       greatly with detailed bug reports and unusual test cases.
196

SEE ALSO

198       lttng(1), lttng-create(1), lttng-concepts(7), lttng-relayd(8)
199
200
201
202LTTng 2.13.4                     14 June 2021                   LTTNG-CLEAR(1)
Impressum