From: Philippe Proulx Date: Fri, 4 Sep 2015 22:55:46 +0000 (-0400) Subject: Document persistent memory file system tracing X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=2a621b76cf687ad7aee671d66676e97e2fb55b2f;p=lttng-docs.git Document persistent memory file system tracing Signed-off-by: Philippe Proulx --- diff --git a/contents/using-lttng/controlling-tracing/persistent-memory-file-systems.md b/contents/using-lttng/controlling-tracing/persistent-memory-file-systems.md new file mode 100644 index 0000000..8edc13c --- /dev/null +++ b/contents/using-lttng/controlling-tracing/persistent-memory-file-systems.md @@ -0,0 +1,49 @@ +--- +id: persistent-memory-file-systems +since: 2.7 +--- + +Non-volatile random-access memory +(NVRAM) is random-access memory that retains its information when power is turned off (non-volatile). +Systems with such memory can store data structures in RAM +and retrieve them after a reboot, without flushing to typical _storage_. + +Linux supports NVRAM file systems thanks to either +PRAMFS or +DAX + pmem +(requires Linux 4.1+). + +This documentation does not describe how to operate such file systems; +it is assumed that you have a working persistent memory file system. + +When creating an LTTng tracing session, you can use the `--shm-path` +option to specify the path of the shared memory holding the ring +buffers. Specifying a location on an NVRAM file system makes it possible +to retrieve the latest recorded trace data when the system reboots +after a crash. + +Example: + +
+lttng create --shm-path /path/to/shm
+
+ +The binary layout of the ring buffer files is not exactly the same as +the trace files layout. To view the events of ring buffer files after +a system crash, use the `lttng-crash` utility: + +
+lttng-crash /path/to/shm
+
+ +This extracts the trace data behind the scenes and runs +babeltrace +to view the events. To extract the trace data to an LTTng trace without +viewing the events, use the `--extract` option: + +
+lttng-crash --extract /path/to/trace /path/to/shm
+
+ +See the lttng-crash man page +for the complete list of options. diff --git a/toc/docs.yml b/toc/docs.yml index 291cc97..59c0b7c 100644 --- a/toc/docs.yml +++ b/toc/docs.yml @@ -206,6 +206,8 @@ cats: title: Taking a snapshot - id: mi title: Machine interface + - id: persistent-memory-file-systems + title: Recording trace data on persistent memory file systems - id: reference title: Reference cats: