File: live-reading-howto.txt

package info (click to toggle)
ltt-control 2.13.15-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 17,656 kB
  • sloc: ansic: 167,287; sh: 27,018; makefile: 2,828; python: 1,380; yacc: 692; lex: 129; java: 109; perl: 99; cpp: 35; xml: 23
file content (37 lines) | stat: -rw-r--r-- 1,492 bytes parent folder | download | duplicates (6)
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] git://git.efficios.com/babeltrace.git
[2] git://git.lttng.org/lttngtop.git