table of contents
BABELTRACE2-SOURCE() | BABELTRACE2-SOURCE() |
NAME¶
babeltrace2-source.ctf.lttng-live - Babeltrace 2's LTTng live source component class
DESCRIPTION¶
A Babeltrace 2 source.ctf.lttng-live message iterator connects to a local or remote LTTng (see <https://lttng.org/>) relay daemon, receives the streams of a specific tracing session, and emits corresponding messages.
CTF streams over LTTng live (TCP)
|
| +--------------------+
| | src.ctf.lttng-live |
'-->| |
| out @--> Sorted messages of one
+--------------------+ or more streams
More information about LTTng live is available in the LTTng Documentation (see <https://lttng.org/docs/#doc-lttng-live>).
See babeltrace2-intro(7) to learn more about the Babeltrace 2 project and its core concepts.
A source.ctf.lttng-live component has a single output port: its message iterator muxes (sorts) the messages from the various CTF data streams internally.
A source.ctf.lttng-live message iterator handles the messages of one, and only one LTTng tracing session. A single LTTng tracing session can contain one or more traces, depending on the active tracing domains and the configured user space buffering scheme.
The component connects to an LTTng relay daemon using the inputs parameter. This is an array of exactly one string which is the URL of the LTTng relay daemon to connect to.
By default, if the remote tracing session name does not exist, the message iterator returns "try again later". This default mode makes the message iterator never end: even if the remote tracing session is destroyed, the message iterator keeps on waiting for a tracing session with the same name to exist. You can change this behaviour with the session-not-found-action initialization parameter.
Note
As of this version, you can only create one message iterator per source.ctf.lttng-live component. This is because the LTTng live protocol accepts at most one client per tracing session per LTTng relay daemon.
INITIALIZATION PARAMETERS¶
inputs=URL [array of one string]
URL is an array of exactly one string of which the format is:
net[4]://RDHOST[:RDPORT]/host/TGTHOST/SESSION
RDHOST
RDPORT
If not specified, the component uses the default port (5344).
TGTHOST
SESSION
session-not-found-action=(continue | fail | end) [optional string]
continue (default)
With this action, the message iterator never ends, as the LTTng live protocol cannot currently indicate that a tracing session will never exist.
fail
end
PORTS¶
+--------------------+ | src.ctf.lttng-live | | | | out @ +--------------------+
Output¶
out
QUERY OBJECTS¶
babeltrace.support-info¶
See babeltrace2-query-babeltrace.support-info(7) to learn more about this query object.
For a string input which honors the LTTng live URL format (see the inputs parameter), the result object is 0.75.
sessions¶
You can query the sessions object to get a list of available LTTng tracing sessions for a given LTTng relay daemon URL.
Parameters:
url=URL [string]
The format of URL is:
net[4]://RDHOST[:RDPORT]
RDHOST
RDPORT
If not specified, the query operation uses the default port (5344).
Result object (array of maps, one element for each available tracing session):
client-count [unsigned integer]
session-name [string]
stream-count [unsigned integer]
target-hostname [string]
This is not necessarily the relay daemon’s hostname.
timer-us [unsigned integer]
url [string]
BUGS¶
If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace>).
RESOURCES¶
The Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/>).
AUTHORS¶
The Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors.
The current project maintainer is Jérémie Galarneau <mailto:jeremie.galarneau@efficios.com>.
COPYRIGHT¶
This component class is part of the Babeltrace 2 project.
Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>).
SEE ALSO¶
babeltrace2-intro(7), babeltrace2-plugin-ctf(7), lttng-relayd(8), lttng-create(1)