7 lttng-relayd - LTTng 2 relay daemon
13 *lttng-relayd* [option:--background | option:--daemonize]
14 [option:--control-port='URL'] [option:--data-port='URL'] [option:--live-port='URL']
15 [option:--output='PATH'] [option:-v | option:-vv | option:-vvv]
20 The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
21 source software package used for correlated tracing of the Linux kernel,
22 user applications, and user libraries.
24 LTTng consists of Linux kernel modules (for Linux kernel tracing) and
25 dynamically loaded libraries (for user application and library tracing).
27 The _LTTng relay daemon_ is responsible for receiving trace data from
28 possibly remote LTTng session/consumer daemons and for writing it to
29 the local file system. The relay daemon also accepts _LTTng live_
30 connections from compatible viewers; this is the official approach to
31 viewing LTTng events as they are emitted.
33 The relay daemon listens by default on all network interfaces to gather
34 trace data, but only on localhost for LTTng live connections.
36 The relay daemon does not require any particular permissions, as long as
37 it can write to the output directory and listen on the configured ports.
38 If a user is within a secured network and/or has proper firewall
39 settings, `lttng-relayd` can listen to LTTng live connections from _all_
40 network interfaces by specifying
41 +--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
43 Once a trace has been streamed completely, the trace can be processed by
44 any tool that can process an LTTng trace located on the local
51 By default (option:--group-output-by-host), the relay daemon writes the traces
55 $LTTNG_HOME/lttng-traces/'HOSTNAME'/'SESSION'/'DOMAIN'
68 You can group the output per session instead of per hostname with the
69 option:--group-output-by-session option. This result in the following:
73 $LTTNG_HOME/lttng-traces/'SESSION'/'HOST'/'DOMAIN'
75 You can override the default output directory prefix
76 (`$LTTNG_HOME/lttng-traces`) with the option:--output option. The other
77 parts depend on the remote configuration.
84 The option:--control-port, option:--data-port, and option:--live-port
87 The format of those URLs is:
90 tcp://('HOST' | 'IPADDR'):__PORT__
95 Binding hostname or IP address (IPv6 address *must* be enclosed in
96 brackets (`[` and `]`); see
97 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
107 option:-b, option:--background::
108 Start as Unix daemon, but keep file descriptors (console) open.
109 Use the option:--daemonize option instead to close the file
112 option:-d, option:--daemonize::
113 Start as Unix daemon, and close file descriptors (console). Use the
114 option:--background option instead to keep the file descriptors
117 option:-g 'GROUP', option:--group='GROUP'::
118 Use 'GROUP' as Unix tracing group (default: `tracing`).
120 option:-o 'PATH', option:--output='PATH'::
121 Set base directory of written trace data to 'PATH'.
123 See the <<output-directory,Output directory>> section above for more
126 option:-p, option:--group-output-by-host::
127 Organize the output directory by host. Default behavior.
129 See the <<output-directory,Output directory>> section above for more
132 option:-s, option:--group-output-by-session::
133 Organize the output directory by session.
135 See the <<output-directory,Output directory>> section above for more
138 option:-v, option:--verbose::
141 Three levels of verbosity are available, which are triggered by
142 appending additional `v` letters to the option
143 (that is, `-vv` and `-vvv`).
148 See the <<url-format,URL format>> section above for more information
149 about the syntax of the following options' 'URL' argument.
151 option:-C 'URL', option:--control-port='URL'::
152 Listen to control data on URL 'URL' (default:
153 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
155 option:-D 'URL', option:--data-port='URL'::
156 Listen to trace data on URL 'URL' (default:
157 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
159 option:-L 'URL', option:--live-port='URL'::
160 Listen to LTTng live connections on URL 'URL'
162 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
167 option:-h, option:--help::
170 option:-V, option:--version::
174 ENVIRONMENT VARIABLES
175 ---------------------
176 `LTTNG_ABORT_ON_ERROR`::
177 Set to 1 to abort the process after the first error is encountered.
179 `LTTNG_NETWORK_SOCKET_TIMEOUT`::
180 Socket connection, receive and send timeout (milliseconds). A value
181 of 0 or -1 uses the timeout of the operating system (default).
183 `LTTNG_RELAYD_HEALTH`::
184 Path to relay daemon health's socket.
186 `LTTNG_RELAYD_TCP_KEEP_ALIVE`::
187 Set to 1 to enable TCP keep-alive.
189 The TCP keep-alive mechanism allows the detection of dead peers
190 (man:lttng-sessiond(8)) in cases of unclean termination
191 (for example, a hard reset) of a peer.
193 Supported on Linux and Solaris only. The default behaviour of the TCP
194 keep-alive mechanism is OS-specific.
196 Search for `tcp_keepalive` in man:tcp(7) for more information.
198 `LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
199 The time threshold in seconds to abort a TCP connection after the keep-alive
200 probing mechanism has failed.
202 Set to 0 or -1 to use the value chosen by the operating system (default).
204 Supported on Solaris 11 only.
206 Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
208 `LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
209 Number of seconds a connection needs to be idle before TCP begins
210 sending out keep-alive probes.
212 Set to 0 or -1 to use the value chosen by the operating system (default).
214 Supported on Linux and Solaris 11 only.
216 On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
218 Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
219 in man:tcp(7) on Solaris 11 for more information.
221 `LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
222 Maximum number of TCP keep-alive probes to send before giving up and
223 killing the connection if no response is obtained from the other end.
225 Set to 0 or -1 to use the value chosen by the operating system (default).
227 Supported on Linux only.
229 Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
231 `LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
232 Number of seconds between TCP keep-alive probes.
234 Set to 0 or -1 to use the value chosen by the operating system (default).
236 Supported on Linux only.
238 Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
243 `$LTTNG_HOME/.lttng`::
244 User LTTng runtime and configuration directory.
246 `$LTTNG_HOME/lttng-traces`::
247 Default output directory of LTTng traces. This can be overridden
248 with the option:--output option.
250 NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
267 As of this version, only the TCP protocol is supported for both control
268 and data ports. In future versions, TCP will remain the sole available
269 protocol for control data since those communications are low-volume and
270 need absolute reliability; trace data could be carried over UDP.
272 For an unprivileged user running `lttng-relayd`, the maximum number of
273 file descriptors per process is usually 1024. This limits the number of
274 connections and opened trace files. This limit can be configured with
278 include::common-footer.txt[]
284 man:lttng-sessiond(8),