System information

SystemTap—Filtering and Analyzing System Data 73
5.1.3 Commands and Privileges
The main commands associated with SystemTap are stap and staprun. To exe-
cute them, you either need root privileges or must be a member of the stapdev or
stapusr group.
stap
SystemTap front-end. Runs a SystemTap script (either from file, or from stan-
dard input). It translates the script into C code, compiles it, and loads the result-
ing kernel module into a running Linux kernel. Then, the requested system trace
or probe functions are performed.
staprun
SystemTap back-end. Loads and unloads kernel modules produced by the Sys-
temTap front-end.
For a list of options for each command, use --help. For details, refer to the stap
and the staprun man pages.
To avoid giving root access to users just for running SystemTap, you can make use
of the following SystemTap groups. They are not available by default on SUSE Linux
Enterprise, but you can create the groups and modify the access rights accordingly.
stapdev
Members of this group can run SystemTap scripts with stap, or run System-
Tap instrumentation modules with staprun. As running stap involves compil-
ing scripts into kernel modules and loading them into the kernel, members of this
group still have effective root access.
stapusr
Members of this group are only allowed to run SystemTap instrumentation mod-
ules with staprun. In addition, they can only run those modules from /lib/
modules/kernel_version/systemtap/. This directory must be owned
by root and must only be writable for the root user.
5.1.4 Important Files and Directories
The following list gives an overview of the SystemTap main files and directories.
/lib/modules/kernel_version/systemtap/
Holds the SystemTap instrumentation modules.