Document persistent memory file system tracing
[lttng-docs.git] / contents / using-lttng / controlling-tracing / persistent-memory-file-systems.md
1 ---
2 id: persistent-memory-file-systems
3 since: 2.7
4 ---
5
6 <a href="https://en.wikipedia.org/wiki/Non-volatile_random-access_memory" class="ext">Non-volatile random-access memory</a>
7 (NVRAM) is random-access memory that retains its information when power is turned off (non-volatile).
8 Systems with such memory can store data structures in RAM
9 and retrieve them after a reboot, without flushing to typical _storage_.
10
11 Linux supports NVRAM file systems thanks to either
12 <a href="http://pramfs.sourceforge.net/" class="ext">PRAMFS</a> or
13 <a href="https://www.kernel.org/doc/Documentation/filesystems/dax.txt" class="ext">DAX</a>&nbsp;+&nbsp;<a href="http://lkml.iu.edu/hypermail/linux/kernel/1504.1/03463.html" class="ext">pmem</a>
14 (requires Linux 4.1+).
15
16 This documentation does not describe how to operate such file systems;
17 it is assumed that you have a working persistent memory file system.
18
19 When creating an LTTng tracing session, you can use the `--shm-path`
20 option to specify the path of the shared memory holding the ring
21 buffers. Specifying a location on an NVRAM file system makes it possible
22 to retrieve the latest recorded trace data when the system reboots
23 after a crash.
24
25 Example:
26
27 <pre class="term">
28 lttng create <strong>--shm-path /path/to/shm</strong>
29 </pre>
30
31 The binary layout of the ring buffer files is not exactly the same as
32 the trace files layout. To view the events of ring buffer files after
33 a system crash, use the `lttng-crash` utility:
34
35 <pre class="term">
36 lttng-crash /path/to/shm
37 </pre>
38
39 This extracts the trace data behind the scenes and runs
40 <a href="http://diamon.org/babeltrace" class="ext"><code>babeltrace</code></a>
41 to view the events. To extract the trace data to an LTTng trace without
42 viewing the events, use the `--extract` option:
43
44 <pre class="term">
45 lttng-crash <strong>--extract /path/to/trace</strong> /path/to/shm
46 </pre>
47
48 See the <a href="http://localhost:9000/man/1/lttng-crash" class="ext"><code>lttng-crash</code> man page</a>
49 for the complete list of options.
This page took 0.03687 seconds and 4 git commands to generate.