Backport: Doc: lttng-relayd: --working-directory option
[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]
e0884220 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~~~~~~~~~~~~~~~~
52By default, the relay daemon writes the traces to:
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
68You can override the default output directory prefix
2ff6d569 69(`$LTTNG_HOME/lttng-traces`) with the option:--output option. The other
f5595c32
PP
70parts depend on the remote configuration.
71
72
73[[url-format]]
74URL format
75~~~~~~~~~~
76The option:--control-port, option:--data-port, and option:--live-port
77options specify URLs.
78
79The format of those URLs is:
80
81[verse]
82tcp://('HOST' | 'IPADDR'):__PORT__
83
84with:
85
86('HOST' | 'IPADDR')::
87 Binding hostname or IP address (IPv6 address *must* be enclosed in
88 brackets (`[` and `]`); see
89 https://www.ietf.org/rfc/rfc2732.txt[RFC 2732]).
90
91'PORT'::
92 TCP port.
93
94
95OPTIONS
96-------
97Daemon
98~~~~~~
99option:-b, option:--background::
100 Start as Unix daemon, but keep file descriptors (console) open.
101 Use the option:--daemonize option instead to close the file
102 descriptors.
103
104option:-d, option:--daemonize::
105 Start as Unix daemon, and close file descriptors (console). Use the
106 option:--background option instead to keep the file descriptors
107 open.
108
28f32bdf 109option:-g 'GROUP', option:--group='GROUP'::
f5595c32
PP
110 Use 'GROUP' as Unix tracing group (default: `tracing`).
111
28f32bdf 112option:-o 'PATH', option:--output='PATH'::
f5595c32
PP
113 Set base directory of written trace data to 'PATH'.
114+
115See the <<output-directory,Output directory>> section above for more
116information.
117
e0884220
JR
118option:-w 'PATH', option:--working-directory='PATH'::
119 Set the working directory of the processes this relay daemon creates.
120
f5595c32
PP
121option:-v, option:--verbose::
122 Increase verbosity.
123+
124Three levels of verbosity are available, which are triggered by
125appending additional `v` letters to the option
126(that is, `-vv` and `-vvv`).
127
128
129Ports
130~~~~~
131See the <<url-format,URL format>> section above for more information
132about the syntax of the following options' 'URL' argument.
133
28f32bdf 134option:-C 'URL', option:--control-port='URL'::
c93eadad
PP
135 Listen to control data on URL 'URL' (default:
136 +tcp://{default_network_control_bind_address}:{default_network_control_port}+).
f5595c32 137
28f32bdf 138option:-D 'URL', option:--data-port='URL'::
c93eadad
PP
139 Listen to trace data on URL 'URL' (default:
140 +tcp://{default_network_data_bind_address}:{default_network_data_port}+).
f5595c32 141
28f32bdf 142option:-L 'URL', option:--live-port='URL'::
f5595c32 143 Listen to LTTng live connections on URL 'URL'
c93eadad
PP
144 (default:
145 +tcp://{default_network_viewer_bind_address}:{default_network_viewer_port}+).
f5595c32
PP
146
147
148Program information
149~~~~~~~~~~~~~~~~~~~
150option:-h, option:--help::
151 Show help.
152
153option:-V, option:--version::
154 Show version.
155
156
157ENVIRONMENT VARIABLES
158---------------------
9bbd8e06
MD
159`LTTNG_ABORT_ON_ERROR`::
160 Set to 1 to abort the process after the first error is encountered.
161
f5595c32
PP
162`LTTNG_NETWORK_SOCKET_TIMEOUT`::
163 Socket connection, receive and send timeout (milliseconds). A value
164 of 0 or -1 uses the timeout of the operating system (default).
165
166`LTTNG_RELAYD_HEALTH`::
167 Path to relay daemon health's socket.
168
f5adfb35
JR
169`LTTNG_RELAYD_TCP_KEEP_ALIVE`::
170 Set to 1 to enable TCP keep-alive.
171+
172The TCP keep-alive mechanism allows the detection of dead peers
173(man:lttng-sessiond(8)) in cases of unclean termination
174(for example, a hard reset) of a peer.
175+
176Supported on Linux and Solaris only. The default behaviour of the TCP
177keep-alive mechanism is OS-specific.
178+
179Search for `tcp_keepalive` in man:tcp(7) for more information.
180
181`LTTNG_RELAYD_TCP_KEEP_ALIVE_ABORT_THRESHOLD`::
182 The time threshold in seconds to abort a TCP connection after the keep-alive
183 probing mechanism has failed.
184+
185Set to 0 or -1 to use the value chosen by the operating system (default).
186+
187Supported on Solaris 11 only.
188+
189Search for `tcp_keepalive_abort_threshold` in man:tcp(7) for more information.
190
191`LTTNG_RELAYD_TCP_KEEP_ALIVE_IDLE_TIME`::
192 Number of seconds a connection needs to be idle before TCP begins
193 sending out keep-alive probes.
194+
195Set to 0 or -1 to use the value chosen by the operating system (default).
196+
197Supported on Linux and Solaris 11 only.
198+
199On Solaris{nbsp}11, the accepted values are -1, 0, and 10 to 864000.
200+
201Search for `tcp_keepalive_time` and `tcp_keepalive_interval`
202in man:tcp(7) on Solaris 11 for more information.
203
204`LTTNG_RELAYD_TCP_KEEP_ALIVE_MAX_PROBE_COUNT`::
205 Maximum number of TCP keep-alive probes to send before giving up and
206 killing the connection if no response is obtained from the other end.
207+
208Set to 0 or -1 to use the value chosen by the operating system (default).
209+
210Supported on Linux only.
211+
212Search for `tcp_keepalive_probes` in man:tcp(7) for more information.
213
214`LTTNG_RELAYD_TCP_KEEP_ALIVE_PROBE_INTERVAL`::
215 Number of seconds between TCP keep-alive probes.
216+
217Set to 0 or -1 to use the value chosen by the operating system (default).
218+
219Supported on Linux only.
220+
221Search for `tcp_keepalive_intvl` in man:tcp(7) for more information.
222
f5595c32 223
900690ca
PP
224FILES
225-----
226`$LTTNG_HOME/.lttng`::
227 User LTTng runtime and configuration directory.
228
229`$LTTNG_HOME/lttng-traces`::
230 Default output directory of LTTng traces. This can be overridden
231 with the option:--output option.
232
233NOTE: `$LTTNG_HOME` defaults to `$HOME` when not explicitly set.
234
235
f5595c32
PP
236EXIT STATUS
237-----------
238*0*::
239 Success
240
241*1*::
242 Error
243
244*3*::
245 Fatal error
246
247
248LIMITATIONS
249-----------
250As of this version, only the TCP protocol is supported for both control
251and data ports. In future versions, TCP will remain the sole available
252protocol for control data since those communications are low-volume and
253need absolute reliability; trace data could be carried over UDP.
254
255For an unprivileged user running `lttng-relayd`, the maximum number of
256file descriptors per process is usually 1024. This limits the number of
257connections and opened trace files. This limit can be configured with
258*ulimit*(3).
259
260
261include::common-footer.txt[]
262
263
264SEE ALSO
265--------
7c1a4458
PP
266man:lttng(1),
267man:lttng-sessiond(8),
268man:lttng-crash(1),
269man:lttng-ust(3),
270man:babeltrace(1)
This page took 0.038611 seconds and 5 git commands to generate.