BABELTRACE2-SOURCE.TEXT.DMESG(7)

πŸ“¦
version 2.1.2 Β· 6 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu resolute, ubuntu stonking

✨ babeltrace2-source.text.dmesg β€” the manual page, but make it make sense ✨

okay bestie, pull up a chair 🫢 you're reading babeltrace2-source.text.dmesg(7) β€” the manual for the Babeltrace 2: Linux kernel ring buffer source component class. yes the name is long. yes it's iconic. let's go πŸ’…


🌸 NAME 🌸

babeltrace2-source.text.dmesg β€” Babeltrace 2: Linux kernel ring buffer source component class 🐧✨


πŸ’– DESCRIPTION πŸ’–

So. A Babeltrace 2 source.text.dmesg message iterator reads the lines of a Linux kernel ring buffer β€” like, the exact stuff dmesg(1) prints out β€” and then it emits corresponding event messages for each one. it's giving translator. it's giving pipeline girlie πŸ’«

Linux kernel ring buffer
lines (file or standard input)
  |
  |   +----------------+
  |   | src.text.dmesg |
  '-->|                |
      |            out @--> Messages (single stream)
      +----------------+

(that diagram is sacred, don't touch it πŸ”₯)

Wanna know more about the Babeltrace 2 project and its core concepts? go read babeltrace2-intro(7). it's the lore, fr fr πŸ“š

A source.text.dmesg message iterator names the events it creates string. And every single event contains one (1) payload string field called str, which holds the corresponding ring buffer line. that's it. that's the payload. no cap πŸŽ€

By default, a source.text.dmesg message iterator reads the lines from the standard input stream. but you can make it read the lines of a text file instead β€” just use the path parameter. easy πŸ’…

By default, the message iterator tries to extract the timestamps of the kernel ring buffer lines and uses them as the timestamps of the created events. a typical dmesg(1) line looks like this:

[87166.510937] PM: Finishing wakeup.

and the [87166.510937] part? that's the timestamp to extract, bestie πŸ‘‘ When this information is available, the component creates a clock class which does NOT have the Unix epoch as its origin. i repeat: NOT the Unix epoch. put that in your notes πŸ“

You can make the message iterator not extract timestamps from lines with the no-extract-timestamp parameter. your call, your vibe 🌈

Note πŸ™ˆ It's possible that the output of dmesg(1) contains unsorted lines β€” meaning their timestamps go back in time. literally time travel. you can see this with the --show-delta option of dmesg(1): some time differences can be negative 😭 This is due to a 2019 change (see <https://lwn.net/Articles/780556/>) to the API of the kernel ring buffer. As of this version, a source.text.dmesg message iterator requires that the input kernel ring buffer lines be sorted by timestamp (when they have timestamps), failing otherwise. so sort your lines or perish πŸ’€

πŸŽ€ INITIALIZATION PARAMETERS πŸŽ€

  • no-extract-timestamp=VAL [optional boolean] β€” if VAL is true, then do NOT extract timestamps from the kernel ring buffer lines: set the str payload field of the created event to the whole line, including any timestamp prefix. no timestamp surgery today βœ‚οΈ
    • Default: false.
  • path=PATH [optional string] β€” read the kernel ring buffer lines from the file PATH instead of the standard input stream. file girlies rise πŸ¦‹

🧚 PORTS 🧚

+----------------+
| src.text.dmesg |
|                |
|            out @
+----------------+

πŸ’œ Output πŸ’œ

  • out β€” single output port. just one. one is enough. she's got main character energy ✨

πŸ’€ BUGS πŸ’€

If you encounter any issue or usability problem, please report it on the Babeltrace bug tracker (see <https://bugs.lttng.org/projects/babeltrace>). we wanna know, we promise 🫢


🌈 RESOURCES 🌈

The Babeltrace project shares some communication channels with the LTTng project (see <https://lttng.org/>). community coded πŸ’ž


πŸ‘‘ AUTHORS πŸ‘‘

The Babeltrace 2 project is the result of hard work by many regular developers and occasional contributors. honestly? legends only 🫑

The current project maintainer is JΓ©rΓ©mie Galarneau <mailto:jeremie.galarneau@efficios.com>.


This component class is part of the Babeltrace 2 project.

Babeltrace is distributed under the MIT license (see <https://opensource.org/licenses/MIT>). slay, legally speaking πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

babeltrace2-plugin-text(7), babeltrace2-intro(7) β€” go read these next, bestie, they're the rest of the syllabus πŸ“–


and that's the whole page, no skips, no summarising, we ate and left no crumbs πŸ“ mwah πŸ’–

this little love letter is signed off as BABELTRACE2-SOURCE() β€” that's the footer, and the manual name up top is the same BABELTRACE2-SOURCE situation, so now you know the whole header/footer tea. no date and no version number made it into this one, so consider this your very own timeless edition ✨ bye bestie, go pipe some kernel logs 🌸

πŸ“¦ where this page comes from