babeltrace2-log(1) ================= :manpagetype: program :revdate: 5 October 2017 NAME ---- babeltrace2-log - Convert a Linux kernel ring buffer to a CTF trace SYNOPSIS -------- [verse] *babeltrace2-log* [opt:--with-timestamps] 'OUTPUT-PATH' DESCRIPTION ----------- The `babeltrace2-log` tool reads the lines of a Linux kernel ring buffer, as printed by the man:dmesg(1) tool, from the standard input stream and converts them to a http://diamon.org/ctf/[CTF] trace written to the 'OUTPUT-PATH' directory. Usage example: [role="term"] ---- $ dmesg | babeltrace2-log --with-timestamps my-trace ---- The events of the generated CTF trace are named `string` and contain a single payload string field named `str` which contains the corresponding ring buffer line. By default, `babeltrace2-log` does not try to extract the timestamps of the kernel ring buffer lines to use them as the created events's timestamps. A typical man:dmesg(1) line looks like this: ---- [87166.510937] PM: Finishing wakeup. ---- In the last example, the `[87166.510937]` part is a timestamp which could be extracted. You can make `babeltrace2-log` extract timestamps from lines with the opt:--with-timestamps option. OPTIONS ------- opt:-t, opt:--with-timestamps:: Extract timestamps from the kernel ring buffer lines: set the created event's payload's `str` field to the rest of the line, excluding any timestamp prefix. ENVIRONMENT VARIABLES --------------------- See the environment variables of man:babeltrace2-source.text.dmesg(7), man:babeltrace2-filter.utils.muxer(7), and man:babeltrace2-sink.ctf.fs(7). include::common-lib-env.txt[] include::common-cli-files.txt[] include::common-cmd-footer.txt[] SEE ALSO -------- man:babeltrace2-intro(7), man:babeltrace2-source.text.dmesg(7), man:babeltrace2-filter.utils.muxer(7), man:babeltrace2-sink.ctf.fs(7)