doc/man: make default values of boolean init. params. clearer
[babeltrace.git] / doc / man / babeltrace2-sink.ctf.fs.7.txt
CommitLineData
2facbdc3 1= babeltrace2-sink.ctf.fs(7)
838dd456 2:manpagetype: component class
75daa108 3:revdate: 1 September 2023
838dd456
PP
4
5
2facbdc3
PP
6== NAME
7
8babeltrace2-sink.ctf.fs - Babeltrace 2's file system CTF sink component
838dd456
PP
9class
10
11
2facbdc3
PP
12== DESCRIPTION
13
14A Babeltrace~2 compcls:sink.ctf.fs component writes the messages it
15consumes to one or more https://diamon.org/ctf/[CTF]~1.8 traces on
838dd456
PP
16the file system.
17
2facbdc3
PP
18----
19 +-------------+
20 | sink.ctf.fs |
21 | +--> CTF trace(s) on
22Messages -->@ in | the file system
23 +-------------+
24----
25
26include::common-see-babeltrace2-intro.txt[]
27
28A compcls:sink.ctf.fs component does not merge traces: it writes the
29messages of different input traces to different output traces.
30
31
32=== Special trace IR to CTF translations
33
34A compcls:sink.ctf.fs component makes a best effort to write CTF traces
35that are semantically equivalent to the input traces. As of this
36version, the component writes CTF~1.8 traces, so the following
37field class translations can occur:
38
39* The component translates a boolean field class to a CTF unsigned 8-bit
40 integer field class.
41+
42The unsigned integer field's value is 0 when the boolean field's value
43is false and 1 when the boolean field's value is true.
44
45* The component translates a bit array field to a CTF unsigned
46 integer field class having the same length.
47
48* The component translates an option field class to a CTF variant
49 field class where the options are an empty structure field class
50 and the optional field class itself.
51+
52The empty structure field is selected when the option field has no
53field.
54
55In all the cases above, the component adds a comment in the metadata
56stream, above the field class, to indicate that a special translation
fe5ee428 57occurred.
2facbdc3
PP
58
59
60=== Input message constraints
61
62Because of limitations in CTF~1.8 regarding how discarded events
63and packets are encoded:
64
65* If a stream class supports discarded events and the
66 param:ignore-discarded-events parameter is :not: true:
67
68** The stream class must support packets.
69** Discarded events messages must have times.
70** Any discarded events message must occur between a packet end
71 and a packet beginning message.
72** The beginning time of a discarded events message must be the same
73 as the time of the last packet end message.
74** The end time of a discarded events message must be the same
75 as the time of the next packet end message.
76** Time ranges of discarded events messages must not overlap.
77
78* If a stream class supports discarded packets and the
79 param:ignore-discarded-packets parameter is :not: true:
80
81** The stream class must support packets.
82** Discarded packets messages must have times.
83** The beginning time of a discarded events message must be the same
84 as the time of the last packet end message.
85** The end time of a discarded events message must be the same
86 as the time of the next packet beginning message.
87** Time ranges of discarded packets messages must not overlap.
838dd456 88
2facbdc3
PP
89The messages which a compcls:source.ctf.fs component creates satisfy all
90the requirements above.
838dd456 91
2facbdc3
PP
92If a discarded events or packets message has no events/packets count,
93the compcls:sink.ctf.fs component adds 1 to the corresponding CTF
94stream's counter.
838dd456 95
838dd456 96
2facbdc3 97=== Alignment and byte order
838dd456 98
2facbdc3
PP
99A compcls:sink.ctf.fs component always aligns data fields as such:
100
101Integer fields with a size which is not a multiple of 8::
102 1-bit.
103
104All other scalar fields (integer, enumeration, real, string)::
105 8-bit.
106
107The component writes fields using the machine's native byte order. As of
108this version, there's no way to force a custom byte order.
109
110
111[[output-path]]
112=== Output path
838dd456 113
838dd456 114The path of a CTF trace is the directory which directly contains the
2facbdc3 115metadata and data stream files.
838dd456 116
2facbdc3
PP
117The current strategy to build a path in which to write the streams of
118a given input trace is, in this order:
838dd456 119
2facbdc3
PP
120. If the param:assume-single-trace parameter is true, then the output
121 trace path to use for the single input trace is the directory
122 specified by the param:path parameter.
123
124. If the component recognizes the input trace as an LTTng (2.11 or
125 greater) trace, then it checks specific trace environment values to
126 build a trace path relative to the directory specified by the
127 param:path parameter:
838dd456 128+
2facbdc3
PP
129--
130
131Linux kernel domain::
132+
133[verse]
134__HOST__/__SNAME__-__STIME__/kernel
135
136User space domain, per-UID buffering::
838dd456 137+
2facbdc3
PP
138[verse]
139__HOST__/__SNAME__-__STIME__/ust/uid/__UID__/__ARCHW__-bit
140
141User space domain, per-PID buffering::
142+
143[verse]
144__HOST__/__SNAME__-__STIME__/ust/pid/__PNAME__-__PID__-__PTIME__
145
838dd456 146--
838dd456 147+
2facbdc3 148With:
838dd456 149+
838dd456 150--
2facbdc3
PP
151__HOST__::
152 Target's hostname.
838dd456 153
2facbdc3
PP
154__SNAME__::
155 Tracing session name.
838dd456 156
2facbdc3
PP
157__STIME__::
158 Tracing session creation date/time.
838dd456 159
2facbdc3
PP
160__UID__::
161 User ID.
838dd456 162
2facbdc3
PP
163__ARCHW__::
164 Architecture's width (`32` or `64`).
838dd456 165
2facbdc3
PP
166__PNAME__::
167 Process name.
838dd456 168
2facbdc3
PP
169__PID__::
170 Process ID.
838dd456 171
2facbdc3
PP
172__PTIME__::
173 Process's date/time.
174--
838dd456 175
2facbdc3
PP
176. If the input trace has a name, then the component sanitizes this name
177 and uses it as a relative path to the directory specified by the
178 param:path parameter.
179+
180The trace name sanitization operation:
181+
182* Replaces `.` subdirectories with `_`.
183* Replaces `..` subdirectories with `__`.
184* Removes any trailing `/` character.
838dd456 185
2facbdc3
PP
186. The component uses the subdirectory `trace` relative to the directory
187 specified by the param:path parameter.
838dd456 188
2facbdc3
PP
189In all the cases above, if the effective output trace path already
190exists on the file system, the component appends a numeric suffix to the
191name of the last subdirectory. The suffix starts at 0 and increments
192until the path does not exist.
838dd456 193
838dd456 194
2facbdc3
PP
195== INITIALIZATION PARAMETERS
196
75daa108
PP
197param:assume-single-trace='VAL' vtype:[optional boolean]::
198 If 'VAL' is true, then assume that the component only receives
199 messages related to a single input trace.
2facbdc3
PP
200+
201This parameter affects how the component builds the output trace path
202(see <<output-path,``Output path''>>).
75daa108
PP
203+
204Default: false.
2facbdc3 205
75daa108
PP
206param:ignore-discarded-events='VAL' vtype:[optional boolean]::
207 If 'VAL' is true, then ignore discarded events messages.
208+
209Default: false.
2facbdc3 210
75daa108
PP
211param:ignore-discarded-packets='VAL' vtype:[optional boolean]::
212 If 'VAL' is true, then ignore discarded packets messages.
213+
214Default: false.
2facbdc3
PP
215
216param:path='PATH' vtype:[string]::
217 Base output path.
218+
219See <<output-path,``Output path''>> to learn how the component uses this
220parameter to build the output path for a given input trace.
221
75daa108
PP
222param:quiet='VAL' vtype:[optional boolean]::
223 If 'VAL' is true, then do not write anything to the standard output.
224+
225Default: false.
2facbdc3
PP
226
227
228== PORTS
229
230----
231+-------------+
232| sink.ctf.fs |
233| |
234@ in |
235+-------------+
236----
237
238
239=== Input
240
241`in`::
242 Single input port.
838dd456
PP
243
244
245include::common-footer.txt[]
246
247
2facbdc3
PP
248== SEE ALSO
249
250man:babeltrace2-intro(7),
251man:babeltrace2-plugin-ctf(7)
This page took 0.057698 seconds and 4 git commands to generate.