blob: 4b325fe88e6bf35c904864cbfe88df2b185812a1 (
plain)
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
|
.\" -*- nroff -*-
.TH STAPRUN 8 @DATE@ "Red Hat"
.SH NAME
staprun \- systemtap runtime
.SH SYNOPSIS
.br
.B staprun
[
.I OPTIONS
]
.I MODULE
[
.I MODULE-OPTIONS
]
.SH DESCRIPTION
The
.IR staprun
program is the back-end to the Systemtap tool. It expects a kernel
module produced by the front-end
.I stap
tool.
The
.I staprun
must be run as root.
.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 kernel debugging information (need to compile the script) and then
transfer the resulting kernel module to a production machine that
doesn't have any development tools or kernel debugging information installed.
.PP
This manual corresponds to version @VERSION@.
.SH OPTIONS
The systemtap translator supports the following options. Any other option
prints a list of supported options.
.TP
.B \-v
Verbose mode.
.TP
.B \-c CMD
Command CMD will be run and the staprun program will exit when CMD
does. The '_stp_target' variable will contain the pid for CMD.
.TP
.B \-x PID
The '_stp_target' variable will be set to PID.
.TP
.B \-o FILE
Send output to FILE. Is the module uses bulk mode, the output will
be in percpu files FILE_x where 'x' is the cpu number.
.TP
.B \-u USERNAME
Run commands as USERNAME. Used with the \-c option.
.TP
.B \-b BUFFER_SIZE
The systemtap module will specify a buffer size.
Setting one here will override that value. The value should be
an integer between 1 and 64 which be assumed to be the
buffer size in MB. That value will be per-cpu if bulk mode is used.
.SH ARGUMENTS
.\" TODO - we probably need a better description here.
Any additional arguments on the command line are passed to the
module.
.SH EXAMPLES
See the
.IR stapex (5)
manual page for a collection of sample scripts.
.PP
Here is a very basic example of how to use staprun. First, use
.I stap
to compile a script. The
.I stap
program will report the pathname to the resulting module.
.PP
.Vb 1
\& $ stap -p4 -e 'probe begin { printf("Hello World!\\n"); exit() }'
.br
\& /home/user/.systemtap/cache/85/stap_8553d83f78c_265.ko
.PP
Run
.I staprun
with the pathname to the module as an argument. The
.IR sudo (8)
command is used to grant root privileges.
.PP
.Vb 1
\& $ sudo staprun /home/user/.systemtap/cache/85/stap_8553d83f78c_265.ko
.br
\& Hello World!
.SH SAFETY AND SECURITY
Systemtap is an administrative tool. It exposes kernel internal data
structures and potentially private user information. See the
.IR stap (1)
manual page for more information on safety and security.
.SH SEE ALSO
.IR stap (1),
.IR stapprobes (5),
.IR stapfuncs (5),
.IR stapex (5),
.IR lket (5),
.IR sudo (8)
.SH BUGS
Use the Bugzilla link off of the project web page or our mailing list.
.nh
.BR http://sources.redhat.com/systemtap/ , <systemtap@sources.redhat.com> .
.hy
|