involving multiple concurrent processes and threads. Tracing across multiple
systems is also possible.
-The relay daemon listens on the network and receives traces streamed by a
-remote consumer. This daemon does not require any particular permissions as
-long as it can write in the output folder and listen on the ports.
-
-Once a trace has been streamed completely, the trace can be processed by any
-tool that can process a local LTTng CTF trace.
+The relay daemon listens by default on all network interfaces to gather
+trace data, but only on localhost for viewer connections. This daemon
+does not require any particular permissions as long as it can write in
+the output folder and listen on the ports. If a user is within a secured
+network and/or has proper firewall settings, lttng-relayd can listen to
+viewer connections from all network interfaces by specifying '-L
+tcp://0.0.0.0:5344'.
+
+Traces can be either viewed "live" (as they are produced) by attaching
+to the live viewer port using LTTng live protocol, or after tracing has
+been stopped. Once a trace has been streamed completely, the trace can
+be processed by any tool that can process a local LTTng CTF trace.
By default, the relayd outputs the traces in :
~/lttng-traces/hostname/session-name/domain-name
Data port URL (tcp://0.0.0.0:5343 is the default)
.TP
.BR "-L, --live-port URL"
-Live view port URL (tcp://0.0.0.0:5344 is the default).
+Live view port URL (tcp://localhost:5344 is the default).
.TP
.BR "-o, --output"
Output base directory. Must use an absolute path (~/lttng-traces is the default)
/* assign default values */
if (control_uri == NULL) {
- ret = asprintf(&default_address, "tcp://0.0.0.0:%d",
- DEFAULT_NETWORK_CONTROL_PORT);
+ ret = asprintf(&default_address,
+ "tcp://" DEFAULT_NETWORK_CONTROL_BIND_ADDRESS ":%d",
+ DEFAULT_NETWORK_CONTROL_PORT);
if (ret < 0) {
PERROR("asprintf default data address");
goto exit;
}
}
if (data_uri == NULL) {
- ret = asprintf(&default_address, "tcp://0.0.0.0:%d",
- DEFAULT_NETWORK_DATA_PORT);
+ ret = asprintf(&default_address,
+ "tcp://" DEFAULT_NETWORK_DATA_BIND_ADDRESS ":%d",
+ DEFAULT_NETWORK_DATA_PORT);
if (ret < 0) {
PERROR("asprintf default data address");
goto exit;
}
}
if (live_uri == NULL) {
- ret = asprintf(&default_address, "tcp://0.0.0.0:%d",
- DEFAULT_NETWORK_VIEWER_PORT);
+ ret = asprintf(&default_address,
+ "tcp://" DEFAULT_NETWORK_VIEWER_BIND_ADDRESS ":%d",
+ DEFAULT_NETWORK_VIEWER_PORT);
if (ret < 0) {
PERROR("asprintf default viewer control address");
goto exit;
* can let the user define a custom one. However, localhost is ALWAYS the
* default listening address.
*/
-static const char *default_reg_uri = "tcp://localhost";
+static const char *default_reg_uri =
+ "tcp://" DEFAULT_NETWORK_VIEWER_BIND_ADDRESS;
/*
* Update JUL application using the given socket. This is done just after
*/
#define DEFAULT_SEM_WAIT_TIMEOUT 30 /* in seconds */
-/* Default network ports for trace streaming support */
+/* Default bind addresses for network services. */
+#define DEFAULT_NETWORK_CONTROL_BIND_ADDRESS "0.0.0.0"
+#define DEFAULT_NETWORK_DATA_BIND_ADDRESS "0.0.0.0"
+#define DEFAULT_NETWORK_VIEWER_BIND_ADDRESS "localhost"
+#define DEFAULT_JUL_BIND_ADDRESS "localhost"
+
+/* Default network ports for trace streaming support. */
#define DEFAULT_NETWORK_CONTROL_PORT 5342
#define DEFAULT_NETWORK_DATA_PORT 5343
#define DEFAULT_NETWORK_VIEWER_PORT 5344