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

NAME

6       lttng-save - Save LTTng recording session configurations
7

SYNOPSIS

9       lttng [GENERAL OPTIONS] save [--force] [--output-path=DIR]
10             [--all | SESSION]
11

DESCRIPTION

13       The lttng save command saves to files the configurations of:
14
15       With the SESSION argument
16           The recording session named SESSION.
17
18       Without the SESSION argument
19           Implicit --all option: all the recording sessions of the connected
20           session daemon for your Unix user, or for all users if your Unix
21           user is root, as listed in the output of lttng list (see lttng-
22           list(1)).
23
24           See the “Session daemon connection” section of lttng(1) to learn
25           how a user application connects to a session daemon.
26
27       See lttng-concepts(7) to learn more about recording sessions.
28
29       Use the save command in conjunction with the lttng-load(1) command to
30       save and restore the complete configurations of recording sessions.
31
32       The save command does NOT save tracing data, only the recording session
33       parameters, including the channel and recording event rule
34       configurations.
35
36       The default output directory path is $LTTNG_HOME/.lttng/sessions
37       ($LTTNG_HOME defaults to $HOME). Override the default output directory
38       path with the --output-path option. Each recording session
39       configuration file is named SNAME.lttng, where SNAME is the original
40       recording session name.
41
42       By default, the save command does NOT overwrite existing recording
43       session configuration files: the command fails. Allow the save command
44       to overwrite existing recording session configuration files with the
45       --force option.
46
47       See the “EXAMPLES” section below for usage examples.
48

OPTIONS

50       See lttng(1) for GENERAL OPTIONS.
51
52       -a, --all
53           Save all the recording session configurations of your Unix user, or
54           of all users if your Unix user is root, as listed in the output of
55           lttng-list(1), instead of the current recording session or the
56           recording session named SESSION.
57
58       -f, --force
59           Overwrite existing recording session configuration files when
60           saving.
61
62       -o DIR, --output-path=DIR
63           Save recording session configuration files to the directory DIR
64           instead of $LTTNG_HOME/.lttng/sessions ($LTTNG_HOME defaults to
65           $HOME).
66
67   Program information
68       -h, --help
69           Show help.
70
71           This option attempts to launch /usr/bin/man to view this manual
72           page. Override the manual pager path with the LTTNG_MAN_BIN_PATH
73           environment variable.
74
75       --list-options
76           List available command options and quit.
77

EXIT STATUS

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

ENVIRONMENT

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

FILES

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

EXAMPLES

152       Example 1. Save all the recording session configurations to the default
153       output directory.
154
155               $ lttng save
156
157       Example 2. Save a specific recording session configuration to a
158       specific output directory.
159
160           See the --output-path option.
161
162               $ lttng save my-session --output-path=/path/to/sessions
163
164       Example 3. Allow LTTng to overwrite existing recording session
165       configuration files when saving.
166
167           See the --force option.
168
169               $ lttng save --force
170

RESOURCES

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

THANKS

198       Special thanks to Michel Dagenais and the DORSAL laboratory
199       <http://www.dorsal.polymtl.ca/> at École Polytechnique de Montréal for
200       the LTTng journey.
201
202       Also thanks to the Ericsson teams working on tracing which helped us
203       greatly with detailed bug reports and unusual test cases.
204

SEE ALSO

206       lttng(1), lttng-load(1), lttng-concepts(7)
207
208
209
210LTTng 2.13.9                     14 June 2021                    LTTNG-SAVE(1)
Impressum