Starting with SystemTap

As I stare at this blank screen to start writing my first blog entry I have that same feeling that so many developers have when starting with an unfamiliar programming language or application.  The developers in our group realize that it is not easy starting from nothing and we strive to make it easier to productively use SystemTap to investigate performance problems.

A starting point for anyone’s first use of SystemTap is the SystemTap Beginners Guide on the Red Hat Customer Portal.  This document provides step-by-step instructions to install SystemTap and verify that everything is ready for use.  It also contains a number of SystemTap example scripts showing how SystemTap can instrument a variety of Linux sub-systems such as the disk and network stack.

The SystemTap example scripts in the beginners guide are just a sampling of the example scripts available for SystemTap. The SystemTap RPM includes a number of example scripts.  On a machine with SystemTap installed you can list the available example scripts with:

$ cd /usr/share/doc/systemtap*/examples
$ find -path "*.stp"

For the most up-to-date list of SystemTap example scripts you can check out the SystemTap development website’s example scripts. These SystemTap example scripts are included as a part of the SystemTap test suite.  At Red Hat, during the QA process, the SystemTap test suite is run and reviewed to verify that the example scripts will run on the various versions of Red Hat Enterprise Linux and avoid problems with stale examples that fail to build or run.

After becoming familiar with SystemTap and using it to diagnose some difficult performance problems you may find that you have scripts that would be excellent additions to the examples.  You can follow the process that other SystemTap users have followed in the README file to get your new SystemTap examples added and make it easier for others to get started with SystemTap.

Join Red Hat Developers, a developer program for you to learn, share, and code faster – and get access to Red Hat software for your development.  The developer program and software are both free!


Take advantage of your Red Hat Developers membership and download RHEL today at no cost.