doc/man: make default values of boolean init. params. clearer
[babeltrace.git] / doc / man / babeltrace2-source.ctf.fs.7.txt
CommitLineData
2facbdc3 1= babeltrace2-source.ctf.fs(7)
838dd456 2:manpagetype: component class
75daa108 3:revdate: 1 September 2023
838dd456
PP
4
5
2facbdc3
PP
6== NAME
7
8babeltrace2-source.ctf.fs - Babeltrace 2's file system CTF source
838dd456
PP
9component class
10
11
2facbdc3 12== DESCRIPTION
838dd456 13
2facbdc3
PP
14A Babeltrace~2 compcls:source.ctf.fs message iterator reads one or
15more https://diamon.org/ctf/[CTF]~1.8 streams on the file system
16and emits corresponding messages.
838dd456 17
2facbdc3
PP
18----
19CTF streams on
20the file system
21 |
22 | +---------------------+
23 | | src.ctf.fs |
24 | | |
25 '-->| ...5c847 | 0 | 0 @--> Stream 0 messages
26 | ...5c847 | 0 | 1 @--> Stream 1 messages
27 | ...5c847 | 0 | 2 @--> Stream 2 messages
28 +---------------------+
29----
838dd456 30
2facbdc3 31include::common-see-babeltrace2-intro.txt[]
838dd456 32
838dd456 33
2facbdc3
PP
34[[input]]
35=== Input
838dd456 36
2facbdc3
PP
37A compcls:source.ctf.fs component opens a single _logical_ CTF trace. A
38logical CTF trace contains one or more _physical_ CTF traces. A physical
39CTF trace on the file system is a directory which contains:
838dd456 40
2facbdc3
PP
41* One metadata stream file named `metadata`.
42* One or more data stream files, that is, any file with a name that does
43 not start with `.` and which is not `metadata`.
44* **Optional**: One https://lttng.org/[LTTng] index directory named
45 `index`.
838dd456 46
2facbdc3
PP
47If the logical CTF trace to handle contains more than one physical CTF
48trace, then all the physical CTF traces must have a trace UUID and all
49UUIDs must be the same. Opening more than one physical CTF trace to
50constitute a single logical CTF trace is needed to support LTTng's
51tracing session rotation feature, for example (see man:lttng-rotate(1)
52starting from LTTng~2.11).
838dd456 53
2facbdc3
PP
54You specify which physical CTF traces to open and read with the
55param:inputs array parameter. Each entry in this array is the path to a
56physical CTF trace directory, that is, the directory directly containing
57the stream files.
838dd456 58
2facbdc3
PP
59A compcls:source.ctf.fs component does not recurse into directories to
60find CTF traces. However, the component class provides the
61`babeltrace.support-info` query object which indicates whether or not a
62given directory looks like a CTF trace directory (see
63<<support-info,```babeltrace.support-info`''>>).
838dd456 64
2facbdc3
PP
65The component creates one output port for each logical CTF data stream.
66More than one physical CTF data stream file can support a single logical
67CTF data stream (LTTng's trace file rotation and tracing session
68rotation can cause this).
838dd456 69
e3db68eb
PP
70If two or more data stream files contain the same packets, a
71compcls:source.ctf.fs message iterator reads each of them only once so
72that it never emits duplicated messages. This feature makes it possible,
73for example, to open overlapping
74https://lttng.org/docs/#doc-taking-a-snapshot[LTTng snapshots] with a
75single compcls:source.ctf.fs component and silently discard the
76duplicated packets.
77
838dd456 78
2facbdc3 79=== Trace quirks
838dd456 80
2facbdc3
PP
81Many tracers produce CTF traces. A compcls:source.ctf.fs component makes
82some effort to support as many CTF traces as possible, even those with
83malformed streams.
838dd456 84
2facbdc3 85Generally:
838dd456 86
2facbdc3
PP
87* If the `timestamp_begin` or `timestamp_end` packet context field class
88 exists, but it is not mapped to a clock class, and there's only one
89 clock class at this point in the metadata stream, the component maps
90 the field class to this unique clock class.
838dd456 91
2facbdc3
PP
92A compcls:source.ctf.fs component has special quirk handling for some
93https://lttng.org/[LTTng] and https://lttng.org/[barectf] traces,
94depending on the tracer's version:
838dd456 95
2facbdc3
PP
96All LTTng versions::
97+
98--
99* The component sets the `monotonic` clock class's origin to the Unix
100 epoch so that different LTTng traces are always correlatable.
101+
102This is the equivalent of setting the
103param:force-clock-class-origin-unix-epoch parameter to true.
838dd456 104
2facbdc3
PP
105* For a given data stream, for all the contiguous last packets of which
106 the `timestamp_end` context field is 0, the message iterator uses the
107 packet's last event record's time as the packet end message's time.
108+
109This is useful for the traces which man:lttng-crash(1) generates.
110--
111
112LTTng-UST up to, but excluding, 2.11.0::
113LTTng-modules up to, but excluding, 2.9.13::
114LTTng-modules from 2.10.0 to 2.10.9::
115+
116--
117* For a given packet, the message iterator uses the packet's last
118 event record's time as the packet end message's time, ignoring the
119 packet context's `timestamp_end` field.
120--
121
122barectf up to, but excluding, 2.3.1::
123+
124--
125* For a given packet, the message iterator uses the packet's first event
126 record's time as the packet beginning message's time, ignoring the
127 packet context's `timestamp_begin` field.
128--
838dd456
PP
129
130
2facbdc3 131== INITIALIZATION PARAMETERS
838dd456 132
2facbdc3
PP
133param:clock-class-offset-ns='NS' vtype:[optional signed integer]::
134 Add 'NS' nanoseconds to the offset of all the clock classes that the
135 component creates.
838dd456
PP
136+
137You can combine this parameter with the param:clock-class-offset-s
138parameter.
139
2facbdc3
PP
140param:clock-class-offset-s='SEC' vtype:[optional signed integer]::
141 Add 'SEC' seconds to the offset of all the clock classes that the
142 component creates.
838dd456
PP
143+
144You can combine this parameter with the param:clock-class-offset-ns
145parameter.
146
75daa108
PP
147param:force-clock-class-origin-unix-epoch='VAL' vtype:[optional boolean]::
148 If 'VAL' is true, then force the origin of all clock classes that
149 the component creates to have a Unix epoch origin, whatever the
150 detected tracer.
151+
152Default: false.
838dd456 153
2facbdc3
PP
154param:inputs='DIRS' vtype:[array of strings]::
155 Open and read the physical CTF traces located in 'DIRS'.
156+
157Each element of 'DIRS' is the path to a physical CTF trace directory
158containing the trace's stream files.
159+
160All the specified physical CTF traces must belong to the same logical
161CTF trace. See <<input,``Input''>> to learn more about logical and
162physical CTF traces.
838dd456 163
2facbdc3
PP
164param:trace-name='NAME' vtype:[optional string]::
165 Set the name of the trace object that the component creates to
166 'NAME'.
838dd456
PP
167
168
2facbdc3 169== PORTS
838dd456 170
2facbdc3
PP
171----
172+--------------------+
173| src.ctf.fs |
174| |
175| ...5c847 | 0 | 1 @
176| ... @
177+--------------------+
178----
838dd456 179
838dd456 180
2facbdc3 181=== Output
838dd456 182
2facbdc3
PP
183A compcls:source.ctf.fs component creates one output port for each
184logical CTF data stream. See <<input,``Input''>> to learn more about
185logical and physical CTF data streams.
838dd456 186
2facbdc3 187Each output port's name has one of the following forms:
838dd456 188
2facbdc3
PP
189[verse]
190__TRACE-ID__ | __STREAM-CLASS-ID__ | __STREAM-ID__
191__TRACE-ID__ | __STREAM-ID__
838dd456 192
2facbdc3
PP
193The component uses the second form when the stream class ID is not
194available.
838dd456 195
2facbdc3
PP
196__TRACE-ID__::
197 Trace's UUID if available, otherwise trace's absolute directory
198 path.
838dd456 199
2facbdc3
PP
200__STREAM-CLASS-ID__::
201 Stream class ID.
838dd456 202
2facbdc3
PP
203__STREAM-ID__::
204 Stream ID if available, otherwise stream's absolute file path.
838dd456 205
838dd456 206
2facbdc3
PP
207[[query-objs]]
208== QUERY OBJECTS
838dd456 209
2facbdc3
PP
210[[support-info]]
211=== `babeltrace.support-info`
838dd456 212
2facbdc3
PP
213See man:babeltrace2-query-babeltrace.support-info(7) to learn more
214about this query object.
838dd456 215
2facbdc3
PP
216For a directory input which is the path to a CTF trace directory,
217the result object contains:
838dd456 218
2facbdc3
PP
219nlqres:weight::
220 0.75
838dd456 221
2facbdc3
PP
222nlqres:group::
223 Trace's UUID if available, otherwise the entry does not exist.
838dd456 224
2facbdc3
PP
225You can leverage this query object's nlqres:group entry to assemble many
226physical CTF traces as a single logical CTF trace (see
227<<input,``Input''>> to learn more about logical and physical CTF
228traces). This is how the man:babeltrace2-convert(1) command makes it
229possible to specify as non-option arguments the paths to multiple
230physical CTF traces which belong to the same logical CTF trace and
231create a single compcls:source.ctf.fs component.
838dd456 232
838dd456 233
2facbdc3 234=== `babeltrace.trace-infos`
838dd456 235
2facbdc3
PP
236See man:babeltrace2-query-babeltrace.trace-infos(7) to learn more
237about this query object.
238
239
240=== `metadata-info`
241
242You can query the `metadata-info` object for a specific CTF trace to get
243its plain text metadata stream as well as whether or not it is
244packetized.
838dd456 245
2facbdc3
PP
246Parameters:
247
248nlparam:path='PATH' vtype:[string]::
249 Path to the physical CTF trace directory which contains the
250 `metadata` file.
838dd456 251
2facbdc3 252Result object (map):
838dd456 253
2facbdc3
PP
254qres:is-packetized vtype:[boolean]::
255 True if the metadata stream file is packetized.
838dd456 256
2facbdc3
PP
257qres:text vtype:[string]::
258 Plain text metadata stream.
838dd456
PP
259
260
261include::common-footer.txt[]
262
263
2facbdc3
PP
264== SEE ALSO
265
266man:babeltrace2-intro(7),
c1f82f3b 267man:babeltrace2-plugin-ctf(7),
2facbdc3 268man:lttng-crash(1)
This page took 0.056535 seconds and 4 git commands to generate.