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