Initial import
[lttng-docs.git] / contents / using-lttng / controlling-tracing / sending-trace-data-over-the-network.md
CommitLineData
5e0cbfb0
PP
1---
2id: sending-trace-data-over-the-network
3---
4
5The possibility of sending trace data over the network comes as a
6built-in feature of LTTng-tools. For this to be possible, an LTTng
7_relay daemon_ must be executed and listening on the machine where
8trace data is to be received, and the user must create a tracing
9session using appropriate options to forward trace data to the remote
10relay daemon.
11
12The relay daemon listens on two different TCP ports: one for control
13information and the other for actual trace data.
14
15Starting the relay daemon on the remote machine is as easy as:
16
17<pre class="term">
18lttng-relayd
19</pre>
20
21This will make it listen to its default ports: 5342 for control and
225343 for trace data. The `--control-port` and `--data-port` options may
23be used to specify different ports.
24
25Traces written by `lttng-relayd` are written to
26<code>~/lttng-traces/<em>hostname</em>/<em>session</em></code> by
27default, where <code><em>hostname</em></code> is the host name of the
28traced (monitored) system and <code><em>session</em></code> is the
29tracing session name. Use the `--output` option to write trace data
30outside `~/lttng-traces`.
31
32On the sending side, a tracing session must be created using the
33`lttng` tool with the `--set-url` option to connect to the distant
34relay daemon:
35
36<pre class="term">
37lttng create my-session --set-url net://distant-host
38</pre>
39
40The URL format is described in the output of `lttng create --help`.
41The above example will use the default ports; the `--ctrl-url` and
42`--data-url` options may be used to set the control and data URLs
43individually.
44
45Once this basic setup is completed and the connection is established,
46you may use the `lttng` tool on the target machine as usual; everything
47you do will be transparently forwarded to the remote machine if needed.
48For example, a parameter changing the maximum size of trace files will
49have an effect on the distant relay daemon actually writing the trace.
This page took 0.023189 seconds and 4 git commands to generate.