Docs: relayd: document LTTNG_RELAYD_WORKING_DIRECTORY env variable
[lttng-tools.git] / doc / man / lttng-relayd.8.txt
CommitLineData
f5595c32
PP
1lttng-relayd(8)
2===============
4605890e 3:revdate: 5 June 2018
f5595c32
PP
4
5
6NAME
7----
8lttng-relayd - LTTng 2 relay daemon
9
10
11SYNOPSIS
12--------
13[verse]
14*lttng-relayd* [option:--background | option:--daemonize]
15 [option:--control-port='URL'] [option:--data-port='URL'] [option:--live-port='URL']
16 [option:--output='PATH'] [option:-v | option:-vv | option:-vvv]
6ab3f69a 17 [option:--working-directory='PATH']
f5595c32
PP
18
19
20DESCRIPTION
21-----------
a18d9544 22The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
f5595c32
PP
23source software package used for correlated tracing of the Linux kernel,
24user applications, and user libraries.
25
26LTTng consists of Linux kernel modules (for Linux kernel tracing) and
27dynamically loaded libraries (for user application and library tracing).
28
29The _LTTng relay daemon_ is responsible for receiving trace data from
30possibly remote LTTng session/consumer daemons and for writing it to
31the local file system. The relay daemon also accepts _LTTng live_
32connections from compatible viewers; this is the official approach to
33viewing LTTng events as they are emitted.
34
35The relay daemon listens by default on all network interfaces to gather
36trace data, but only on localhost for LTTng live connections.
37
38The relay daemon does not require any particular permissions, as long as
39it can write to the output directory and listen on the configured ports.
40If a user is within a secured network and/or has proper firewall
41settings, `lttng-relayd` can listen to LTTng live connections from _all_
c93eadad
PP
42network interfaces by specifying
43+--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
f5595c32
PP
44
45Once a trace has been streamed completely, the trace can be processed by
46any tool that can process an LTTng trace located on the local
47file system.
48
49
50[[output-directory]]
51Output directory
52~~~~~~~~~~~~~~~~
53By default, the relay daemon writes the traces to:
54
55[verse]
2ff6d569 56$LTTNG_HOME/lttng-traces/'HOSTNAME'/'SESSION'/'DOMAIN'
f5595c32
PP
57
58with:
59
60'HOSTNAME'::
61 Remote hostname.
62
63'SESSION'::
64 Full session name.
65
66'DOMAIN'::
67 Tracing domain.
68
69You can override the default output directory prefix
2ff6d569 70(`$LTTNG_HOME/lttng-traces`) with the option:--output option. The other
f5595c32
PP
71parts depend on the remote configuration.
72
73
74[[url-format]]
75URL format
76~~~~~~~~~~
77The option:--control-port, option:--data-port, and option:--live-port
78options specify URLs.
79
80The format of those URLs is:
81
82[verse]
83tcp://('HOST' | 'IPADDR'):__PORT__
84
85with:
86
87('HOST' | 'IPADDR')::
88 Binding hostname or IP address (IPv6 address *must* be enclosed in
89 brackets (`[` and `]`); see
90 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
91
92'PORT'::
93 TCP port.
94
95
96OPTIONS
97-------
98Daemon
99~~~~~~
100option:-b, option:--background::
101 Start as Unix daemon, but keep file descriptors (console) open.
102 Use the option:--daemonize option instead to close the file
103 descriptors.
104
105option:-d, option:--daemonize::
106 Start as Unix daemon, and close file descriptors (console). Use the
107 option:--background option instead to keep the file descriptors
108 open.
109
59b19c3c 110option:-g 'GROUP', option:--group='GROUP'::
f5595c32
PP
111 Use 'GROUP' as Unix tracing group (default: `tracing`).
112
59b19c3c 113option:-o 'PATH', option:--output='PATH'::
f5595c32
PP
114 Set base directory of written trace data to 'PATH'.
115+
116See the <<output-directory,Output directory>> section above for more
117information.
118
6ab3f69a
JR
119option:-w 'PATH', option:--working-directory='PATH'::
120 Set the working directory of the processes this relay daemon creates.
121
f5595c32
PP
122option:-v, option:--verbose::
123 Increase verbosity.
124+
125Three levels of verbosity are available, which are triggered by
126appending additional `v` letters to the option
127(that is, `-vv` and `-vvv`).
128
129
130Ports
131~~~~~
132See the <<url-format,URL format>> section above for more information
133about the syntax of the following options' 'URL' argument.
134
59b19c3c 135option:-C 'URL', option:--control-port='URL'::
c93eadad
PP
136 Listen to control data on URL 'URL' (default:
137 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
f5595c32 138
59b19c3c 139option:-D 'URL', option:--data-port='URL'::
c93eadad
PP
140 Listen to trace data on URL 'URL' (default:
141 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
f5595c32 142
59b19c3c 143option:-L 'URL', option:--live-port='URL'::
f5595c32 144 Listen to LTTng live connections on URL 'URL'
c93eadad
PP
145 (default:
146 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
f5595c32
PP
147
148
149Program information
150~~~~~~~~~~~~~~~~~~~
151option:-h, option:--help::
152 Show help.
153
154option:-V, option:--version::
155 Show version.
156
157
158ENVIRONMENT VARIABLES
159---------------------
9bbd8e06
MD
160`LTTNG_ABORT_ON_ERROR`::
161 Set to 1 to abort the process after the first error is encountered.
162
f5595c32
PP
163`LTTNG_NETWORK_SOCKET_TIMEOUT`::
164 Socket connection, receive and send timeout (milliseconds). A value
165 of 0 or -1 uses the timeout of the operating system (default).
166
167`LTTNG_RELAYD_HEALTH`::
168 Path to relay daemon health's socket.
169
e0512bf5
JR
170`LTTNG_RELAYD_TCP_KEEP_ALIVE`::
171 Set to 1 to enable TCP keep-alive.
172+
173The TCP keep-alive mechanism allows the detection of dead peers
174(man:lttng-sessiond(8)) in cases of unclean termination
175(for example, a hard reset) of a peer.
176+
177Supported on Linux and Solaris only. The default behaviour of the TCP
178keep-alive mechanism is OS-specific.
179+
180Search for `tcp_keepalive` in man:tcp(7) for more information.
181
182`LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
183 The time threshold in seconds to abort a TCP connection after the keep-alive
184 probing mechanism has failed.
185+
186Set to 0 or -1 to use the value chosen by the operating system (default).
187+
188Supported on Solaris 11 only.
189+
190Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
191
192`LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
193 Number of seconds a connection needs to be idle before TCP begins
194 sending out keep-alive probes.
195+
196Set to 0 or -1 to use the value chosen by the operating system (default).
197+
198Supported on Linux and Solaris 11 only.
199+
200On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
201+
202Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
203in man:tcp(7) on Solaris 11 for more information.
204
205`LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
206 Maximum number of TCP keep-alive probes to send before giving up and
207 killing the connection if no response is obtained from the other end.
208+
209Set to 0 or -1 to use the value chosen by the operating system (default).
210+
211Supported on Linux only.
212+
213Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
214
215`LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
216 Number of seconds between TCP keep-alive probes.
217+
218Set to 0 or -1 to use the value chosen by the operating system (default).
219+
220Supported on Linux only.
221+
222Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
223
508a802c
JR
224`LTTNG_RELAYD_WORKING_DIRECTORY`::
225 Working directory of the processes this relay daemon creates.
226+
227The option:--working-directory option overrides this variable.
228
f5595c32 229
900690ca
PP
230FILES
231-----
232`$LTTNG_HOME/.lttng`::
233 User LTTng runtime and configuration directory.
234
235`$LTTNG_HOME/lttng-traces`::
236 Default output directory of LTTng traces. This can be overridden
237 with the option:--output option.
238
239NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
240
241
f5595c32
PP
242EXIT STATUS
243-----------
244*0*::
245 Success
246
247*1*::
248 Error
249
250*3*::
251 Fatal error
252
253
254LIMITATIONS
255-----------
256As of this version, only the TCP protocol is supported for both control
257and data ports. In future versions, TCP will remain the sole available
258protocol for control data since those communications are low-volume and
259need absolute reliability; trace data could be carried over UDP.
260
261For an unprivileged user running `lttng-relayd`, the maximum number of
262file descriptors per process is usually 1024. This limits the number of
263connections and opened trace files. This limit can be configured with
264*ulimit*(3).
265
266
267include::common-footer.txt[]
268
269
270SEE ALSO
271--------
7c1a4458
PP
272man:lttng(1),
273man:lttng-sessiond(8),
274man:lttng-crash(1),
275man:lttng-ust(3),
276man:babeltrace(1)
This page took 0.046872 seconds and 5 git commands to generate.