System information
SystemTap—Filtering and Analyzing System Data 71
SystemTap—Filtering and
Analyzing System Data
5
SystemTap provides a command line interface and a scripting language to examine
the activities of a running Linux system, particularly the kernel, in fine detail. Sys-
temTap scripts are written in the SystemTap scripting language, are then compiled
to C-code kernel modules and inserted into the kernel. The scripts can be designed
to extract, filter and summarize data, thus allowing the diagnosis of complex perfor-
mance problems or functional problems. SystemTap provides information similar to
the output of tools like netstat, ps, top, and iostat. However, more filtering
and analysis options can be used for the collected information.
5.1 Conceptual Overview
Each time you run a SystemTap script, a SystemTap session is started. A number of
passes are done on the script before it is allowed to run, at which point the script is
compiled into a kernel module and loaded. In case the script has already been exe-
cuted before and no changes regarding any components have occurred (for exam-
ple, regarding compiler version, kernel version, library path, script contents), Sys-
temTap does not compile the script again, but uses the *.c and *.ko data stored
in the SystemTap cache (~/.systemtap). The module is unloaded when the tap
has finished running. For an example, see the test run in Section5.2, “Installation and
Setup” (page74) and the respective explanation.