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