trigger: implement trigger naming
[lttng-tools.git] / doc / snapshot-howto.txt
CommitLineData
fe857006
MD
1LTTng Flight Recorder Snapshot HOWTO
2
3Mathieu Desnoyers
4July 21st, 2013
5
6This document presents how to use the snapshot feature of LTTng.
7
8Snapshots allow to grab the content of flight recorder tracing buffers
9at the time the snapshot record command is invoked. Flight recorder
10tracing gather trace data in memory, overwriting the oldest information,
11without requiring any disk I/O. The snapshot record command exports the
12snapshot to the destination specified by the user.
13
14Basic usage:
15
16Session daemon started as root for kernel tracing:
17
18# lttng-sessiond -d
19
20From a user part of the tracing group (for kernel tracing):
21
22$ lttng create --snapshot
23$ lttng enable-event -k -a # enable kernel tracing
24$ lttng enable-event -u -a # enable user-space tracing
25$ lttng start
26
27 [ do something, generate activity on the system ]
28
29$ lttng snapshot record
30
31 [ do more stuff... ]
32
33$ lttng snapshot record
34
35$ lttng stop
36$ lttng destroy
37
38Each "lttng snapshot" command records a snapshot of the current buffer
39state. "lttng enable --snapshot" automatically setups the buffers in
40overwrite mode for flight recording, and does not attach any output file
41to the trace. The "lttng snapshot record" command can be performed
42either while tracing is started or stopped.
43
44As an example, this generates the following hierarchy under the
45directory reported by the "create" command above:
46
47.
48├── snapshot-1-20130721-141838-0
49│   ├── kernel
50│   │   ├── channel0_0
51│   │   ├── channel0_1
52│   │   ├── channel0_2
53│   │   ├── channel0_3
54│   │   └── metadata
55│   └── ust
56│   └── uid
57│   └── 1000
58│   └── 64-bit
59│   ├── channel0_0
60│   ├── channel0_1
61│   ├── channel0_2
62│   ├── channel0_3
63│   └── metadata
64└── snapshot-1-20130721-141842-1
65 ├── kernel
66 │   ├── channel0_0
67 │   ├── channel0_1
68 │   ├── channel0_2
69 │   ├── channel0_3
70 │   └── metadata
71 └── ust
72 └── uid
73 └── 1000
74 └── 64-bit
75 ├── channel0_0
76 ├── channel0_1
77 ├── channel0_2
78 ├── channel0_3
79 └── metadata
80
81
26726f8a 82Then, running babeltrace on, e.g.
fe857006
MD
83
84babeltrace snapshot-1-20130721-141838-0
85
86shows the content of the first snapshot.
87
88Please refer to the lttng(1) manpage for details on the snapshot mode.
This page took 0.054031 seconds and 4 git commands to generate.