Chapter 3. Understanding How SystemTap Works
Procedure 3.1. SystemTap Session
- First, SystemTap checks the script against the existing tapset library (normally in
/usr/share/systemtap/tapset/for any tapsets used. SystemTap will then substitute any located tapsets with their corresponding definitions in the tapset library.
- SystemTap then translates the script to C, running the system C compiler to create a kernel module from it. The tools that perform this step are contained in the
systemtappackage (refer to Section 2.1.1, “Installing SystemTap” for more information).
- SystemTap loads the module, then enables all the probes (events and handlers) in the script. The
systemtap-runtimepackage (refer to Section 2.1.1, “Installing SystemTap” for more information) provides this functionality.
- As the events occur, their corresponding handlers are executed.
- Once the SystemTap session is terminated, the probes are disabled, and the kernel module is unloaded.
stap. This program is SystemTap's main front-end tool. For more information about
stap, refer to
man stap(once SystemTap is properly installed on your machine).