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]
16 [option:--working-directory='PATH']
21 The http://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 (option:--group-output-by-host), the relay daemon writes the traces
56 $LTTNG_HOME/lttng-traces/'HOSTNAME'/'SESSION'/'DOMAIN'
69 You can group the output per session instead of per hostname with the
70 option:--group-output-by-session option. This result in the following:
74 $LTTNG_HOME/lttng-traces/'SESSION'/'HOST'/'DOMAIN'
76 You can override the default output directory prefix
77 (`$LTTNG_HOME/lttng-traces`) with the option:--output option. The other
78 parts depend on the remote configuration.
85 The option:--control-port, option:--data-port, and option:--live-port
88 The format of those URLs is:
91 tcp://('HOST' | 'IPADDR'):__PORT__
96 Binding hostname or IP address (IPv6 address *must* be enclosed in
97 brackets (`[` and `]`); see
98 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
108 option:-b, option:--background::
109 Start as Unix daemon, but keep file descriptors (console) open.
110 Use the option:--daemonize option instead to close the file
113 option:-d, option:--daemonize::
114 Start as Unix daemon, and close file descriptors (console). Use the
115 option:--background option instead to keep the file descriptors
118 option:-g 'GROUP', option:--group='GROUP'::
119 Use 'GROUP' as Unix tracing group (default: `tracing`).
121 option:-o 'PATH', option:--output='PATH'::
122 Set base directory of written trace data to 'PATH'.
124 See the <<output-directory,Output directory>> section above for more
127 option:-p, option:--group-output-by-host::
128 Organize the output directory by host. Default behavior.
130 See the <<output-directory,Output directory>> section above for more
133 option:-s, option:--group-output-by-session::
134 Organize the output directory by session.
136 See the <<output-directory,Output directory>> section above for more
139 option:-v, option:--verbose::
142 option:-w 'PATH', option:--working-directory='PATH'::
143 Set the working directory of the processes this relay daemon creates.
145 Three levels of verbosity are available, which are triggered by
146 appending additional `v` letters to the option
147 (that is, `-vv` and `-vvv`).
152 See the <<url-format,URL format>> section above for more information
153 about the syntax of the following options' 'URL' argument.
155 option:-C 'URL', option:--control-port='URL'::
156 Listen to control data on URL 'URL' (default:
157 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
159 option:-D 'URL', option:--data-port='URL'::
160 Listen to trace data on URL 'URL' (default:
161 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
163 option:-L 'URL', option:--live-port='URL'::
164 Listen to LTTng live connections on URL 'URL'
166 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
171 option:-h, option:--help::
174 option:-V, option:--version::
178 ENVIRONMENT VARIABLES
179 ---------------------
180 `LTTNG_ABORT_ON_ERROR`::
181 Set to 1 to abort the process after the first error is encountered.
183 `LTTNG_NETWORK_SOCKET_TIMEOUT`::
184 Socket connection, receive and send timeout (milliseconds). A value
185 of 0 or -1 uses the timeout of the operating system (default).
187 `LTTNG_RELAYD_HEALTH`::
188 Path to relay daemon health's socket.
190 `LTTNG_RELAYD_TCP_KEEP_ALIVE`::
191 Set to 1 to enable TCP keep-alive.
193 The TCP keep-alive mechanism allows the detection of dead peers
194 (man:lttng-sessiond(8)) in cases of unclean termination
195 (for example, a hard reset) of a peer.
197 Supported on Linux and Solaris only. The default behaviour of the TCP
198 keep-alive mechanism is OS-specific.
200 Search for `tcp_keepalive` in man:tcp(7) for more information.
202 `LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
203 The time threshold in seconds to abort a TCP connection after the keep-alive
204 probing mechanism has failed.
206 Set to 0 or -1 to use the value chosen by the operating system (default).
208 Supported on Solaris 11 only.
210 Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
212 `LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
213 Number of seconds a connection needs to be idle before TCP begins
214 sending out keep-alive probes.
216 Set to 0 or -1 to use the value chosen by the operating system (default).
218 Supported on Linux and Solaris 11 only.
220 On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
222 Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
223 in man:tcp(7) on Solaris 11 for more information.
225 `LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
226 Maximum number of TCP keep-alive probes to send before giving up and
227 killing the connection if no response is obtained from the other end.
229 Set to 0 or -1 to use the value chosen by the operating system (default).
231 Supported on Linux only.
233 Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
235 `LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
236 Number of seconds between TCP keep-alive probes.
238 Set to 0 or -1 to use the value chosen by the operating system (default).
240 Supported on Linux only.
242 Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
247 `$LTTNG_HOME/.lttng`::
248 User LTTng runtime and configuration directory.
250 `$LTTNG_HOME/lttng-traces`::
251 Default output directory of LTTng traces. This can be overridden
252 with the option:--output option.
254 NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
271 As of this version, only the TCP protocol is supported for both control
272 and data ports. In future versions, TCP will remain the sole available
273 protocol for control data since those communications are low-volume and
274 need absolute reliability; trace data could be carried over UDP.
276 For an unprivileged user running `lttng-relayd`, the maximum number of
277 file descriptors per process is usually 1024. This limits the number of
278 connections and opened trace files. This limit can be configured with
282 include::common-footer.txt[]
288 man:lttng-sessiond(8),