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