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 -x PID The '_stp_target' variable will be set to PID.
46
47 -o FILE
48 Send output to FILE.
49
50
52 MODULE is the path of a bpf-elf file produced by the front-end stap
53 tool, when run with --runtime=bpf.
54
55
57 Here is a very basic example of how to generate a stapbpf module.
58 First, use stap to compile a script. The stap program will report the
59 name of the resulting module in the current working directory.
60
61 $ stap --runtime=bpf -p4 -e 'probe begin { printf("Hello World!\n");
62 exit() }'
63 stap_28784.bo
64
65 Run stapbpf with the pathname to the module as an argument.
66
67 $ stapbpf ./stap_28784.bo
68 Hello World!
69
70 If the -p4 option is omitted, stap will invoke stapbpf automatically.
71
72
74 This runtime is in an early stage of development and it currently lacks
75 support for a number of features available in the default runtime. A
76 subset of the following probe points is supported:
77
78
79 begin
80 end
81 kernel.*
82 process.*
83 timer.*
84 perf.*
85 procfs.*
86
87
88 In general, probes based on the kprobes, uprobes, tracepoint and perf
89 infrastructures are supported. See stapprobes(3stap) for more informa‐
90 tion on the probe points and which tracing infrastructures they are
91 based on.
92
93 for loops, foreach loops and while loops are usable only in begin and
94 end probes. try statements are not supported.
95
96 There is limited support for string operations. String variables and
97 literals are limited to 64 characters, except for printf format
98 strings, which are limited to 256 characters.
99
100 A subset of the statistical aggregate functionality is available, with
101 support only for the @count(), @sum(), @avg() extractor functions.
102
103 The name of the bpf-elf file produced by the front-end stap tool should
104 not be changed.
105
106
108 See the stap(1) manual page for additional information on safety and
109 security.
110
111
113 stap(1), stapprobes(3stap), staprun(8), stapex(3stap)
114
115
117 Use the Bugzilla link of the project web page or our mailing list.
118 http://sourceware.org/systemtap/, <systemtap@sourceware.org>.
119
120
121
122 STAPBPF(8)