CTF streams on the file system | | +---------------------+ | | src.ctf.fs | | | | '-->| ...5c847 | 0 | 0 @--> Stream 0 messages | ...5c847 | 0 | 1 @--> Stream 1 messages | ...5c847 | 0 | 2 @--> Stream 2 messages +---------------------+
See babeltrace2-intro(7) to learn more about the Babeltrace 2 project and its core concepts.
If the logical CTF trace to handle contains more than one physical CTF trace, then all the physical CTF traces must have a trace UUID and all UUIDs must be the same. Opening more than one physical CTF trace to constitute a single logical CTF trace is needed to support LTTng’s tracing session rotation feature, for example (see lttng-rotate(1) starting from LTTng 2.11).
You specify which physical CTF traces to open and read with the inputs array parameter. Each entry in this array is the path to a physical CTF trace directory, that is, the directory directly containing the stream files.
A source.ctf.fs component does not recurse into directories to find CTF traces. However, the component class provides the babeltrace.support-info query object which indicates whether or not a given directory looks like a CTF trace directory (see “babeltrace.support-info”).
The component creates one output port for each logical CTF data stream. More than one physical CTF data stream file can support a single logical CTF data stream (LTTng’s trace file rotation and tracing session rotation can cause this).
If two or more data stream files contain the same packets, a source.ctf.fs message iterator reads each of them only once so that it never emits duplicated messages. This feature makes it possible, for example, to open overlapping LTTng snapshots (see <https://lttng.org/docs/#doc-taking-a-snapshot>) with a single source.ctf.fs component and silently discard the duplicated packets.
A source.ctf.fs component has special quirk handling for some LTTng (see <https://lttng.org/>) and barectf (see <https://lttng.org/>) traces, depending on the tracer’s version:
All LTTng versions
This is the equivalent of setting the force-clock-class-origin-unix-epoch parameter to true.
This is useful for the traces which lttng-crash(1) generates.
LTTng-UST up to, but excluding, 2.11.0, LTTng-modules up to, but excluding, 2.9.13, LTTng-modules from 2.10.0 to 2.10.9
barectf up to, but excluding, 2.3.1
You can combine this parameter with the clock-class-offset-s parameter.
clock-class-offset-s=SEC [optional signed integer]
You can combine this parameter with the clock-class-offset-ns parameter.
force-clock-class-origin-unix-epoch=yes [optional boolean]
inputs=DIRS [array of strings]
Each element of DIRS is the path to a physical CTF trace directory containing the trace’s stream files.
All the specified physical CTF traces must belong to the same logical CTF trace. See “Input” to learn more about logical and physical CTF traces.
trace-name=NAME [optional string]
+--------------------+ | src.ctf.fs | | | | ...5c847 | 0 | 1 @ | ... @ +--------------------+
Each output port’s name has one of the following forms:
TRACE-ID | STREAM-CLASS-ID | STREAM-ID TRACE-ID | STREAM-ID
The component uses the second form when the stream class ID is not available.
For a directory input which is the path to a CTF trace directory, the result object contains:
You can leverage this query object’s group entry to assemble many physical CTF traces as a single logical CTF trace (see “Input” to learn more about logical and physical CTF traces). This is how the babeltrace2-convert(1) command makes it possible to specify as non-option arguments the paths to multiple physical CTF traces which belong to the same logical CTF trace and create a single source.ctf.fs component.
Result object (map):
The current project maintainer is Jérémie Galarneau <mailto:email@example.com>.
Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>).