Man: --group-output-by-session
[deliverable/lttng-tools.git] / doc / man / lttng-relayd.8.txt
1 lttng-relayd(8)
2 ===============
3
4
5 NAME
6 ----
7 lttng-relayd - LTTng 2 relay daemon
8
9
10 SYNOPSIS
11 --------
12 [verse]
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
17
18 DESCRIPTION
19 -----------
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.
23
24 LTTng consists of Linux kernel modules (for Linux kernel tracing) and
25 dynamically loaded libraries (for user application and library tracing).
26
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.
32
33 The relay daemon listens by default on all network interfaces to gather
34 trace data, but only on localhost for LTTng live connections.
35
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}+.
42
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
45 file system.
46
47
48 [[output-directory]]
49 Output directory
50 ~~~~~~~~~~~~~~~~
51 By default (option:--group-output-by-host), the relay daemon writes the traces
52 to:
53
54 [verse]
55 $LTTNG_HOME/lttng-traces/'HOSTNAME'/'SESSION'/'DOMAIN'
56
57 with:
58
59 'HOSTNAME'::
60 Remote hostname.
61
62 'SESSION'::
63 Full session name.
64
65 'DOMAIN'::
66 Tracing domain.
67
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:
70
71 [verse]
72
73 $LTTNG_HOME/lttng-traces/'SESSION'/'HOST'/'DOMAIN'
74
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.
78
79
80
81 [[url-format]]
82 URL format
83 ~~~~~~~~~~
84 The option:--control-port, option:--data-port, and option:--live-port
85 options specify URLs.
86
87 The format of those URLs is:
88
89 [verse]
90 tcp://('HOST' | 'IPADDR'):__PORT__
91
92 with:
93
94 ('HOST' | 'IPADDR')::
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]).
98
99 'PORT'::
100 TCP port.
101
102
103 OPTIONS
104 -------
105 Daemon
106 ~~~~~~
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
110 descriptors.
111
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
115 open.
116
117 option:-g 'GROUP', option:--group='GROUP'::
118 Use 'GROUP' as Unix tracing group (default: `tracing`).
119
120 option:-o 'PATH', option:--output='PATH'::
121 Set base directory of written trace data to 'PATH'.
122 +
123 See the <<output-directory,Output directory>> section above for more
124 information.
125
126 option:-p, option:--group-output-by-host::
127 Organize the output directory by host. Default behavior.
128 +
129 See the <<output-directory,Output directory>> section above for more
130 information.
131
132 option:-s, option:--group-output-by-session::
133 Organize the output directory by session.
134 +
135 See the <<output-directory,Output directory>> section above for more
136 information.
137
138 option:-v, option:--verbose::
139 Increase verbosity.
140 +
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`).
144
145
146 Ports
147 ~~~~~
148 See the <<url-format,URL format>> section above for more information
149 about the syntax of the following options' 'URL' argument.
150
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}+).
154
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}+).
158
159 option:-L 'URL', option:--live-port='URL'::
160 Listen to LTTng live connections on URL 'URL'
161 (default:
162 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
163
164
165 Program information
166 ~~~~~~~~~~~~~~~~~~~
167 option:-h, option:--help::
168 Show help.
169
170 option:-V, option:--version::
171 Show version.
172
173
174 ENVIRONMENT VARIABLES
175 ---------------------
176 `LTTNG_ABORT_ON_ERROR`::
177 Set to 1 to abort the process after the first error is encountered.
178
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).
182
183 `LTTNG_RELAYD_HEALTH`::
184 Path to relay daemon health's socket.
185
186 `LTTNG_RELAYD_TCP_KEEP_ALIVE`::
187 Set to 1 to enable TCP keep-alive.
188 +
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.
192 +
193 Supported on Linux and Solaris only. The default behaviour of the TCP
194 keep-alive mechanism is OS-specific.
195 +
196 Search for `tcp_keepalive` in man:tcp(7) for more information.
197
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.
201 +
202 Set to 0 or -1 to use the value chosen by the operating system (default).
203 +
204 Supported on Solaris 11 only.
205 +
206 Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
207
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.
211 +
212 Set to 0 or -1 to use the value chosen by the operating system (default).
213 +
214 Supported on Linux and Solaris 11 only.
215 +
216 On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
217 +
218 Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
219 in man:tcp(7) on Solaris 11 for more information.
220
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.
224 +
225 Set to 0 or -1 to use the value chosen by the operating system (default).
226 +
227 Supported on Linux only.
228 +
229 Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
230
231 `LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
232 Number of seconds between TCP keep-alive probes.
233 +
234 Set to 0 or -1 to use the value chosen by the operating system (default).
235 +
236 Supported on Linux only.
237 +
238 Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
239
240
241 FILES
242 -----
243 `$LTTNG_HOME/.lttng`::
244 User LTTng runtime and configuration directory.
245
246 `$LTTNG_HOME/lttng-traces`::
247 Default output directory of LTTng traces. This can be overridden
248 with the option:--output option.
249
250 NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
251
252
253 EXIT STATUS
254 -----------
255 *0*::
256 Success
257
258 *1*::
259 Error
260
261 *3*::
262 Fatal error
263
264
265 LIMITATIONS
266 -----------
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.
271
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
275 *ulimit*(3).
276
277
278 include::common-footer.txt[]
279
280
281 SEE ALSO
282 --------
283 man:lttng(1),
284 man:lttng-sessiond(8),
285 man:lttng-crash(1),
286 man:lttng-ust(3),
287 man:babeltrace(1)
This page took 0.035683 seconds and 5 git commands to generate.