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

NAME

6       lttng-clear - Clear a tracing session
7

SYNOPSIS

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

DESCRIPTION

12       The lttng clear command clears one or more tracing sessions, that is,
13       it deletes the contents of their tracing buffers and all their local
14       and streamed trace data.
15
16       If no options are specified, the current tracing session is cleared
17       (see lttng-create(1) for more information about the current tracing
18       session).
19
20       If SESSION is specified, the existing tracing session named SESSION is
21       cleared.
22
23       With the --all option, all the tracing sessions, as listed in the
24       output of lttng list (see lttng-list(1)), are cleared.
25
26       If a tracing session is configured in snapshot mode (see the lttng-
27       create(1) command’s --snapshot option), only the tracing buffers are
28       cleared.
29
30       For a given tracing session, if at least one rotation occurred (see
31       lttng-rotate(1)), only its tracing buffers and its current trace chunk
32       are cleared; its archived trace chunks are NOT cleared.
33
34           Note
35           The --disallow-clear option and the LTTNG_RELAYD_DISALLOW_CLEAR
36           environment variable of lttng-relayd(8) can disable remote clearing
37           operations. If LTTng sends tracing data over the network for
38           SESSION (or for any tracing session with the --all option) to a
39           relay daemon configured as such, lttng clear fails.
40

OPTIONS

42       General options are described in lttng(1).
43
44   Target
45       -a, --all
46           Clear all the tracing sessions instead of the current tracing
47           session or the tracing session named SESSION.
48
49   Program information
50       -h, --help
51           Show command help.
52
53           This option, like lttng-help(1), attempts to launch /usr/bin/man to
54           view the command’s man page. The path to the man pager can be
55           overridden by the LTTNG_MAN_BIN_PATH environment variable.
56
57       --list-options
58           List available command options.
59

ENVIRONMENT VARIABLES

61       LTTNG_ABORT_ON_ERROR
62           Set to 1 to abort the process after the first error is encountered.
63
64       LTTNG_HOME
65           Overrides the $HOME environment variable. Useful when the user
66           running the commands has a non-writable home directory.
67
68       LTTNG_MAN_BIN_PATH
69           Absolute path to the man pager to use for viewing help information
70           about LTTng commands (using lttng-help(1) or lttng COMMAND --help).
71
72       LTTNG_SESSION_CONFIG_XSD_PATH
73           Path in which the session.xsd session configuration XML schema may
74           be found.
75
76       LTTNG_SESSIOND_PATH
77           Full session daemon binary path.
78
79           The --sessiond-path option has precedence over this environment
80           variable.
81
82       Note that the lttng-create(1) command can spawn an LTTng session daemon
83       automatically if none is running. See lttng-sessiond(8) for the
84       environment variables influencing the execution of the session daemon.
85

FILES

87       $LTTNG_HOME/.lttngrc
88           User LTTng runtime configuration.
89
90           This is where the per-user current tracing session is stored
91           between executions of lttng(1). The current tracing session can be
92           set with lttng-set-session(1). See lttng-create(1) for more
93           information about tracing sessions.
94
95       $LTTNG_HOME/lttng-traces
96           Default output directory of LTTng traces. This can be overridden
97           with the --output option of the lttng-create(1) command.
98
99       $LTTNG_HOME/.lttng
100           User LTTng runtime and configuration directory.
101
102       $LTTNG_HOME/.lttng/sessions
103           Default location of saved user tracing sessions (see lttng-save(1)
104           and lttng-load(1)).
105
106       /usr/local/etc/lttng/sessions
107           System-wide location of saved tracing sessions (see lttng-save(1)
108           and lttng-load(1)).
109
110           Note
111           $LTTNG_HOME defaults to $HOME when not explicitly set.
112

EXIT STATUS

114       0
115           Success
116
117       1
118           Command error
119
120       2
121           Undefined command
122
123       3
124           Fatal error
125
126       4
127           Command warning (something went wrong during the command)
128

BUGS

130       If you encounter any issue or usability problem, please report it on
131       the LTTng bug tracker <https://bugs.lttng.org/projects/lttng-tools>.
132

RESOURCES

134       •   LTTng project website <https://lttng.org>
135
136       •   LTTng documentation <https://lttng.org/docs>
137
138       •   Git repositories <http://git.lttng.org>
139
140       •   GitHub organization <http://github.com/lttng>
141
142       •   Continuous integration <http://ci.lttng.org/>
143
144       •   Mailing list <http://lists.lttng.org> for support and development:
145           lttng-dev@lists.lttng.org
146
147       •   IRC channel <irc://irc.oftc.net/lttng>: #lttng on irc.oftc.net
148

COPYRIGHTS

150       This program is part of the LTTng-tools project.
151
152       LTTng-tools is distributed under the GNU General Public License version
153       2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>. See the
154       LICENSE <https://github.com/lttng/lttng-tools/blob/master/LICENSE> file
155       for details.
156

THANKS

158       Special thanks to Michel Dagenais and the DORSAL laboratory
159       <http://www.dorsal.polymtl.ca/> at École Polytechnique de Montréal for
160       the LTTng journey.
161
162       Also thanks to the Ericsson teams working on tracing which helped us
163       greatly with detailed bug reports and unusual test cases.
164

SEE ALSO

166       lttng-create(1), lttng-rotate(1), lttng-set-session(1), lttng-
167       relayd(8), lttng(1)
168
169
170
171LTTng 2.12.4                     2 April 2020                   LTTNG-CLEAR(1)
Impressum