add-trigger: rename --fire-* to --rate-policy=*:value
[lttng-tools.git] / doc / man / lttng-relayd.8.txt
... / ...
CommitLineData
1lttng-relayd(8)
2===============
3:revdate: 2 April 2020
4
5
6NAME
7----
8lttng-relayd - LTTng 2 relay daemon
9
10
11SYNOPSIS
12--------
13[verse]
14*lttng-relayd* [option:--background | option:--daemonize] [option:--config='PATH']
15 [option:--control-port='URL'] [option:--data-port='URL'] [option:--fd-pool-size='COUNT']
16 [option:--live-port='URL'] [option:--output='PATH']
17 [option:-v | option:-vv | option:-vvv] [option:--working-directory='PATH']
18 [option:--group-output-by-session] [option:--disallow-clear]
19
20
21DESCRIPTION
22-----------
23The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
24source software package used for correlated tracing of the Linux kernel,
25user applications, and user libraries.
26
27LTTng consists of Linux kernel modules (for Linux kernel tracing) and
28dynamically loaded libraries (for user application and library tracing).
29
30The _LTTng relay daemon_ is responsible for receiving trace data from
31possibly remote LTTng session/consumer daemons and for writing it to
32the local file system. The relay daemon also accepts _LTTng live_
33connections from compatible viewers; this is the official approach to
34viewing LTTng events as they are emitted.
35
36The relay daemon listens by default on all network interfaces to gather
37trace data, but only on localhost for LTTng live connections.
38
39The relay daemon does not require any particular permissions, as long as
40it can write to the output directory and listen on the configured ports.
41If a user is within a secured network and/or has proper firewall
42settings, `lttng-relayd` can listen to LTTng live connections from _all_
43network interfaces by specifying
44+--live-port=tcp://0.0.0.0:{default_network_viewer_port}+.
45
46Once a trace has been streamed completely, the trace can be processed by
47any tool that can process an LTTng trace located on the local
48file system.
49
50
51[[output-directory]]
52Output directory
53~~~~~~~~~~~~~~~~
54The relay daemon uses different output path patterns depending on:
55
56* Its configuration.
57* The connected peer's tracing session configuration.
58* The connected peer's LTTng session daemon (see man:lttng-sessiond(8))
59 version.
60
61Consider the following variables:
62
63'BASE'::
64 Base output directory: `$LTTNG_HOME/lttng-traces` or the
65 argument of the option:--output option.
66+
67NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
68
69'HOSTNAME'::
70 Peer's hostname.
71
72'SESSION'::
73 Tracing session name.
74
75'DATETIME'::
76 Unique tracing session date/time.
77
78'TRACEPATH'::
79 Custom trace path ('TRACEPATH' part of the man:lttng-create(1)
80 command's nloption:--set-url option's argument, if any).
81
82The relay daemon output path patterns are:
83
84Hostname grouping (without option:--group-output-by-session)::
85 Without a custom trace path:::
86+
87--
88[verse]
89'BASE'/'HOSTNAME'/'SESSION'-'DATETIME'
90--
91
92With a custom trace path:::
93+
94--
95[verse]
96'BASE'/'HOSTNAME'/'TRACEPATH'
97--
98
99Tracing session grouping (with option:--group-output-by-session)::
100 Without a custom trace path:::
101 The peer's LTTng session daemon version is at least 2.4::::
102+
103--
104[verse]
105'BASE'/'SESSION'/'HOSTNAME'-'DATETIME'
106--
107
108Otherwise::::
109 Defaults to the hostname grouping pattern:
110+
111--
112[verse]
113'BASE'/'HOSTNAME'/'SESSION'-'DATETIME'
114--
115
116With a custom trace path:::
117 The peer's LTTng session daemon version is at least 2.4::::
118+
119--
120[verse]
121'BASE'/'SESSION'/'HOSTNAME'-'DATETIME'/'TRACEPATH'
122--
123
124Otherwise::::
125 Defaults to the hostname grouping pattern:
126+
127--
128[verse]
129'BASE'/'HOSTNAME'/'TRACEPATH'
130--
131
132
133[[url-format]]
134URL format
135~~~~~~~~~~
136The option:--control-port, option:--data-port, and option:--live-port
137options specify URLs.
138
139The format of those URLs is:
140
141[verse]
142tcp://('HOST' | 'IPADDR'):__PORT__
143
144with:
145
146('HOST' | 'IPADDR')::
147 Binding hostname or IP address (IPv6 address *must* be enclosed in
148 brackets (`[` and `]`); see
149 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
150
151'PORT'::
152 TCP port.
153
154
155OPTIONS
156-------
157Daemon
158~~~~~~
159option:-b, option:--background::
160 Start as Unix daemon, but keep file descriptors (console) open.
161 Use the option:--daemonize option instead to close the file
162 descriptors.
163
164option:-f 'PATH', option:--config='PATH'::
165 Load relay daemon configuration from path 'PATH'.
166
167option:-d, option:--daemonize::
168 Start as Unix daemon, and close file descriptors (console). Use the
169 option:--background option instead to keep the file descriptors
170 open.
171
172option:-x, option:--disallow-clear::
173 Disallow clearing operations (see man:lttng-clear(1)).
174+
175See also the `LTTNG_RELAYD_DISALLOW_CLEAR` environment variable.
176
177option:--fd-pool-size='SIZE'::
178 Set the size of the file descriptor pool to 'SIZE'.
179+
180'SIZE' is the maximum number of file descriptors that may be kept opened
181simultaneously by the relay daemon.
182+
183Default: the soft `RLIMIT_NOFILE` resource limit of the process (see
184man:getrlimit(2)).
185
186option:-g 'GROUP', option:--group='GROUP'::
187 Use 'GROUP' as Unix tracing group (default: `tracing`).
188
189option:-w 'PATH', option:--working-directory='PATH'::
190 Set the working directory of the processes the relay daemon creates
191 to 'PATH'.
192+
193See also the `LTTNG_RELAYD_WORKING_DIRECTORY` environment variable.
194
195option:-v, option:--verbose::
196 Increase verbosity.
197+
198Three levels of verbosity are available, which are triggered by
199appending additional `v` letters to the option
200(that is, `-vv` and `-vvv`).
201
202
203Output
204~~~~~~
205See the <<output-directory,Output directory>> section above for more
206information.
207
208option:-p, option:--group-output-by-host::
209 Group the written trace directories by hostname (default).
210
211option:-s, option:--group-output-by-session::
212 Group the written trace directories by tracing session name instead
213 of by hostname.
214
215option:-o 'PATH', option:--output='PATH'::
216 Set the base output directory of the written trace directories to
217 'PATH'.
218
219
220Ports
221~~~~~
222See the <<url-format,URL format>> section above for more information
223about the syntax of the following 'URL' argument.
224
225option:-C 'URL', option:--control-port='URL'::
226 Listen to control data on URL 'URL' (default:
227 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
228
229option:-D 'URL', option:--data-port='URL'::
230 Listen to trace data on URL 'URL' (default:
231 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
232
233option:-L 'URL', option:--live-port='URL'::
234 Listen to LTTng live connections on URL 'URL'
235 (default:
236 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
237
238
239Program information
240~~~~~~~~~~~~~~~~~~~
241option:-h, option:--help::
242 Show help.
243
244option:-V, option:--version::
245 Show version.
246
247
248ENVIRONMENT VARIABLES
249---------------------
250`LTTNG_ABORT_ON_ERROR`::
251 Set to 1 to abort the process after the first error is encountered.
252
253`LTTNG_NETWORK_SOCKET_TIMEOUT`::
254 Socket connection, receive and send timeout (milliseconds). A value
255 of 0 or -1 uses the timeout of the operating system (default).
256
257`LTTNG_RELAYD_DISALLOW_CLEAR`::
258 Set to 1 to disallow clearing operations (see man:lttng-clear(1)).
259+
260The option:--disallow-clear option overrides this variable.
261
262`LTTNG_RELAYD_HEALTH`::
263 Path to relay daemon health's socket.
264
265`LTTNG_RELAYD_TCP_KEEP_ALIVE`::
266 Set to 1 to enable TCP keep-alive.
267+
268The TCP keep-alive mechanism allows the detection of dead peers
269(man:lttng-sessiond(8)) in cases of unclean termination
270(for example, a hard reset) of a peer.
271+
272Supported on Linux and Solaris only. The default behaviour of the TCP
273keep-alive mechanism is OS-specific.
274+
275Search for `tcp_keepalive` in man:tcp(7) for more information.
276
277`LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
278 The time threshold in seconds to abort a TCP connection after the keep-alive
279 probing mechanism has failed.
280+
281Set to 0 or -1 to use the value chosen by the operating system (default).
282+
283Supported on Solaris 11 only.
284+
285Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
286
287`LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
288 Number of seconds a connection needs to be idle before TCP begins
289 sending out keep-alive probes.
290+
291Set to 0 or -1 to use the value chosen by the operating system (default).
292+
293Supported on Linux and Solaris 11 only.
294+
295On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
296+
297Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
298in man:tcp(7) on Solaris 11 for more information.
299
300`LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
301 Maximum number of TCP keep-alive probes to send before giving up and
302 killing the connection if no response is obtained from the other end.
303+
304Set to 0 or -1 to use the value chosen by the operating system (default).
305+
306Supported on Linux only.
307+
308Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
309
310`LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
311 Number of seconds between TCP keep-alive probes.
312+
313Set to 0 or -1 to use the value chosen by the operating system (default).
314+
315Supported on Linux only.
316+
317Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
318
319`LTTNG_RELAYD_WORKING_DIRECTORY`::
320 Working directory of the processes the relay daemon creates.
321+
322The option:--working-directory option overrides this variable.
323
324
325FILES
326-----
327`$LTTNG_HOME/.lttng`::
328 User LTTng runtime and configuration directory.
329
330`$LTTNG_HOME/lttng-traces`::
331 Default base output directory of LTTng traces. This can be
332 overridden with the option:--output option.
333
334NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
335
336
337EXIT STATUS
338-----------
339*0*::
340 Success
341
342*1*::
343 Error
344
345*3*::
346 Fatal error
347
348
349LIMITATIONS
350-----------
351As of this version, only the TCP protocol is supported for both control
352and data ports. In future versions, TCP will remain the sole available
353protocol for control data since those communications are low-volume and
354need absolute reliability; trace data could be carried over UDP.
355
356For an unprivileged user running `lttng-relayd`, the maximum number of
357file descriptors per process is usually 1024. This limits the number of
358connections and opened trace files. This limit can be configured with
359*ulimit*(3).
360
361
362include::common-footer.txt[]
363
364
365SEE ALSO
366--------
367man:lttng(1),
368man:lttng-sessiond(8),
369man:lttng-crash(1),
370man:lttng-ust(3),
371man:babeltrace2(1)
This page took 0.023529 seconds and 4 git commands to generate.