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