1 LTTng Flight Recorder Snapshot HOWTO
6 This document presents how to use the snapshot feature of LTTng.
8 Snapshots allow to grab the content of flight recorder tracing buffers
9 at the time the snapshot record command is invoked. Flight recorder
10 tracing gather trace data in memory, overwriting the oldest information,
11 without requiring any disk I/O. The snapshot record command exports the
12 snapshot to the destination specified by the user.
16 Session daemon started as root for kernel tracing:
20 From a user part of the tracing group (for kernel tracing):
22 $ lttng create --snapshot
23 $ lttng enable-event -k -a # enable kernel tracing
24 $ lttng enable-event -u -a # enable user-space tracing
27 [ do something, generate activity on the system ]
29 $ lttng snapshot record
33 $ lttng snapshot record
38 Each "lttng snapshot" command records a snapshot of the current buffer
39 state. "lttng enable --snapshot" automatically setups the buffers in
40 overwrite mode for flight recording, and does not attach any output file
41 to the trace. The "lttng snapshot record" command can be performed
42 either while tracing is started or stopped.
44 As an example, this generates the following hierarchy under the
45 directory reported by the "create" command above:
48 ├── snapshot-1-20130721-141838-0
64 └── snapshot-1-20130721-141842-1
82 Then, running babeltrace on, e.g.
84 babeltrace snapshot-1-20130721-141838-0
86 shows the content of the first snapshot.
88 Please refer to the lttng(1) manpage for details on the snapshot mode.