table of contents
BABELTRACE2-SINK.(7) | Babeltrace 2 manual | BABELTRACE2-SINK.(7) |
NAME¶
babeltrace2-sink.ctf.fs - Babeltrace 2: File system CTF sink component class
DESCRIPTION¶
A Babeltrace 2 sink.ctf.fs component writes the messages it consumes to one or more CTF (see <https://diamon.org/ctf/>) 1.8 or CTF 2 traces on the file system.
+-------------+
| sink.ctf.fs |
| +--> CTF trace(s) on Messages -->@ in | the file system
+-------------+
See babeltrace2-intro(7) to learn more about the Babeltrace 2 project and its core concepts.
The ctf-version parameter controls the CTF version of the resulting traces.
As of this version, a sink.ctf.fs component may only write:
CTF 1.8 traces
CTF 2 traces
Therefore, the "get supported MIP versions" method of a sink.ctf.fs component class reports to support only MIP 0 with the ctf-version parameter set to 1 and only MIP 1 with ctf-version set to 2.
A sink.ctf.fs component doesn’t merge traces: it writes the messages of different input traces to different output traces.
Trace IR to CTF 1.8 translation¶
A sink.ctf.fs component makes a best effort to write CTF 1.8 traces that are semantically equivalent to the input traces. As of this version, with the ctf-version parameter set to 1, the following field class translations can occur:
The value of the unsigned integer field is 0 when the value of the boolean field is false and 1 when it’s true.
The empty structure field is selected when the option field has no field.
In all the cases above, the component adds a comment in the metadata stream, above the field class, to indicate that a special translation occurred.
The component doesn’t translate any user attribute: a CTF 1.8 metadata stream has no way to represent them.
Trace IR to CTF 2 translation¶
As of this version, with the ctf-version parameter set to 2:
For example, the packet content length member class could be named afe9ed0e-ce73-413f-8956-83663bab2047-content_size.
BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY
BT_EVENT_CLASS_LOG_LEVEL_ALERT
BT_EVENT_CLASS_LOG_LEVEL_CRITICAL
BT_EVENT_CLASS_LOG_LEVEL_ERROR
BT_EVENT_CLASS_LOG_LEVEL_WARNING
BT_EVENT_CLASS_LOG_LEVEL_NOTICE
BT_EVENT_CLASS_LOG_LEVEL_INFO
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION
BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE
BT_EVENT_CLASS_LOG_LEVEL_DEBUG
Input message constraints¶
Because of limitations in CTF regarding how discarded events and packets are encoded:
The messages which a source.ctf.fs component creates satisfy all the requirements above.
If a discarded events or packets message has no events/packets count, then the sink.ctf.fs component adds 1 to the counter of the corresponding CTF stream.
Alignment and byte order¶
A sink.ctf.fs component always aligns data fields as such:
Fixed-length bit array fields with a size which isn’t a multiple of 8
All other scalar fields (fixed-length bit array, null-terminated string, BLOB)
The component writes fields using the native byte order of the machine. As of this version, there’s no way to force a custom byte order.
Output path¶
The path of a CTF trace is the directory which directly contains the metadata and data stream files.
The current strategy to build a path in which to write the streams of a given input trace is, in this order:
Linux kernel domain
HOST/SNAME-STIME/kernel
User space domain, per-UID buffering
HOST/SNAME-STIME/ust/uid/UID/ARCHW-bit
User space domain, per-PID buffering
HOST/SNAME-STIME/ust/pid/PNAME-PID-PTIME
With:
HOST
SNAME
STIME
UID
ARCHW
PNAME
PID
PTIME
The trace name sanitization operation:
In all the cases above, if the effective output trace path already exists on the file system, then the component appends a numeric suffix to the name of the last subdirectory. The suffix starts at 0 and increments until the path doesn’t exist.
INITIALIZATION PARAMETERS¶
assume-single-trace=VAL [optional boolean]
This parameter affects how the component builds the output trace path (see “Output path”).
Default: false.
ctf-version=VERSION [optional string]
1, 1.8
2, 2.0
Default: 2.
ignore-discarded-events=VAL [optional boolean]
Default: false.
ignore-discarded-packets=VAL [optional boolean]
Default: false.
path=PATH [string]
See “Output path” to learn how the component uses this parameter to build the output path for a given input trace.
quiet=VAL [optional boolean]
Default: false.
PORTS¶
+-------------+ | sink.ctf.fs | | | @ in | +-------------+
Input¶
in
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¶
16 October 2024 | Babeltrace 2.1.0 |