2 id: sending-trace-data-over-the-network
5 The possibility of sending trace data over the network comes as a
6 built-in feature of LTTng-tools. For this to be possible, an LTTng
7 _relay daemon_ must be executed and listening on the machine where
8 trace data is to be received, and the user must create a tracing
9 session using appropriate options to forward trace data to the remote
12 The relay daemon listens on two different TCP ports: one for control
13 information and the other for actual trace data.
15 Starting the relay daemon on the remote machine is easy:
21 This makes it listen to its default ports: 5342 for control and
22 5343 for trace data. The `--control-port` and `--data-port` options may
23 be used to specify different ports.
25 Traces written by `lttng-relayd` are written to
26 <code>~/lttng-traces/<em>hostname</em>/<em>session</em></code> by
27 default, where <code><em>hostname</em></code> is the host name of the
28 traced (monitored) system and <code><em>session</em></code> is the
29 tracing session name. Use the `--output` option to write trace data
30 outside `~/lttng-traces`.
32 On the sending side, a tracing session must be created using the
33 `lttng` tool with the `--set-url` option to connect to the distant
37 lttng create my-session --set-url net://distant-host
40 The URL format is described in the output of `lttng create --help`.
41 The above example uses the default ports; the `--ctrl-url` and
42 `--data-url` options may be used to set the control and data URLs
45 Once this basic setup is completed and the connection is established,
46 you may use the `lttng` tool on the target machine as usual; everything
47 you do is transparently forwarded to the remote machine if needed.
48 For example, a parameter changing the maximum size of trace files
49 only has an effect on the distant relay daemon actually writing