<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello<br>
<br>
I've tried the snapshot feature as described below by Mathieu. I
noticed that the commands "lttng list" and "lttng list
<session>" don't print anything for the trace path. I
understand that command "lttng snapshot list-output" would provide
detailed information about all added output locations. I'm wondering
if it would be useful to print the default output location (which is
created by lttng create --snapshot) in the trace path when using
"lttng list" or "lttng list <session>" for snapshot sessions?
Any plans to add that?<br>
<div class="moz-forward-container"><br>
Best Regards<br>
Bernd<br>
<div dir="ltr">
<div><br>
<div class="gmail_quote">---------- Forwarded message
----------<br>
From: <b class="gmail_sendername">Mathieu Desnoyers</b> <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>></span><br>
Date: Sun, Jul 21, 2013 at 2:27 PM<br>
Subject: [lttng-dev] LTTng snapshot howto<br>
To: <a moz-do-not-send="true"
href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a><br>
<br>
<br>
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>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Mathieu Desnoyers<br>
EfficiOS Inc.<br>
<a moz-do-not-send="true" href="http://www.efficios.com"
target="_blank">http://www.efficios.com</a><br>
<br>
_______________________________________________<br>
lttng-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a><br>
<a moz-do-not-send="true"
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>
</font></span></div>
<br>
</div>
</div>
<br>
</div>
<br>
</body>
</html>