Install SystemTap
To begin using SystemTap, install the required packages. To use SystemTap with multiple kernels, install the matching kernel packages for each version.
Before you begin
- You have enabled debug repositories as described in Enabling debug and source repositories.
Procedure
Results
- If the kernel to be probed with SystemTap is currently in use, test if your installation was successful:
# stap -v -e 'probe kernel.function("vfs_read") {printf("read performed\n"); exit()}'For a successful SystemTap deployment, you see an output similar to the following:
Pass 1: parsed user script and 45 library script(s) in 340usr/0sys/358real ms. Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in 290usr/260sys/568real ms. Pass 3: translated to C into "/tmp/stapiArgLX/stap_e5886fa50499994e6a87aacdc43cd392_399.c" in 490usr/430sys/938real ms. Pass 4: compiled C into "stap_e5886fa50499994e6a87aacdc43cd392_399.ko" in 3310usr/430sys/3714real ms. Pass 5: starting run. read performed Pass 5: run completed in 10usr/40sys/73real ms.where:
Pass 5: starting runindicates that SystemTap successfully created the instrumentation to probe the kernel and runs the instrumentation.read performedindicates that SystemTap detected the specified event, in this example, a VFS read.Pass 5: run completed in <time> msindicates that SystemTap ran a valid handler. It displayed text and closed with no errors.