<p dir="ltr">A question about the snapshot: is there a way to trigger a new state dump? </p>
<div class="gmail_quote">Le 2013-07-21 14:29, "Mathieu Desnoyers" <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I just pushed a LTTng snapshot howto (new feature of lttng 2.3-rc). I'm<br>
posting it to lttng-dev, since it provides a quick insight on how to use<br>
the snapshot feature. Comments are welcome!<br>
<br>
Thanks,<br>
<br>
Mathieu<br>
<br>
<br>
LTTng Flight Recorder Snapshot HOWTO<br>
<br>
Mathieu Desnoyers<br>
July 21st, 2013<br>
<br>
This document presents how to use the snapshot feature of LTTng.<br>
<br>
Snapshots allow to grab the content of flight recorder tracing buffers<br>
at the time the snapshot record command is invoked. Flight recorder<br>
tracing gather trace data in memory, overwriting the oldest information,<br>
without requiring any disk I/O. The snapshot record command exports the<br>
snapshot to the destination specified by the user.<br>
<br>
Basic usage:<br>
<br>
Session daemon started as root for kernel tracing:<br>
<br>
# lttng-sessiond -d<br>
<br>
>From a user part of the tracing group (for kernel tracing):<br>
<br>
$ lttng create --snapshot<br>
$ lttng enable-event -k -a      # enable kernel tracing<br>
$ lttng enable-event -u -a      # enable user-space tracing<br>
$ lttng start<br>
<br>
    [ do something, generate activity on the system ]<br>
<br>
$ lttng snapshot record<br>
<br>
    [ do more stuff... ]<br>
<br>
$ lttng snapshot record<br>
<br>
$ lttng stop<br>
$ lttng destroy<br>
<br>
Each "lttng snapshot" command records a snapshot of the current buffer<br>
state. "lttng enable --snapshot" automatically setups the buffers in<br>
overwrite mode for flight recording, and does not attach any output file<br>
to the trace. The "lttng snapshot record" command can be performed<br>
either while tracing is started or stopped.<br>
<br>
As an example, this generates the following hierarchy under the<br>
directory reported by the "create" command above:<br>
<br>
.<br>
├── snapshot-1-20130721-141838-0<br>
│   ├── kernel<br>
│   │   ├── channel0_0<br>
│   │   ├── channel0_1<br>
│   │   ├── channel0_2<br>
│   │   ├── channel0_3<br>
│   │   └── metadata<br>
│   └── ust<br>
│       └── uid<br>
│           └── 1000<br>
│               └── 64-bit<br>
│                   ├── channel0_0<br>
│                   ├── channel0_1<br>
│                   ├── channel0_2<br>
│                   ├── channel0_3<br>
│                   └── metadata<br>
└── snapshot-1-20130721-141842-1<br>
    ├── kernel<br>
    │   ├── channel0_0<br>
    │   ├── channel0_1<br>
    │   ├── channel0_2<br>
    │   ├── channel0_3<br>
    │   └── metadata<br>
    └── ust<br>
        └── uid<br>
            └── 1000<br>
                └── 64-bit<br>
                    ├── channel0_0<br>
                    ├── channel0_1<br>
                    ├── channel0_2<br>
                    ├── channel0_3<br>
                    └── metadata<br>
<br>
<br>
Then, running babeltrace on, e.g.<br>
<br>
babeltrace snapshot-1-20130721-141838-0<br>
<br>
shows the content of the first snapshot.<br>
<br>
Please refer to the lttng(1) manpage for details on the snapshot mode.<br>
<br>
--<br>
Mathieu Desnoyers<br>
EfficiOS Inc.<br>
<a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a><br>
<a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</blockquote></div>