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