7 lttng-relayd - LTTng 2 relay daemon
13 *lttng-relayd* [option:--background | option:--daemonize]
14 [option:--control-port='URL'] [option:--data-port='URL'] [option:--fd-pool-size='COUNT']
15 [option:--live-port='URL'] [option:--output='PATH']
16 [option:-v | option:-vv | option:-vvv]
21 The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
22 source software package used for correlated tracing of the Linux kernel,
23 user applications, and user libraries.
25 LTTng consists of Linux kernel modules (for Linux kernel tracing) and
26 dynamically loaded libraries (for user application and library tracing).
28 The _LTTng relay daemon_ is responsible for receiving trace data from
29 possibly remote LTTng session/consumer daemons and for writing it to
30 the local file system. The relay daemon also accepts _LTTng live_
31 connections from compatible viewers; this is the official approach to
32 viewing LTTng events as they are emitted.
34 The relay daemon listens by default on all network interfaces to gather
35 trace data, but only on localhost for LTTng live connections.
37 The relay daemon does not require any particular permissions, as long as
38 it can write to the output directory and listen on the configured ports.
39 If a user is within a secured network and/or has proper firewall
40 settings, `lttng-relayd` can listen to LTTng live connections from _all_
41 network interfaces by specifying
42 +--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
44 Once a trace has been streamed completely, the trace can be processed by
45 any tool that can process an LTTng trace located on the local
52 By default, the relay daemon writes the traces to:
55 $LTTNG_HOME/lttng-traces/'HOSTNAME'/'SESSION'/'DOMAIN'
68 You can override the default output directory prefix
69 (`$LTTNG_HOME/lttng-traces`) with the option:--output option. The other
70 parts depend on the remote configuration.
76 The option:--control-port, option:--data-port, and option:--live-port
79 The format of those URLs is:
82 tcp://('HOST' | 'IPADDR'):__PORT__
87 Binding hostname or IP address (IPv6 address *must* be enclosed in
88 brackets (`[` and `]`); see
89 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
99 option:-b, option:--background::
100 Start as Unix daemon, but keep file descriptors (console) open.
101 Use the option:--daemonize option instead to close the file
104 option:-d, option:--daemonize::
105 Start as Unix daemon, and close file descriptors (console). Use the
106 option:--background option instead to keep the file descriptors
109 option:--fd-pool-size='COUNT'::
110 Set the size of the file descritptor pool. This effectively sets a
111 limit on the number of file descriptors that may be kept open
112 simultaneously by the daemon (default: the soft RLIMIT_NOFILE resource
113 limit of the process).
115 option:-g 'GROUP', option:--group='GROUP'::
116 Use 'GROUP' as Unix tracing group (default: `tracing`).
118 option:-o 'PATH', option:--output='PATH'::
119 Set base directory of written trace data to 'PATH'.
121 See the <<output-directory,Output directory>> section above for more
124 option:-v, option:--verbose::
127 Three levels of verbosity are available, which are triggered by
128 appending additional `v` letters to the option
129 (that is, `-vv` and `-vvv`).
134 See the <<url-format,URL format>> section above for more information
135 about the syntax of the following options' 'URL' argument.
137 option:-C 'URL', option:--control-port='URL'::
138 Listen to control data on URL 'URL' (default:
139 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
141 option:-D 'URL', option:--data-port='URL'::
142 Listen to trace data on URL 'URL' (default:
143 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
145 option:-L 'URL', option:--live-port='URL'::
146 Listen to LTTng live connections on URL 'URL'
148 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
153 option:-h, option:--help::
156 option:-V, option:--version::
160 ENVIRONMENT VARIABLES
161 ---------------------
162 `LTTNG_ABORT_ON_ERROR`::
163 Set to 1 to abort the process after the first error is encountered.
165 `LTTNG_NETWORK_SOCKET_TIMEOUT`::
166 Socket connection, receive and send timeout (milliseconds). A value
167 of 0 or -1 uses the timeout of the operating system (default).
169 `LTTNG_RELAYD_HEALTH`::
170 Path to relay daemon health's socket.
172 `LTTNG_RELAYD_TCP_KEEP_ALIVE`::
173 Set to 1 to enable TCP keep-alive.
175 The TCP keep-alive mechanism allows the detection of dead peers
176 (man:lttng-sessiond(8)) in cases of unclean termination
177 (for example, a hard reset) of a peer.
179 Supported on Linux and Solaris only. The default behaviour of the TCP
180 keep-alive mechanism is OS-specific.
182 Search for `tcp_keepalive` in man:tcp(7) for more information.
184 `LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
185 The time threshold in seconds to abort a TCP connection after the keep-alive
186 probing mechanism has failed.
188 Set to 0 or -1 to use the value chosen by the operating system (default).
190 Supported on Solaris 11 only.
192 Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
194 `LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
195 Number of seconds a connection needs to be idle before TCP begins
196 sending out keep-alive probes.
198 Set to 0 or -1 to use the value chosen by the operating system (default).
200 Supported on Linux and Solaris 11 only.
202 On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
204 Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
205 in man:tcp(7) on Solaris 11 for more information.
207 `LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
208 Maximum number of TCP keep-alive probes to send before giving up and
209 killing the connection if no response is obtained from the other end.
211 Set to 0 or -1 to use the value chosen by the operating system (default).
213 Supported on Linux only.
215 Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
217 `LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
218 Number of seconds between TCP keep-alive probes.
220 Set to 0 or -1 to use the value chosen by the operating system (default).
222 Supported on Linux only.
224 Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
229 `$LTTNG_HOME/.lttng`::
230 User LTTng runtime and configuration directory.
232 `$LTTNG_HOME/lttng-traces`::
233 Default output directory of LTTng traces. This can be overridden
234 with the option:--output option.
236 NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
253 As of this version, only the TCP protocol is supported for both control
254 and data ports. In future versions, TCP will remain the sole available
255 protocol for control data since those communications are low-volume and
256 need absolute reliability; trace data could be carried over UDP.
258 For an unprivileged user running `lttng-relayd`, the maximum number of
259 file descriptors per process is usually 1024. This limits the number of
260 connections and opened trace files. This limit can be configured with
264 include::common-footer.txt[]
270 man:lttng-sessiond(8),