Rename "tracing session" -> "recording session"
[lttng-tools.git] / doc / man / lttng-relayd.8.txt
... / ...
CommitLineData
1lttng-relayd(8)
2===============
3:revdate: 14 June 2021
4:daemon-bin-name: lttng-relayd
5:daemon-ini-section: relayd
6
7
8NAME
9----
10lttng-relayd - LTTng relay daemon
11
12
13SYNOPSIS
14--------
15[verse]
16*lttng-relayd* [option:--background | option:--daemonize] [option:--config='PATH']
17 [option:--control-port='URL'] [option:--data-port='URL'] [option:--fd-pool-size='COUNT']
18 [option:--live-port='URL'] [option:--output='DIR'] [option:--group='GROUP']
19 [option:--verbose]... [option:--working-directory='DIR']
20 [option:--group-output-by-host | option:--group-output-by-session] [option:--disallow-clear]
21
22
23DESCRIPTION
24-----------
25include::common-intro.txt[]
26
27An LTTng relay daemon, `lttng-relayd`, is a program which receives trace
28data from (possibly remote) LTTng session/consumer daemons and which
29writes it to the local file system. The relay daemon also accepts LTTng
30live connections from compatible readers (for example,
31man:babeltrace2(1)); this is the recommended approach to read trace data
32while the remote recording session is active.
33
34By default, a relay daemon listens on all network interfaces to receive
35trace data, but only on `localhost` for LTTng live connections. Override
36the listening URLs with the option:--control-port, option:--data-port,
37and option:--live-port options (see the ``<<url-format,URL format>>''
38section below). For example, use the
39option:--live-port=+tcp://0.0.0.0:{default_network_viewer_port}+ option
40to make a relay daemon listen to LTTng live connections on all network
41interfaces.
42
43Once LTTng has completely sent a trace to a relay daemon{nbsp}__RD__,
44any LTTng trace reader can read the trace located on the local file
45system of{nbsp}__RD__.
46
47By default, `lttng-relayd` doesn't start as a daemon. Make it a daemon
48with the option:--daemonize or option:--background option. With those
49options, `lttng-relayd` ensures the daemon is listening to incoming
50connections before it exits.
51
52
53include::common-daemon-cfg.txt[]
54
55INI configuration file example:
56
57[source,ini]
58----
59[relayd]
60daemonize=yes
61live-port=tcp://0.0.0.0:4567
62disallow-clear=yes
63----
64
65
66[[output-directory]]
67Output directory
68~~~~~~~~~~~~~~~~
69The relay daemon uses different output path patterns depending on:
70
71* Its configuration.
72+
73See the ``<<cfg,Daemon configuration>>'' section above.
74
75* The recording session configuration of the connected peer.
76* The LTTng session daemon (see man:lttng-sessiond(8)) version
77 of the connected peer.
78
79Consider the following variables:
80
81'BASE'::
82 Base output directory: `$LTTNG_HOME/lttng-traces` (`$LTTNG_HOME`
83 defaults to `$HOME`) or the argument of the option:--output option.
84
85'HOSTNAME'::
86 Hostname of the connected peer.
87
88'SESSION'::
89 Recording session name.
90
91'DATETIME'::
92 Unique recording session date/time.
93
94'TRACEDIR'::
95 Custom trace directory path ('TRACEDIR' part of the argument of the
96 nloption:--set-url option of the man:lttng-create(1) command, if
97 any).
98
99'SESSIONDV'::
100 The version of the LTTng session daemon of the connected peer.
101
102The relay daemon output path patterns are:
103
104With the option:--group-output-by-host option (hostname grouping)::
105 Without a custom trace directory:::
106+
107[verse]
108'BASE'/'HOSTNAME'/'SESSION'-'DATETIME'
109
110With a custom trace directory:::
111+
112[verse]
113'BASE'/'HOSTNAME'/'TRACEDIR'
114
115With the option:--group-output-by-session option (recording session grouping)::
116 Without a custom trace directory:::
117 'SESSIONDV' is at least{nbsp}2.4::::
118+
119[verse]
120'BASE'/'SESSION'/'HOSTNAME'-'DATETIME'
121
122Otherwise::::
123 Defaults to the hostname grouping pattern:
124+
125[verse]
126'BASE'/'HOSTNAME'/'SESSION'-'DATETIME'
127
128With a custom trace directory:::
129 'SESSIONDV' is at least 2.4::::
130+
131[verse]
132'BASE'/'SESSION'/'HOSTNAME'-'DATETIME'/'TRACEDIR'
133
134Otherwise::::
135 Defaults to the hostname grouping pattern:
136+
137[verse]
138'BASE'/'HOSTNAME'/'TRACEDIR'
139
140
141[[url-format]]
142URL format
143~~~~~~~~~~
144The argument of the option:--control-port='URL',
145option:--data-port='URL', and option:--live-port='URL' options is an
146URL.
147
148The format of 'URL' is:
149
150[verse]
151tcp://('HOST' | 'IPADDR'):__PORT__
152
153with:
154
155('HOST' | 'IPADDR')::
156 Binding hostname or IP address.
157+
158IPv6 address must be enclosed in square brackets (`[` and{nbsp}`]`);
159see https://www.ietf.org/rfc/rfc2732.txt[RFC{nbsp}2732].
160
161'PORT'::
162 TCP port.
163
164
165[[options]]
166OPTIONS
167-------
168General daemon configuration
169~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170option:-b, option:--background::
171 Start as a Unix daemon, but keep file descriptors (console) open.
172+
173With this option, `lttng-relayd` ensures the daemon is listening
174to incoming connections before it exits.
175+
176Use the option:--daemonize option instead to close the file descriptors.
177
178option:-f 'PATH', option:--config='PATH'::
179 Configure the daemon using the INI configuration file 'PATH' in
180 addition to the default configuration files and the command-line
181 options.
182+
183See the ``<<cfg,Daemon configuration>>'' section above.
184
185option:-d, option:--daemonize::
186 Start as a Unix daemon and close file descriptors (console).
187+
188With this option, `lttng-relayd` ensures the daemon is listening
189to incoming connections before it exits.
190+
191Use the option:--background option instead to keep the file descriptors
192open.
193
194option:-x, option:--disallow-clear::
195 Disallow clearing operations (see man:lttng-clear(1)).
196+
197See also the `LTTNG_RELAYD_DISALLOW_CLEAR` environment variable.
198
199option:--fd-pool-size='SIZE'::
200 Set the size of the file descriptor pool to 'SIZE' file descriptors.
201+
202'SIZE' is the maximum number of file descriptors that the relay daemon
203may keep open simultaneously.
204+
205Default: the soft `RLIMIT_NOFILE` resource limit of the process (see
206man:getrlimit(2)).
207
208option:-g 'GROUP', option:--group='GROUP'::
209 Set the Unix tracing group to 'GROUP' instead of `tracing`.
210+
211This option is only meaningful when the `root` Unix user starts
212`lttng-relayd`.
213+
214Members of the Unix tracing group may connect to the health check socket
215of the relay daemon.
216+
217See also the `LTTNG_RELAYD_HEALTH` environment variable.
218
219option:-w 'DIR', option:--working-directory='DIR'::
220 Set the working directory of the processes the relay daemon creates
221 to 'DIR'.
222+
223See also the `LTTNG_RELAYD_WORKING_DIRECTORY` environment variable.
224
225option:-v, option:--verbose::
226 Increase verbosity.
227+
228Specify this option up to three times to get more levels of verbosity.
229
230
231Output
232~~~~~~
233See the ``<<output-directory,Output directory>>'' section above to learn
234more.
235
236option:-p, option:--group-output-by-host::
237 Group the written trace directories by hostname.
238+
239As of LTTng{nbsp}{lttng_version}, this is the default output grouping
240strategy, but this may change in the future.
241
242option:-s, option:--group-output-by-session::
243 Group the written trace directories by recording session name
244 instead of by hostname.
245
246option:-o 'DIR', option:--output='DIR'::
247 Set the base output directory of the written trace directories to
248 'DIR'.
249
250
251Ports
252~~~~~
253See the ``<<url-format,URL format>>'' section above to learn more about
254the syntax of the 'URL' argument of the following options.
255
256option:-C 'URL', option:--control-port='URL'::
257 Listen to control data on URL 'URL'.
258+
259Default:
260+tcp://{default_network_control_bind_address}:{default_network_control_port}+.
261
262option:-D 'URL', option:--data-port='URL'::
263 Listen to trace data on URL 'URL'.
264+
265Default:
266+tcp://{default_network_data_bind_address}:{default_network_data_port}+.
267
268option:-L 'URL', option:--live-port='URL'::
269 Listen to LTTng live connections on URL 'URL'.
270+
271Default:
272+tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
273
274
275Program information
276~~~~~~~~~~~~~~~~~~~
277include::common-help-option.txt[]
278
279option:-V, option:--version::
280 Show version and quit.
281
282
283EXIT STATUS
284-----------
285*0*::
286 Success
287
288*1*::
289 Error
290
291*3*::
292 Fatal error
293
294
295ENVIRONMENT
296-----------
297`LTTNG_ABORT_ON_ERROR`::
298 Set to `1` to abort the process after the first error is
299 encountered.
300
301`LTTNG_NETWORK_SOCKET_TIMEOUT`::
302 Socket connection, receive, and send timeout (milliseconds).
303+
304Set to `0` or `-1` to set an infinite timeout (default).
305
306`LTTNG_RELAYD_DISALLOW_CLEAR`::
307 Set to `1` to disallow clearing operations (see man:lttng-clear(1)).
308+
309The option:--disallow-clear option overrides this environment variable.
310
311`LTTNG_RELAYD_HEALTH`::
312 Path to the health check socket of the relay daemon.
313
314`LTTNG_RELAYD_TCP_KEEP_ALIVE`::
315 Set to `1` to enable TCP keep-alive.
316+
317The TCP keep-alive mechanism allows the detection of dead peers
318(man:lttng-sessiond(8)) in cases of unclean termination (for example, a
319hard reset) of a peer.
320+
321Supported on Linux and Solaris only. The default behaviour of the TCP
322keep-alive mechanism is OS-specific.
323+
324Search for `tcp_keepalive` in man:tcp(7) to learn more.
325
326`LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
327 The time threshold (seconds) to abort a TCP connection after the
328 keep-alive probing mechanism has failed.
329+
330Set to `0` or `-1` to use the value chosen by the operating system
331(default).
332+
333Supported on Solaris 11 only.
334+
335Search for `tcp_keepalive_abort_threshold` in man:tcp(7) to learn more.
336
337`LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
338 Number of seconds a connection needs to be idle before TCP begins
339 sending out keep-alive probes.
340+
341Set to `0` or `-1` to use the value chosen by the operating system
342(default).
343+
344Supported on Linux and Solaris 11 only.
345+
346On Solaris{nbsp}11, the accepted values are `-1`, `0`, and `10` to
347`864000`.
348+
349Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
350in man:tcp(7) on Solaris{nbsp}11 to learn more.
351
352`LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
353 Maximum number of TCP keep-alive probes to send before giving up and
354 killing the connection if no response is obtained from the other end.
355+
356Set to `0` or `-1` to use the value chosen by the operating system
357(default).
358+
359Supported on Linux only.
360+
361Search for `tcp_keepalive_probes` in man:tcp(7) to learn more.
362
363`LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
364 Number of seconds between TCP keep-alive probes.
365+
366Set to `0` or `-1` to use the value chosen by the operating system
367(default).
368+
369Supported on Linux only.
370+
371Search for `tcp_keepalive_intvl` in man:tcp(7) to learn more.
372
373`LTTNG_RELAYD_WORKING_DIRECTORY`::
374 Working directory of the processes the relay daemon creates.
375+
376The option:--working-directory option overrides this environment
377variable.
378
379
380FILES
381-----
382`$LTTNG_HOME/.lttng`::
383 Unix user's LTTng runtime and configuration directory.
384
385`$LTTNG_HOME/lttng-traces`::
386 Default base output directory of LTTng traces.
387+
388Override this path with the option:--output option.
389
390NOTE: `$LTTNG_HOME` defaults to `$HOME`.
391
392
393include::common-footer.txt[]
394
395
396SEE ALSO
397--------
398man:babeltrace2(1),
399man:lttng(1),
400man:lttng-sessiond(8)
This page took 0.023191 seconds and 4 git commands to generate.