lttng-clear — Clear an LTTng recording session
lttng clear command clears one or more recording sessions, that
is, it deletes the contents of their recording buffers and of all their
local and streamed trace data.
See lttng-concepts(7) to learn more about recording sessions.
clear command clears:
The current recording session.
See lttng-concepts(7) to learn more about the current recording session.
The recording session named
All the recording sessions of the connected session daemon for
your Unix user, or for all users if your Unix user is
listed in the output of
lttng list (see lttng-list(1)).
See the “Session daemon connection” section of lttng(1) to learn how a user application connects to a session daemon.
If a recording session is configured in snapshot mode (see the
--snapshot option of the lttng-create(1) command), the
clear command only clears the recording buffers.
For a given recording session, if at least one rotation occurred (see
clear command only clears its recording
buffers and its current trace chunk, not its archived trace chunks.
--disallow-clear option and the
LTTNG_RELAYD_DISALLOW_CLEAR environment variable of
lttng-relayd(8) can disable remote clearing operations. If LTTng
sends recording data over the network for the selected recording
session(s) to an LTTng relay daemon configured as such, the
See the “EXAMPLES” section below for usage examples.
Command warning (something went wrong during the command)
1 to abort the process after the first error is
Path to the LTTng home directory.
Useful when the Unix user running the commands has a non-writable home directory.
Absolute path to the manual pager to use to read the LTTng
command-line help (with lttng-help(1) or with the
--help option) instead of
Path to the directory containing the
session.xsd recording session
configuration XML schema.
--sessiond-path general option overrides this environment
Unix user’s LTTng runtime configuration.
Default output directory of LTTng traces in local and snapshot modes.
Override this path with the
--output option of the
Unix user’s LTTng runtime and configuration directory.
$LTTNG_HOME defaults to the value of the
Example:Clear the current recording session.
Example:Clear a specific recording session.
lttng clear my-session
Example:Clear all recording sessions.
lttng clear --all
Special thanks to Michel Dagenais and the DORSAL laboratory at École Polytechnique de Montréal for the LTTng journey.
Also thanks to the Ericsson teams working on tracing which helped us greatly with detailed bug reports and unusual test cases.