Remove unneeded "will"s + minor fixes
[lttng-docs.git] / contents / using-lttng / controlling-tracing / saving-loading-tracing-session.md
CommitLineData
5e0cbfb0
PP
1---
2id: saving-loading-tracing-session
3---
4
5Configuring a tracing session may be long: creating and enabling
6channels with specific parameters, enabling kernel and user space
7domain events with specific log levels and filters, adding context
8to some channels, etc. If you're going to use LTTng to solve real
9world problems, chances are you're going to have to record events using
10the same tracing session setup over and over, modifying a few variables
11each time in your instrumented program or environment. To avoid
12constant tracing session reconfiguration, the `lttng` tool is able to
13save and load tracing session configurations to/from XML files.
14
15To save a given tracing session configuration, do:
16
17<pre class="term">
18lttng save my-session
19</pre>
20
21where `my-session` is the name of the tracing session to save. Tracing
22session configurations are saved to `~/.lttng/sessions` by default;
23use the `--output-path` option to change this destination directory.
24
25All configuration parameters are saved:
26
27 * tracing session name
28 * trace data output path
29 * channels with their state and all their parameters
30 * context information added to channels
31 * events with their state, log level and filter
32 * tracing activity (started or stopped)
33
34To load a tracing session, simply do:
35
36<pre class="term">
37lttng load my-session
38</pre>
39
40or, if you used a custom path:
41
42<pre class="term">
43lttng load --input-path /path/to/my-session.lttng
44</pre>
45
47bfcb75 46Your saved tracing session is restored as if you just configured
5e0cbfb0 47it manually.
This page took 0.024183 seconds and 4 git commands to generate.