| 1 |
// Render with Asciidoctor |
| 2 |
|
| 3 |
= Linux FS simple example |
| 4 |
Philippe Proulx |
| 5 |
16 September 2020 |
| 6 |
:toc: left |
| 7 |
|
| 8 |
This simple example shows how to use the barectf |
| 9 |
link:../../platforms/linux-fs[Linux FS platform]. |
| 10 |
|
| 11 |
== Build |
| 12 |
|
| 13 |
Make sure barectf is installed. |
| 14 |
|
| 15 |
Build this example: |
| 16 |
|
| 17 |
---- |
| 18 |
$ make |
| 19 |
---- |
| 20 |
|
| 21 |
== Run |
| 22 |
|
| 23 |
Run this example: |
| 24 |
|
| 25 |
---- |
| 26 |
$ ./linux-fs-simple |
| 27 |
---- |
| 28 |
|
| 29 |
The complete CTF trace is the `trace` directory. |
| 30 |
|
| 31 |
[NOTE] |
| 32 |
==== |
| 33 |
You can run the example with arguments; they will be recorded as string |
| 34 |
fields in the event records of the `trace/stream` data stream. |
| 35 |
|
| 36 |
For example: |
| 37 |
|
| 38 |
---- |
| 39 |
$ ./linux-fs-simple dolore excepteur eiusmod commodo incididunt |
| 40 |
---- |
| 41 |
==== |
| 42 |
|
| 43 |
== Read |
| 44 |
|
| 45 |
Read the resulting trace with |
| 46 |
https://babeltrace.org/[Babeltrace{nbsp}2]: |
| 47 |
|
| 48 |
---- |
| 49 |
$ babeltrace2 trace |
| 50 |
---- |