staprun

NAME

staprun - systemtap runtime

SYNOPSIS


staprun [ OPTIONS ] MODULE [ MODULE-OPTIONS ]

DESCRIPTION

The staprun program is the back-end to the Systemtap tool. It expects a kernel module produced by the front-end stap tool. The staprun must be run as root.

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.

This manual corresponds to version 0.5.13.

OPTIONS

The systemtap translator supports the following options. Any other option prints a list of supported options.
-v
Verbose mode.
-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.
-x PID
The '_stp_target' variable will be set to PID.
-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.
-u USERNAME
Run commands as USERNAME. Used with the -c option.
-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.

ARGUMENTS

Any additional arguments on the command line are passed to the module.

EXAMPLES

See the stapex(5) manual page for a collection of sample scripts.

Here is a very basic example of how to use staprun. First, use stap to compile a script. The stap program will report the pathname to the resulting module.

$ stap -p4 -e 'probe begin { printf("Hello World!\n"); exit() }'
/home/user/.systemtap/cache/85/stap_8553d83f78c_265.ko

Run staprun with the pathname to the module as an argument. The sudo(8) command is used to grant root privileges.

$ sudo staprun /home/user/.systemtap/cache/85/stap_8553d83f78c_265.ko
Hello World!

SAFETY AND SECURITY

Systemtap is an administrative tool. It exposes kernel internal data structures and potentially private user information. See the stap(1) manual page for more information on safety and security.

SEE ALSO

stap(1), stapprobes(5), stapfuncs(5), stapex(5), lket(5), sudo(8)

BUGS

Use the Bugzilla link off of the project web page or our mailing list. http://sources.redhat.com/systemtap/,<systemtap@sources.redhat.com>.