'\" t
.\" Title: lttng-load
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 14 June 2021
.\" Manual: LTTng Manual
.\" Source: LTTng 2.13.11
.\" Language: English
.\"
.TH "LTTNG\-LOAD" "1" "14 June 2021" "LTTng 2\&.13\&.11" "LTTng Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
lttng-load \- Load LTTng recording session configurations
.SH "SYNOPSIS"
.sp
.nf
\fBlttng\fR [\fIGENERAL OPTIONS\fR] \fBload\fR [\fB--force\fR] [\fB--input-path\fR=\fIPATH\fR]
[\fB--override-url\fR=\fIURL\fR] [\fB--all\fR | \fISESSION\fR [\fB--override-name\fR=\fINAME\fR]]
.fi
.SH "DESCRIPTION"
.sp
The \fBlttng load\fR command loads the configurations of one or more recording sessions from files\&.
.sp
See \fBlttng-concepts\fR(7) to learn more about recording sessions\&.
.sp
Use the \fBload\fR command in conjunction with the \fBlttng-save\fR(1) command to save and restore the complete configurations of recording sessions\&. A recording session configuration includes the enabled channels and recording event rules, the context fields to be recorded, the recording activity, and more\&.
.sp
Once LTTng loads one or more recording session configurations, they appear exactly as they were saved from the user\(cqs point of view\&.
.sp
LTTng searches the following directories, non\-recursively, in this order for recording session configuration files:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
\fB$LTTNG_HOME/.lttng/sessions\fR
(\fB$LTTNG_HOME\fR
defaults to
\fB$HOME\fR)
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
\fB/etc/lttng/sessions\fR
.RE
.sp
Override the input path with the \fB--input-path\fR=\fIPATH\fR option\&. With this option, LTTng does NOT search the default directories above\&. \fIPATH\fR can be the path of one of:
.PP
A directory
.RS 4
.PP
With the \fISESSION\fR argument
.RS 4
LTTng searches for the recording session configuration named
\fISESSION\fR
in all the files of the directory
\fIPATH\fR
and loads it if found\&.
.RE
.PP
Without the \fISESSION\fR argument
.RS 4
The
\fB--all\fR
option is implicit: LTTng loads all the recording session configurations found in all the files in the directory
\fIPATH\fR\&.
.RE
.RE
.PP
A file
.RS 4
.PP
With the \fISESSION\fR argument
.RS 4
LTTng searches for the recording session configuration named
\fISESSION\fR
in the file
\fIPATH\fR
and loads it if found\&.
.RE
.PP
Without the \fISESSION\fR argument
.RS 4
The
\fB--all\fR
option is implicit: LTTng loads all the recording session configurations found in the file
\fIPATH\fR\&.
.RE
.RE
.sp
Override the output URL of the loaded recording session configurations with the \fB--override-url\fR option\&.
.sp
With the \fISESSION\fR argument, override the name of the loaded recording session configuration with the \fB--override-name\fR option\&.
.sp
By default, the \fBload\fR command does NOT overwrite existing recording sessions: the command fails\&. Allow the \fBload\fR command to overwrite existing recording sessions with the \fB--force\fR option\&.
.sp
See the \(lqEXAMPLES\(rq section below for usage examples\&.
.SH "OPTIONS"
.sp
See \fBlttng\fR(1) for \fIGENERAL OPTIONS\fR\&.
.PP
\fB-a\fR, \fB--all\fR
.RS 4
Load all the recording session configurations (default)\&.
.RE
.PP
\fB-f\fR, \fB--force\fR
.RS 4
Overwrite existing recording sessions when loading\&.
.RE
.PP
\fB-i\fR \fIPATH\fR, \fB--input-path\fR=\fIPATH\fR
.RS 4
Load recording session configurations from
\fIPATH\fR, either a directory or a file, instead of loading them from the default search directories\&.
.RE
.PP
\fB--override-name\fR=\fINAME\fR
.RS 4
Override the name of the loaded recording session configuration,
\fISESSION\fR, with
\fINAME\fR\&.
.RE
.PP
\fB--override-url\fR=\fIURL\fR
.RS 4
Override the output URL of the loaded recording session configurations with
\fIURL\fR\&.
.sp
This is the equivalent of the
\fB--set-url\fR
option of
\fBlttng-create\fR(1)\&. The validity of the URL override depends on the type of recording session configurations to load\&. This option applies to
\fIall\fR
the loaded recording session configurations\&.
.RE
.SS "Program information"
.PP
\fB-h\fR, \fB--help\fR
.RS 4
Show help\&.
.sp
This option attempts to launch
\fB/usr/bin/man\fR
to view this manual page\&. Override the manual pager path with the
\fBLTTNG_MAN_BIN_PATH\fR
environment variable\&.
.RE
.PP
\fB--list-options\fR
.RS 4
List available command options and quit\&.
.RE
.SH "EXIT STATUS"
.PP
\fB0\fR
.RS 4
Success
.RE
.PP
\fB1\fR
.RS 4
Command error
.RE
.PP
\fB2\fR
.RS 4
Undefined command
.RE
.PP
\fB3\fR
.RS 4
Fatal error
.RE
.PP
\fB4\fR
.RS 4
Command warning (something went wrong during the command)
.RE
.SH "ENVIRONMENT"
.PP
\fBLTTNG_ABORT_ON_ERROR\fR
.RS 4
Set to
\fB1\fR
to abort the process after the first error is encountered\&.
.RE
.PP
\fBLTTNG_HOME\fR
.RS 4
Path to the LTTng home directory\&.
.sp
Defaults to
\fB$HOME\fR\&.
.sp
Useful when the Unix user running the commands has a non\-writable home directory\&.
.RE
.PP
\fBLTTNG_MAN_BIN_PATH\fR
.RS 4
Absolute path to the manual pager to use to read the LTTng command\-line help (with
\fBlttng-help\fR(1)
or with the
\fB--help\fR
option) instead of
\fB/usr/bin/man\fR\&.
.RE
.PP
\fBLTTNG_SESSION_CONFIG_XSD_PATH\fR
.RS 4
Path to the directory containing the
\fBsession.xsd\fR
recording session configuration XML schema\&.
.RE
.PP
\fBLTTNG_SESSIOND_PATH\fR
.RS 4
Absolute path to the LTTng session daemon binary (see
\fBlttng-sessiond\fR(8)) to spawn from the
\fBlttng-create\fR(1)
command\&.
.sp
The
\fB--sessiond-path\fR
general option overrides this environment variable\&.
.RE
.SH "FILES"
.PP
\fB$LTTNG_HOME/.lttngrc\fR
.RS 4
Unix user\(cqs LTTng runtime configuration\&.
.sp
This is where LTTng stores the name of the Unix user\(cqs current recording session between executions of
\fBlttng\fR(1)\&.
\fBlttng-create\fR(1)
and
\fBlttng-set-session\fR(1)
set the current recording session\&.
.RE
.PP
\fB$LTTNG_HOME/lttng-traces\fR
.RS 4
Default output directory of LTTng traces in local and snapshot modes\&.
.sp
Override this path with the
\fB--output\fR
option of the
\fBlttng-create\fR(1)
command\&.
.RE
.PP
\fB$LTTNG_HOME/.lttng\fR
.RS 4
Unix user\(cqs LTTng runtime and configuration directory\&.
.RE
.PP
\fB$LTTNG_HOME/.lttng/sessions\fR
.RS 4
Default directory containing the Unix user\(cqs saved recording session configurations (see
\fBlttng-save\fR(1)
and
\fBlttng-load\fR(1))\&.
.RE
.PP
\fB/etc/lttng/sessions\fR
.RS 4
Directory containing the system\-wide saved recording session configurations (see
\fBlttng-save\fR(1)
and
\fBlttng-load\fR(1))\&.
.RE
.if n \{\
.sp
.\}
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.RS 4
.sp
\fB$LTTNG_HOME\fR defaults to the value of the \fBHOME\fR environment variable\&.
.sp .5v
.RE
.SH "EXAMPLES"
.PP
\fBExample\ \&1.\ \&Load all the recording session configurations from the default search directories\&.\fR
.RS 4
.sp
.if n \{\
.RS 4
.\}
.nf
$ lttng load
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample\ \&2.\ \&Load all the recording session configurations from a specific directory\&.\fR
.RS 4
.sp
See the \fB--input-path\fR option\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ lttng load \-\-input\-path=/path/to/sessions
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample\ \&3.\ \&Load a specific recording session configuration from the default search directories\&.\fR
.RS 4
.sp
.if n \{\
.RS 4
.\}
.nf
$ lttng load my\-session
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample\ \&4.\ \&Allow LTTng to overwrite existing recording sessions when loading\&.\fR
.RS 4
.sp
See the \fB--force\fR option\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ lttng load \-\-force
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBExample\ \&5.\ \&Load a specific recording session configuration from a specific file, overriding its name\&.\fR
.RS 4
.sp
See the \fB--input-path\fR and \fB--override-name\fR options\&.
.sp
.if n \{\
.RS 4
.\}
.nf
$ lttng load my\-session \-\-input\-path=/path/to/sessions\&.lttng \e
\-\-override\-name=new\-test
.fi
.if n \{\
.RE
.\}
.RE
.SH "RESOURCES"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
LTTng project website
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
LTTng documentation
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
LTTng bug tracker
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Git repositories
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
GitHub organization
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Continuous integration
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Mailing list
for support and development:
\fBlttng-dev@lists.lttng.org\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
IRC channel :
\fB#lttng\fR
on
\fBirc.oftc.net\fR
.RE
.SH "COPYRIGHT"
.sp
This program is part of the LTTng\-tools project\&.
.sp
LTTng\-tools is distributed under the GNU General Public License version\ \&2 \&. See the \fBLICENSE\fR file for details\&.
.SH "THANKS"
.sp
Special thanks to Michel Dagenais and the DORSAL laboratory at \('Ecole Polytechnique de Montr\('eal for the LTTng journey\&.
.sp
Also thanks to the Ericsson teams working on tracing which helped us greatly with detailed bug reports and unusual test cases\&.
.SH "SEE ALSO"
.sp
\fBlttng\fR(1), \fBlttng-save\fR(1), \fBlttng-concepts\fR(7)