2 id: saving-loading-tracing-session
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.
15 To save a given tracing session configuration, do:
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.
25 All configuration parameters are saved:
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)
34 To load a tracing session, simply do:
40 or, if you used a custom path:
43 lttng load --input-path /path/to/my-session.lttng
46 Your saved tracing session is restored as if you just configured