BABELTRACE2-SOURCE.CTF.LTTNG-LIVE(7)
β¨ babeltrace2-source.ctf.lttng-live β¨
okay bestie, welcome to the BABELTRACE2-SOURCE manual section π this is where we talk about the Babeltrace 2 source.ctf.lttng-live component class, and honestly? it's giving main character energy for anyone who wants live trace data without waiting around. let's get into it π«Ά
πΈ NAME πΈ
babeltrace2-source.ctf.lttng-live β the Babeltrace 2 LTTng live source component class π
π¦ DESCRIPTION π¦
A Babeltrace 2 source.ctf.lttng-live message iterator rolls up to a local or remote LTTng relay daemon (peep <https://lttng.org/> if you've never met it), receives the streams of one specific tracing session, and emits the corresponding messages. that's the whole vibe β¨
CTF streams over
LTTng live (TCP)
|
| +--------------------+
| | src.ctf.lttng-live |
'-->| |
| out @--> Sorted messages of one
+--------------------+ or more streams
want the full lore on LTTng live? it lives in the LTTng Documentation at <https://lttng.org/docs/#doc-lttng-live> π
and if you wanna actually understand the Babeltrace 2 project and its core concepts, go read babeltrace2-intro(7) β it's the prerequisite, no cap.
A source.ctf.lttng-live component has exactly one output port: its message iterator muxes (aka sorts) the messages from all the various CTF data streams internally. so you get the tidy version, not the chaos version π
A source.ctf.lttng-live message iterator handles the messages of one, and only one LTTng tracing session. and a single LTTng tracing session can contain one or more traces, depending on the active tracing domains and the configured user space buffering scheme. so like, one session, but potentially many traces inside it π
The component connects to an LTTng relay daemon using the inputs parameter. that parameter is an array of exactly one string, and that string is the URL of the LTTng relay daemon you're connecting to. periodt.
By default, if the remote tracing session name doesn't exist, the message iterator returns "try again later". and this default mode means the message iterator never ends β even if the remote tracing session gets destroyed, it just keeps on waiting for a tracing session with the same name to exist π like it will literally wait forever. if you want different behaviour, change it 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. it's not us being gatekeepy, it's the protocol.
As of this version, a source.ctf.lttng-live component can connect to an LTTng relay daemon using the LTTng 2.4 or LTTng 2.15 protocol. the 2.15 one is required for CTF 2 support (see <https://diamon.org/ctf/>) β¨
The "get supported MIP versions" method of source.ctf.lttng-live always reports that it supports MIP versions 0 and 1. but heads up: if you attempt to make a source.ctf.lttng-live component read a CTF 2 recording session within a trace processing graph configured with MIP 0, then the message iterator will fail at initialization or "next" method call time. consider yourself warned bestie π«
π INITIALIZATION PARAMETERS π
inputs=URL[array of one string] β UseURLto connect to the LTTng relay daemon.
URL is an array of exactly one string, and its format is:
net[4]://RDHOST[:RDPORT]/host/TGTHOST/SESSION
RDHOSTβ Host name or IP address of the LTTng relay daemon.RDPORTβ Listening port of the LTTng relay daemon. If not specified, then the component uses the default port (5344).TGTHOSTβ Target host name or IP address.SESSIONβ Name of the LTTng tracing session from which to receive data.
session-not-found-action=(continue | fail | end)[optional string] β When the message iterator doesn't find the specified remote tracing session (that's theSESSIONpart of theinputsparameter), do one of these:continue(default) β Keep on trying, returning "try again later" to the downstream user until the tracing session exists. With this action, the message iterator never ends, as the LTTng live protocol cannot currently indicate that a tracing session will never exist. it's giving eternal optimism π―οΈfailβ Fail. that's it. that's the action πendβ End. also that's it πΈ
π PORTS π
+--------------------+
| src.ctf.lttng-live |
| |
| out @
+--------------------+
Output
outβ Single output port. just the one. the one and only π
π§ 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. yes, very specific, we love a precise number β¨
sessions
You can query the sessions object to get a list of available LTTng tracing sessions for a given LTTng relay daemon URL. it's literally the guest list ποΈ
Parameters:
url=URL[string] β UseURLto connect to the LTTng relay daemon.
The format of URL is:
net[4]://RDHOST[:RDPORT]
RDHOSTβ Host name or IP address of the LTTng relay daemon.RDPORTβ Listening port of the LTTng relay daemon. If not specified, then the query operation uses the default port (5344).
Result object (array of maps, one element for each available tracing session):
client-count[unsigned integer] β Current number of LTTng live clients connected to the relay daemon to receive data from this tracing session.session-name[string] β Tracing session name.stream-count[unsigned integer] β Current number of CTF streams in this tracing sessions, including the metadata streams.target-hostname[string] β Hostname of the tracing session. This isn't necessarily the hostname of the relay daemon. so like, don't assume, okay? πtimer-us[unsigned integer] β Configured period (Β΅s) of the live timer of the tracing session (seelttng-create(1)).trace-format[string] β Format of the trace(s) of the tracing session amongst:ctf-1.8β CTF 1.8 (see <https://diamon.org/ctf/v1.8.3/>)ctf-2.0β CTF 2 (see <https://diamon.org/ctf/>)
url[string] β URL to use as the first element of theinputsparameter to connect to the same LTTng relay daemon and receive data from this tracing session. it's the plug-and-play link, iconic π
π BUGS π
If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace>). we wanna know, fr fr π«Ά
πΈ RESOURCES πΈ
The Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/>).
- Babeltrace website (see <https://babeltrace.org/>)
- Mailing list (see <https://lists.lttng.org>) for support and development:
lttng-dev@lists.lttng.org - IRC channel (see <irc://irc.oftc.net/lttng>):
#lttngonirc.oftc.net - Bug tracker (see <https://bugs.lttng.org/projects/babeltrace>)
- Git repository (see <https://git.efficios.com/?p=babeltrace.git>)
- GitHub project (see <https://github.com/efficios/babeltrace>)
- Continuous integration (see <https://ci.lttng.org/view/Babeltrace/>)
- Code review (see <https://review.lttng.org/q/project:babeltrace>)
come hang out, the community is lowkey adorable π
π AUTHORS π
The Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors. shoutout to every single one of them, genuinely π«Ά
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)
okay that's the whole page bestie, you're officially fluent in source.ctf.lttng-live π
this was the BABELTRACE2-SOURCE manual section, and that's a wrap β slay, go connect to a relay daemon, and remember: the message iterator never ends unless you tell it to β¨π¦π
π¦ where this page comes from
- fedora 43: babeltrace2 2.1.2-3.fc43 Β· MIT AND GPL-2.0-only
- fedora 44: babeltrace2 2.1.2-5.fc44 Β· MIT AND GPL-2.0-only
- nixos 26.05: babeltrace2 2.1.2
- nixpkgs unstable: babeltrace2 2.1.2
- ubuntu resolute: babeltrace2 2.1.2-1build2 Β· MIT
- ubuntu stonking: babeltrace2 2.1.2-1build2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms