61ff2677397ab8fafa283ad4b202c911ad5d9230
[lttng-tools.git] / doc / man / lttng-relayd.8.txt
1 lttng-relayd(8)
2 ===============
3 :revdate: 5 June 2018
4
5
6 NAME
7 ----
8 lttng-relayd - LTTng 2 relay daemon
9
10
11 SYNOPSIS
12 --------
13 [verse]
14 *lttng-relayd* [option:--background | option:--daemonize]
15 [option:--control-port='URL'] [option:--data-port='URL'] [option:--live-port='URL']
16 [option:--output='PATH'] [option:-v | option:-vv | option:-vvv]
17 [option:--working-directory='PATH']
18
19
20 DESCRIPTION
21 -----------
22 The https://lttng.org/[_Linux Trace Toolkit: next generation_] is an open
23 source software package used for correlated tracing of the Linux kernel,
24 user applications, and user libraries.
25
26 LTTng consists of Linux kernel modules (for Linux kernel tracing) and
27 dynamically loaded libraries (for user application and library tracing).
28
29 The _LTTng relay daemon_ is responsible for receiving trace data from
30 possibly remote LTTng session/consumer daemons and for writing it to
31 the local file system. The relay daemon also accepts _LTTng live_
32 connections from compatible viewers; this is the official approach to
33 viewing LTTng events as they are emitted.
34
35 The relay daemon listens by default on all network interfaces to gather
36 trace data, but only on localhost for LTTng live connections.
37
38 The relay daemon does not require any particular permissions, as long as
39 it can write to the output directory and listen on the configured ports.
40 If a user is within a secured network and/or has proper firewall
41 settings, `lttng-relayd` can listen to LTTng live connections from _all_
42 network interfaces by specifying
43 +--live-port=tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+.
44
45 Once a trace has been streamed completely, the trace can be processed by
46 any tool that can process an LTTng trace located on the local
47 file system.
48
49
50 [[output-directory]]
51 Output directory
52 ~~~~~~~~~~~~~~~~
53 By default, the relay daemon writes the traces to:
54
55 [verse]
56 $LTTNG_HOME/lttng-traces/'HOSTNAME'/'SESSION'/'DOMAIN'
57
58 with:
59
60 'HOSTNAME'::
61 Remote hostname.
62
63 'SESSION'::
64 Full session name.
65
66 'DOMAIN'::
67 Tracing domain.
68
69 You can override the default output directory prefix
70 (`$LTTNG_HOME/lttng-traces`) with the option:--output option. The other
71 parts depend on the remote configuration.
72
73
74 [[url-format]]
75 URL format
76 ~~~~~~~~~~
77 The option:--control-port, option:--data-port, and option:--live-port
78 options specify URLs.
79
80 The format of those URLs is:
81
82 [verse]
83 tcp://('HOST' | 'IPADDR'):__PORT__
84
85 with:
86
87 ('HOST' | 'IPADDR')::
88 Binding hostname or IP address (IPv6 address *must* be enclosed in
89 brackets (`[` and `]`); see
90 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
91
92 'PORT'::
93 TCP port.
94
95
96 OPTIONS
97 -------
98 Daemon
99 ~~~~~~
100 option:-b, option:--background::
101 Start as Unix daemon, but keep file descriptors (console) open.
102 Use the option:--daemonize option instead to close the file
103 descriptors.
104
105 option:-d, option:--daemonize::
106 Start as Unix daemon, and close file descriptors (console). Use the
107 option:--background option instead to keep the file descriptors
108 open.
109
110 option:-g 'GROUP', option:--group='GROUP'::
111 Use 'GROUP' as Unix tracing group (default: `tracing`).
112
113 option:-o 'PATH', option:--output='PATH'::
114 Set base directory of written trace data to 'PATH'.
115 +
116 See the <<output-directory,Output directory>> section above for more
117 information.
118
119 option:-w 'PATH', option:--working-directory='PATH'::
120 Set the working directory of the processes this relay daemon creates.
121
122 option:-v, option:--verbose::
123 Increase verbosity.
124 +
125 Three levels of verbosity are available, which are triggered by
126 appending additional `v` letters to the option
127 (that is, `-vv` and `-vvv`).
128
129
130 Ports
131 ~~~~~
132 See the <<url-format,URL format>> section above for more information
133 about the syntax of the following options' 'URL' argument.
134
135 option:-C 'URL', option:--control-port='URL'::
136 Listen to control data on URL 'URL' (default:
137 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
138
139 option:-D 'URL', option:--data-port='URL'::
140 Listen to trace data on URL 'URL' (default:
141 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
142
143 option:-L 'URL', option:--live-port='URL'::
144 Listen to LTTng live connections on URL 'URL'
145 (default:
146 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
147
148
149 Program information
150 ~~~~~~~~~~~~~~~~~~~
151 option:-h, option:--help::
152 Show help.
153
154 option:-V, option:--version::
155 Show version.
156
157
158 ENVIRONMENT VARIABLES
159 ---------------------
160 `LTTNG_ABORT_ON_ERROR`::
161 Set to 1 to abort the process after the first error is encountered.
162
163 `LTTNG_NETWORK_SOCKET_TIMEOUT`::
164 Socket connection, receive and send timeout (milliseconds). A value
165 of 0 or -1 uses the timeout of the operating system (default).
166
167 `LTTNG_RELAYD_HEALTH`::
168 Path to relay daemon health's socket.
169
170 `LTTNG_RELAYD_TCP_KEEP_ALIVE`::
171 Set to 1 to enable TCP keep-alive.
172 +
173 The TCP keep-alive mechanism allows the detection of dead peers
174 (man:lttng-sessiond(8)) in cases of unclean termination
175 (for example, a hard reset) of a peer.
176 +
177 Supported on Linux and Solaris only. The default behaviour of the TCP
178 keep-alive mechanism is OS-specific.
179 +
180 Search for `tcp_keepalive` in man:tcp(7) for more information.
181
182 `LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
183 The time threshold in seconds to abort a TCP connection after the keep-alive
184 probing mechanism has failed.
185 +
186 Set to 0 or -1 to use the value chosen by the operating system (default).
187 +
188 Supported on Solaris 11 only.
189 +
190 Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
191
192 `LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
193 Number of seconds a connection needs to be idle before TCP begins
194 sending out keep-alive probes.
195 +
196 Set to 0 or -1 to use the value chosen by the operating system (default).
197 +
198 Supported on Linux and Solaris 11 only.
199 +
200 On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
201 +
202 Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
203 in man:tcp(7) on Solaris 11 for more information.
204
205 `LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
206 Maximum number of TCP keep-alive probes to send before giving up and
207 killing the connection if no response is obtained from the other end.
208 +
209 Set to 0 or -1 to use the value chosen by the operating system (default).
210 +
211 Supported on Linux only.
212 +
213 Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
214
215 `LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
216 Number of seconds between TCP keep-alive probes.
217 +
218 Set to 0 or -1 to use the value chosen by the operating system (default).
219 +
220 Supported on Linux only.
221 +
222 Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
223
224 `LTTNG_RELAYD_WORKING_DIRECTORY`::
225 Working directory of the processes this relay daemon creates.
226 +
227 The option:--working-directory option overrides this variable.
228
229
230 FILES
231 -----
232 `$LTTNG_HOME/.lttng`::
233 User LTTng runtime and configuration directory.
234
235 `$LTTNG_HOME/lttng-traces`::
236 Default output directory of LTTng traces. This can be overridden
237 with the option:--output option.
238
239 NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
240
241
242 EXIT STATUS
243 -----------
244 *0*::
245 Success
246
247 *1*::
248 Error
249
250 *3*::
251 Fatal error
252
253
254 LIMITATIONS
255 -----------
256 As of this version, only the TCP protocol is supported for both control
257 and data ports. In future versions, TCP will remain the sole available
258 protocol for control data since those communications are low-volume and
259 need absolute reliability; trace data could be carried over UDP.
260
261 For an unprivileged user running `lttng-relayd`, the maximum number of
262 file descriptors per process is usually 1024. This limits the number of
263 connections and opened trace files. This limit can be configured with
264 *ulimit*(3).
265
266
267 include::common-footer.txt[]
268
269
270 SEE ALSO
271 --------
272 man:lttng(1),
273 man:lttng-sessiond(8),
274 man:lttng-crash(1),
275 man:lttng-ust(3),
276 man:babeltrace(1)
This page took 0.034693 seconds and 3 git commands to generate.