File: stapbpf.8

package info (click to toggle)
systemtap 4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 38,260 kB
  • sloc: cpp: 77,147; ansic: 61,828; xml: 49,277; exp: 42,244; sh: 11,046; python: 2,772; perl: 2,252; tcl: 1,305; makefile: 1,086; lisp: 105; java: 102; awk: 101; asm: 91; sed: 16
file content (185 lines) | stat: -rw-r--r-- 3,396 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
.\" -*- nroff -*-
.TH STAPBPF 8 
.SH NAME
stapbpf \- systemtap bpf runtime

.\" macros
.de SAMPLE

.nr oldin \\n(.i
.br
.RS
.nf
.nh
..
.de ESAMPLE
.hy
.fi
.RE
.in \\n[oldin]u

..


.SH SYNOPSIS

.br
.B stapbpf
[
.I OPTIONS
]
.I MODULE

.SH DESCRIPTION

The
.I stapbpf
program is the BPF back-end of the Systemtap tool.  It expects a 
bpf-elf file produced by the front-end
.I stap
tool, when run with
.IR \-\-runtime=bpf .

.PP
Splitting the systemtap tool into a front-end and a back-end allows a
user to compile a systemtap script on a development machine that has
the debugging information needed to compile the script and then
transfer the resulting shared object to a production machine that
doesn't have any development tools or debugging information installed.
.PP
Please refer to
.IR stappaths (7)
for the version number, or run
.PP
\& $ rpm \-q systemtap # (for Fedora/RHEL)
.br
\& $ apt\-get \-v systemtap # (for Ubuntu)

.SH OPTIONS
The
.I stapbpf
program supports the following options.  Any other option
prints a list of supported options.
.TP
.B \-v
Verbose mode.
.TP
.B \-V
Print version number and exit.
.TP
.B \-w
Suppress warnings from the script.
.TP
.B \-h
Print help message.
.TP
.B \-x PID
The '_stp_target' variable will be set to PID.
.TP
.B \-o FILE
Send output to FILE.

.SH ARGUMENTS
.B MODULE
is the path of a bpf-elf file produced by the front-end
.I stap
tool, when run with
.IR \-\-runtime=bpf .

.SH EXAMPLES
Here is a very basic example of how to generate a
.IR stapbpf
module.
First, use
.I stap
to compile a script.  The
.I stap
program will report the name of the resulting module in the current
working directory.
.PP
\& $ stap \-\-runtime=bpf \-p4 \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq]
.br
\& stap_28784.bo
.PP
Run
.I stapbpf
with the pathname to the module as an argument.
.PP
\& $ stapbpf ./stap_28784.bo
.br
\& Hello World!
.PP
If the
.I \-p4
option is omitted,
.I stap
will invoke
.I stapbpf
automatically.

.SH LIMITATIONS
This runtime is in an early stage of development and it currently lacks
support for a number of features available in the default runtime.
A subset of the following probe points is supported:

.SAMPLE
begin
end
kernel.*
process.*
timer.*
perf.*
procfs.*
.ESAMPLE

In general, probes based on the kprobes, uprobes, tracepoint and perf
infrastructures are supported. See
.IR stapprobes (3stap)
for more information on the probe points and which tracing infrastructures
they are based on.

.B for
loops,
.B foreach
loops and
.B while
loops are usable only in 
.B begin
and
.B end
probes. 
.B try
statements are not supported.

There is limited support for string
operations. String variables and literals are limited to
64 characters, except for
.B printf
format strings, which are limited to 256 characters.

A subset of the statistical aggregate functionality is available,
with support only for the
.IR @count() ", " @sum() ", " @avg()
extractor functions.

The name
of the bpf-elf file produced by the front-end 
.I stap
tool should not be changed.

.SH SAFETY AND SECURITY
See the 
.IR stap (1)
manual page for additional information on safety and security.

.SH SEE ALSO
.IR stap (1),
.IR stapprobes (3stap),
.IR staprun (8),
.IR stapex (3stap)

.SH BUGS
Use the Bugzilla link of the project web page or our mailing list.
.nh
.BR http://sourceware.org/systemtap/ ", " <systemtap@sourceware.org> .
.hy