'\" t
.\" Title: babeltrace2-source.text.dmesg
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 1 September 2023
.\" Manual: Babeltrace\ \&2 manual
.\" Source: Babeltrace 2.0.6
.\" Language: English
.\"
.TH "BABELTRACE2\-SOURCE\" "7" "1 September 2023" "Babeltrace 2\&.0\&.6" "Babeltrace\ \&2 manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
babeltrace2-source.text.dmesg \- Babeltrace 2\*(Aqs Linux kernel ring buffer source component class
.SH "DESCRIPTION"
.sp
A Babeltrace\ \&2 \fBsource.text.dmesg\fR message iterator reads the lines of a Linux kernel ring buffer, as printed by the \fBdmesg\fR(1) tool, and emits corresponding event messages\&.
.sp
.if n \{\
.RS 4
.\}
.nf
Linux kernel ring buffer
lines (file or standard input)
|
| +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| | src\&.text\&.dmesg |
\*(Aq\-\->| |
| out @\-\-> Messages (single stream)
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.if n \{\
.RE
.\}
.sp
See \fBbabeltrace2-intro\fR(7) to learn more about the Babeltrace\ \&2 project and its core concepts\&.
.sp
A \fBsource.text.dmesg\fR message iterator names the events it creates \fBstring\fR\&. Each event contain a single payload string field named \fBstr\fR which contains the corresponding ring buffer line\&.
.sp
By default, a \fBsource.text.dmesg\fR message iterator reads the lines of the standard input stream\&. You can make the message iterator read the lines of a text file instead with the \fBpath\fR parameter\&.
.sp
By default, the message iterator tries to extract the timestamps of the kernel ring buffer lines and use them as the created events\(cqs timestamps\&. A typical \fBdmesg\fR(1) line looks like this:
.sp
.if n \{\
.RS 4
.\}
.nf
[87166\&.510937] PM: Finishing wakeup\&.
.fi
.if n \{\
.RE
.\}
.sp
The \fB[87166.510937]\fR part is the timestamp to extract\&. When this information is available, the component creates a clock class which does NOT have the Unix epoch as its origin\&.
.sp
You can make the message iterator not extract timestamps from lines with the \fBno-extract-timestamp\fR parameter\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.sp
It is possible that the output of \fBdmesg\fR(1) contains unsorted lines, that is, their timestamps go back in time\&. You can see this with the \fB--show-delta\fR option of \fBdmesg\fR(1): some time differences can be negative\&.
.sp
This is due to a 2019 change (see ) to the kernel\(cqs ring buffer API\&.
.sp
As of this version, a \fBsource.text.dmesg\fR message iterator requires that the input kernel ring buffer lines be sorted by timestamp (when they have timestamps), failing otherwise\&.
.sp .5v
.RE
.SH "INITIALIZATION PARAMETERS"
.PP
\fBno-extract-timestamp\fR=\fIVAL\fR [optional boolean]
.RS 4
If
\fIVAL\fR
is true, then do NOT extract timestamps from the kernel ring buffer lines: set the created event\(cqs payload\(cqs
\fBstr\fR
field to the whole line, including any timestamp prefix\&.
.sp
Default: false\&.
.RE
.PP
\fBpath\fR=\fIPATH\fR [optional string]
.RS 4
Read the kernel ring buffer lines from the file
\fIPATH\fR
instead of the standard input stream\&.
.RE
.SH "PORTS"
.sp
.if n \{\
.RS 4
.\}
.nf
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
| src\&.text\&.dmesg |
| |
| out @
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
.fi
.if n \{\
.RE
.\}
.SS "Output"
.PP
\fBout\fR
.RS 4
Single output port\&.
.RE
.SH "BUGS"
.sp
If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see )\&.
.SH "RESOURCES"
.sp
The Babeltrace project shares some communication channels with the LTTng project (see )\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Babeltrace website (see )
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Mailing list (see )
for support and development:
\fBlttng-dev@lists.lttng.org\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
IRC channel (see ):
\fB#lttng\fR
on
\fBirc.oftc.net\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Bug tracker (see )
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Git repository (see )
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
GitHub project (see )
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Continuous integration (see )
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Code review (see )
.RE
.SH "AUTHORS"
.sp
The Babeltrace\ \&2 project is the result of hard work by many regular developers and occasional contributors\&.
.sp
The current project maintainer is J\('er\('emie Galarneau \&.
.SH "COPYRIGHT"
.sp
This component class is part of the Babeltrace\ \&2 project\&.
.sp
Babeltrace is distributed under the MIT license (see )\&.
.SH "SEE ALSO"
.sp
\fBbabeltrace2-plugin-text\fR(7), \fBbabeltrace2-intro\fR(7)