1STAPBPF(8) System Manager's Manual STAPBPF(8)
2
3
4
6 stapbpf - systemtap bpf runtime
7
8
9
10
12 stapbpf [ OPTIONS ] MODULE
13
14
16 The stapbpf program is the BPF back-end of the Systemtap tool. It
17 expects a bpf-elf file produced by the front-end stap tool, when run
18 with --runtime=bpf.
19
20
21 Splitting the systemtap tool into a front-end and a back-end allows a
22 user to compile a systemtap script on a development machine that has
23 the debugging information needed to compile the script and then trans‐
24 fer the resulting shared object to a production machine that doesn't
25 have any development tools or debugging information installed.
26
27 Please refer to stappaths(7) for the version number, or run
28
29 $ rpm -q systemtap # (for Fedora/RHEL)
30 $ apt-get -v systemtap # (for Ubuntu)
31
32
34 The stapbpf program supports the following options. Any other option
35 prints a list of supported options.
36
37 -v Verbose mode.
38
39 -V Print version number and exit.
40
41 -w Suppress warnings from the script.
42
43 -h Print help message.
44
45 -o FILE
46 Send output to FILE.
47
48
50 MODULE is the path of a bpf-elf file produced by the front-end stap
51 tool, when run with --runtime=bpf.
52
53
55 Here is a very basic example of how to generate a stapbpf module.
56 First, use stap to compile a script. The stap program will report the
57 name of the resulting module in the current working directory.
58
59 $ stap --runtime=bpf -p4 -e 'probe begin { printf("Hello World!\n");
60 exit() }'
61 stap_28784.bo
62
63 Run stapbpf with the pathname to the module as an argument.
64
65 $ stapbpf ./stap_28784.bo
66 Hello World!
67
68 If the -p4 option is omitted, stap will invoke stapbpf automatically.
69
70
72 This runtime is in an early stage of development and it currently lacks
73 support for a number of features available in the default runtime. A
74 subset of the following probe points is supported:
75
76
77 begin
78 end
79 kernel.*
80 process.*
81 timer.*
82 perf.*
83
84
85 In general, probes based on the kprobes, uprobes, tracepoint and perf
86 infrastructures are supported. See stapprobes(3stap) for more informa‐
87 tion on the probe points and which tracing infrastructures they are
88 based on.
89
90 for loops, foreach loops and while loops are usable only in begin and
91 end probes. try statements are not supported. There is limited support
92 for string operations. String variables and literals are limited to 64
93 characters, except for printf format strings, which are limited to 256
94 characters. Additionally, printf is limited to no more than 3 format
95 specifiers and the name of the bpf-elf file produced by the front-end
96 stap tool should not be changed.
97
98
100 See the stap(1) manual page for additional information on safety and
101 security.
102
103
105 stap(1), stapprobes(3stap), staprun(8), stapex(3stap)
106
107
109 Use the Bugzilla link of the project web page or our mailing list.
110 http://sourceware.org/systemtap/, <systemtap@sourceware.org>.
111
112
113
114 STAPBPF(8)