2 .TH STAPRUN 8 @DATE@ "Red Hat"
4 staprun \- systemtap runtime
22 program is the back-end of the Systemtap tool. It expects a kernel
23 module produced by the front-end
27 Splitting the systemtap tool into a front-end and a back-end allows a
28 user to compile a systemtap script on a development machine that has
29 the kernel debugging information (need to compile the script) and then
30 transfer the resulting kernel module to a production machine that
31 doesn't have any development tools or kernel debugging information installed.
33 This manual corresponds to version @VERSION@.
38 program supports the following options. Any other option
39 prints a list of supported options.
45 Command CMD will be run and the
47 program will exit when CMD
48 does. The '_stp_target' variable will contain the pid for CMD.
51 The '_stp_target' variable will be set to PID.
54 Send output to FILE. If the module uses bulk mode, the output will
55 be in percpu files FILE_x(FILE_cpux in background and bulk mode)
56 where 'x' is the cpu number. This supports strftime(3) formats
60 The systemtap module will specify a buffer size.
61 Setting one here will override that value. The value should be
62 an integer between 1 and 4095 which be assumed to be the
63 buffer size in MB. That value will be per-cpu if bulk mode is used.
66 Load module and start probes, then detach from the module leaving the
67 probes running. The module can be attached to later by using the
72 Attach to loaded systemtap module.
75 Delete a module. Only detached or unused modules
76 the user has permission to access will be deleted. Use "*"
77 (quoted) to delete all unused modules.
80 Run staprun in background as a daemon and show it's pid.
83 Sets the maximum size of output file and the maximum number of output files.
84 If the size of output file will exceed
86 , systemtap switches output file to the next file. And if the number of
89 , systemtap removes the oldest output file. You can omit the second argument.
93 is either a module path or a module name. If it is a module name,
94 the module will be looked for in the following directory
95 (where 'VERSION' is the output of "uname \-r"):
97 /lib/modules/VERSION/systemtap
99 .\" TODO - we probably need a better description here.
100 Any additional arguments on the command line are passed to the
106 manual page for a collection of sample scripts.
108 Here is a very basic example of how to use
112 to compile a script. The
114 program will report the pathname to the resulting module.
116 \& $ stap \-p4 \-e \[aq]probe begin { printf("Hello World!\\n"); exit() }\[aq]
118 \& /home/user/.systemtap/cache/85/stap_8553d83f78c_265.ko
122 with the pathname to the module as an argument.
124 \& $ staprun /home/user/.systemtap/cache/85/stap_8553d83f78c_265.ko
127 .SH MODULE DETACHING AND ATTACHING
130 program installs a Systemtap kernel module, users can detach from the
131 kernel module and reattach to it later. The
133 option loads the module and automatically detaches. Users can also
134 detach from the kernel module interactively by sending the SIGQUIT
135 signal from the keyboard (typically by typing Ctrl\-\\).
137 To reattach to a kernel module, the
140 option would be used.
142 .SH FILE SWITCHING BY SIGNAL
147 , users can command it to switch output file to next file when it
148 outputs to file(s) (running staprun with
154 process. When it receives SIGUSR2, it will switch output file to
157 where N is the sequential number.
160 \& $ staprun \-o foo ...
162 outputs trace logs to
166 signal, it switches output to
170 again, it switches to
174 .SH SAFETY AND SECURITY
175 Systemtap is an administrative tool. It exposes kernel internal data
176 structures and potentially private user information. See the
178 manual page for additional information on safety and security.
180 To increase system security, only the root user and members of the
184 to insert systemtap modules (or attach to existing ones).
189 to insert or remove systemtap modules (or attach to existing systemtap modules) that
190 are located in the /lib/modules/VERSION/systemtap directory.
193 /lib/modules/VERSION/systemtap
194 If MODULE is a module name, the module will be looked for in this directory.
195 Users who are only in the
197 group can only install modules
198 located in this directory. This directory should be owned by the root
199 user and not be world writable.
202 .IR stapprobes (3stap),
203 .IR stapfuncs (3stap),
207 Use the Bugzilla link off of the project web page or our mailing list.
209 .BR http://sources.redhat.com/systemtap/ ", " <systemtap@sources.redhat.com> .