1BABELTRACE2-SOURCE() BABELTRACE2-SOURCE()
2
3
4
6 babeltrace2-source.text.dmesg - Babeltrace 2's Linux kernel ring buffer
7 source component class
8
10 A Babeltrace 2 source.text.dmesg message iterator reads the lines of a
11 Linux kernel ring buffer, as printed by the dmesg(1) tool, and emits
12 corresponding event messages.
13
14 Linux kernel ring buffer
15 lines (file or standard input)
16 |
17 | +----------------+
18 | | src.text.dmesg |
19 '-->| |
20 | out @--> Messages (single stream)
21 +----------------+
22
23 See babeltrace2-intro(7) to learn more about the Babeltrace 2 project
24 and its core concepts.
25
26 A source.text.dmesg message iterator names the events it creates
27 string. Each event contain a single payload string field named str
28 which contains the corresponding ring buffer line.
29
30 By default, a source.text.dmesg message iterator reads the lines of the
31 standard input stream. You can make the message iterator read the lines
32 of a text file instead with the path parameter.
33
34 By default, the message iterator tries to extract the timestamps of the
35 kernel ring buffer lines and use them as the created events’s
36 timestamps. A typical dmesg(1) line looks like this:
37
38 [87166.510937] PM: Finishing wakeup.
39
40 The [87166.510937] part is the timestamp to extract. When this
41 information is available, the component creates a clock class which
42 does NOT have the Unix epoch as its origin.
43
44 You can make the message iterator not extract timestamps from lines
45 with the no-extract-timestamp parameter.
46
47 Note
48 It is possible that the output of dmesg(1) contains unsorted lines,
49 that is, their timestamps go back in time. You can see this with
50 the --show-delta option of dmesg(1): some time differences can be
51 negative.
52
53 This is due to a 2019 change (see
54 <https://lwn.net/Articles/780556/>) to the kernel’s ring buffer
55 API.
56
57 As of this version, a source.text.dmesg message iterator requires
58 that the input kernel ring buffer lines be sorted by timestamp
59 (when they have timestamps), failing otherwise.
60
62 no-extract-timestamp=yes [optional boolean]
63 Do NOT extract timestamps from the kernel ring buffer lines: set
64 the created event’s payload’s str field to the whole line,
65 including any timestamp prefix.
66
67 path=PATH [optional string]
68 Read the kernel ring buffer lines from the file PATH instead of the
69 standard input stream.
70
72 +----------------+
73 | src.text.dmesg |
74 | |
75 | out @
76 +----------------+
77
78 Output
79 out
80 Single output port.
81
83 If you encounter any issue or usability problem, please report it on
84 the Babeltrace bug tracker (see
85 <https://bugs.lttng.org/projects/babeltrace>).
86
88 The Babeltrace project shares some communication channels with the
89 LTTng project (see <https://lttng.org/>).
90
91 • Babeltrace website (see <https://babeltrace.org/>)
92
93 • Mailing list (see <https://lists.lttng.org>) for support and
94 development: lttng-dev@lists.lttng.org
95
96 • IRC channel (see <irc://irc.oftc.net/lttng>): #lttng on
97 irc.oftc.net
98
99 • Bug tracker (see <https://bugs.lttng.org/projects/babeltrace>)
100
101 • Git repository (see <https://git.efficios.com/?p=babeltrace.git>)
102
103 • GitHub project (see <https://github.com/efficios/babeltrace>)
104
105 • Continuous integration (see
106 <https://ci.lttng.org/view/Babeltrace/>)
107
108 • Code review (see <https://review.lttng.org/q/project:babeltrace>)
109
111 The Babeltrace 2 project is the result of hard work by many regular
112 developers and occasional contributors.
113
114 The current project maintainer is Jérémie Galarneau
115 <mailto:jeremie.galarneau@efficios.com>.
116
118 This component class is part of the Babeltrace 2 project.
119
120 Babeltrace is distributed under the MIT license (see
121 <https://opensource.org/licenses/MIT>).
122
124 babeltrace2-plugin-text(7), babeltrace2-intro(7)
125
126
127
128 BABELTRACE2-SOURCE()