Commit | Line | Data |
---|---|---|
c1f82f3b | 1 | babeltrace2-log(1) |
838dd456 PP |
2 | ================= |
3 | :manpagetype: program | |
4 | :revdate: 5 October 2017 | |
5 | ||
6 | ||
7 | NAME | |
8 | ---- | |
c1f82f3b | 9 | babeltrace2-log - Convert a Linux kernel ring buffer to a CTF trace |
838dd456 PP |
10 | |
11 | ||
12 | SYNOPSIS | |
13 | -------- | |
14 | [verse] | |
c1f82f3b | 15 | *babeltrace2-log* [opt:--with-timestamps] 'OUTPUT-PATH' |
838dd456 PP |
16 | |
17 | ||
18 | DESCRIPTION | |
19 | ----------- | |
c1f82f3b | 20 | The `babeltrace2-log` tool reads the lines of a Linux kernel ring buffer, |
838dd456 PP |
21 | as printed by the man:dmesg(1) tool, from the standard input stream and |
22 | converts them to a http://diamon.org/ctf/[CTF] trace written to the | |
23 | 'OUTPUT-PATH' directory. | |
24 | ||
25 | Usage example: | |
26 | ||
27 | [role="term"] | |
28 | ---- | |
c1f82f3b | 29 | $ dmesg | babeltrace2-log --with-timestamps my-trace |
838dd456 PP |
30 | ---- |
31 | ||
32 | The events of the generated CTF trace are named `string` and contain a | |
33 | single payload string field named `str` which contains the corresponding | |
34 | ring buffer line. | |
35 | ||
c1f82f3b | 36 | By default, `babeltrace2-log` does not try to extract the timestamps of |
838dd456 PP |
37 | the kernel ring buffer lines to use them as the created events's |
38 | timestamps. A typical man:dmesg(1) line looks like this: | |
39 | ||
40 | ---- | |
41 | [87166.510937] PM: Finishing wakeup. | |
42 | ---- | |
43 | ||
44 | In the last example, the `[87166.510937]` part is a timestamp which | |
c1f82f3b | 45 | could be extracted. You can make `babeltrace2-log` extract timestamps |
838dd456 PP |
46 | from lines with the opt:--with-timestamps option. |
47 | ||
48 | ||
49 | OPTIONS | |
50 | ------- | |
51 | opt:-t, opt:--with-timestamps:: | |
52 | Extract timestamps from the kernel ring buffer lines: set | |
53 | the created event's payload's `str` field to the rest of the line, | |
54 | excluding any timestamp prefix. | |
55 | ||
56 | ||
57 | ENVIRONMENT VARIABLES | |
58 | --------------------- | |
c1f82f3b MJ |
59 | See the environment variables of man:babeltrace2-source.text.dmesg(7), |
60 | man:babeltrace2-filter.utils.muxer(7), and | |
61 | man:babeltrace2-sink.ctf.fs(7). | |
838dd456 PP |
62 | |
63 | include::common-lib-env.txt[] | |
64 | ||
65 | include::common-cli-files.txt[] | |
66 | ||
67 | include::common-cmd-footer.txt[] | |
68 | ||
69 | ||
70 | SEE ALSO | |
71 | -------- | |
c1f82f3b MJ |
72 | man:babeltrace2-intro(7), |
73 | man:babeltrace2-source.text.dmesg(7), | |
74 | man:babeltrace2-filter.utils.muxer(7), | |
75 | man:babeltrace2-sink.ctf.fs(7) |