doc/man: make default values of boolean init. params. clearer
[babeltrace.git] / doc / man / babeltrace2-source.text.dmesg.7.txt
CommitLineData
2facbdc3 1= babeltrace2-source.text.dmesg(7)
838dd456 2:manpagetype: component class
75daa108 3:revdate: 1 September 2023
838dd456
PP
4
5
2facbdc3
PP
6== NAME
7
8babeltrace2-source.text.dmesg - Babeltrace 2's Linux kernel ring buffer
838dd456
PP
9source component class
10
11
2facbdc3
PP
12== DESCRIPTION
13
14A Babeltrace~2 compcls:source.text.dmesg message iterator reads the
838dd456 15lines of a Linux kernel ring buffer, as printed by the man:dmesg(1)
2facbdc3
PP
16tool, and emits corresponding event messages.
17
18----
19Linux kernel ring buffer
20lines (file or standard input)
21 |
22 | +----------------+
23 | | src.text.dmesg |
24 '-->| |
25 | out @--> Messages (single stream)
26 +----------------+
27----
838dd456 28
2facbdc3 29include::common-see-babeltrace2-intro.txt[]
838dd456 30
2facbdc3
PP
31A compcls:source.text.dmesg message iterator names the events it creates
32`string`. Each event contain a single payload string field named `str`
33which contains the corresponding ring buffer line.
838dd456 34
2facbdc3
PP
35By default, a compcls:source.text.dmesg message iterator reads the lines
36of the standard input stream. You can make the message iterator read the
37lines of a text file instead with the param:path parameter.
38
39By default, the message iterator tries to extract the timestamps of the
40kernel ring buffer lines and use them as the created events's
41timestamps. A typical man:dmesg(1) line looks like this:
838dd456
PP
42
43----
44[87166.510937] PM: Finishing wakeup.
45----
46
2facbdc3
PP
47The `[87166.510937]` part is the timestamp to extract. When this
48information is available, the component creates a clock class which does
49:not: have the Unix epoch as its origin.
50
51You can make the message iterator not extract timestamps from lines with
52the param:no-extract-timestamp parameter.
838dd456 53
2facbdc3
PP
54[NOTE]
55====
56It is possible that the output of man:dmesg(1) contains unsorted lines,
57that is, their timestamps go back in time. You can see this with the
58nlopt:--show-delta option of man:dmesg(1): some time differences can be
59negative.
838dd456 60
2facbdc3
PP
61This is due to a https://lwn.net/Articles/780556/[2019 change] to the
62kernel's ring buffer API.
838dd456 63
2facbdc3
PP
64As of this version, a compcls:source.text.dmesg message iterator
65requires that the input kernel ring buffer lines be sorted by timestamp
66(when they have timestamps), failing otherwise.
67====
68
69
70== INITIALIZATION PARAMETERS
71
75daa108
PP
72param:no-extract-timestamp='VAL' vtype:[optional boolean]::
73 If 'VAL' is true, then do :not: extract timestamps from the kernel
74 ring buffer lines: set the created event's payload's `str` field to
75 the whole line, including any timestamp prefix.
76+
77Default: false.
838dd456 78
2facbdc3 79param:path='PATH' vtype:[optional string]::
838dd456
PP
80 Read the kernel ring buffer lines from the file 'PATH' instead of
81 the standard input stream.
82
83
2facbdc3 84== PORTS
838dd456 85
2facbdc3
PP
86----
87+----------------+
88| src.text.dmesg |
89| |
90| out @
91+----------------+
92----
838dd456 93
838dd456 94
2facbdc3 95=== Output
838dd456 96
2facbdc3
PP
97`out`::
98 Single output port.
838dd456
PP
99
100
101include::common-footer.txt[]
102
103
2facbdc3
PP
104== SEE ALSO
105
c1f82f3b
MJ
106man:babeltrace2-plugin-text(7),
107man:babeltrace2-intro(7)
This page took 0.048641 seconds and 4 git commands to generate.