File: live-reading-howto.txt

package info (click to toggle)
ltt-control 2.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,860 kB
  • sloc: cpp: 192,012; sh: 28,777; ansic: 10,960; python: 7,108; makefile: 3,520; java: 109; xml: 46
file content (37 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
LTTng Live trace reading how-to

Julien Desfossez
September 27th, 2013

This document presents a summary on how to use the live trace reading feature
introduced in LTTng 2.4. For the details about the protocol, please refer to
the live-reading-protocol.txt document.

Live trace reading refers to the feature of reading the trace while it is being
recorded. In order to do that, the trace must be streamed a relay even if the
viewer is running on the same machine as the tracer.

So, the first thing to do is to start a lttng-relayd process. It can be
anywhere on the network (including localhost) as long as the sessiond/consumerd
and the viewer can communicate with it over TCP/IP.

$ lttng-relayd -d

Then, we can create a session configured for streaming with the new --live
parameter.

$ lttng create --live 1000000 -U net://localhost

The --live parameter activates a session-wide timer (usec) that is responsible
for checking at a user-defined rate if new data is available. If there is new
data, it is flushed automatically, otherwise a beacon is sent to the relayd to
inform it that the stream is currently empty and the viewer can ignore this
stream up to a certain point in time.

Once the session is created, the user can activate events as usual.

In order to view the live trace, the viewer must implement the live-reading
protocol. As of now, Babeltrace[1] and LTTngTop[2] implement the protocol.

[1] https://git.efficios.com/babeltrace.git
[2] https://git.lttng.org/lttngtop.git