Download DevtoolSet 3 - Red Hat Customer Portal

Transcript
User G uide
Chapter 11. SystemTap
Syst emT ap is a tracing and probing tool that allows users to monitor the activities of the entire
system without needing to instrument, recompile, install, and reboot. It is programmable with a
custom scripting language, which gives it expressiveness (to trace, filter, and analyze) and reach (to
look into the running kernel and applications).
Syst emT ap can monitor various types of events, such as function calls within the kernel or
applications, timers, tracepoints, performance counters, and so on. Some included example scripts
produce output similar to netstat, ps, to p, and i o stat, others include pretty-printed function
callgraph traces or tools for working around security bugs.
Red Hat D eveloper Toolset is distributed with Syst emT ap 2.6 . This version is more recent than the
version included in Red Hat Enterprise Linux and provides numerous bug fixes and enhancements.
T ab le 11.1. T o o ls D ist rib u t ed wit h Syst emT ap f o r R ed H at D evelo p er T o o lset
N ame
D escrip t io n
stap
Translates probing instructions into C code, builds a kernel module, and
loads it into a running Linux kernel.
The D yn in st backend for Syst emT ap .
Loads, unloads, attaches to, and detaches from kernel modules built with
the stap utility.
Serves as a remote shell for Syst emT ap .
D etermines and—if possible—downloads the kernel information
packages that are required to run Syst emT ap .
Merges per-CPU files. This script is automatically executed when the stap
utility is executed with the -b command line option.
Gathers important information about the system for the purpose of
reporting a bug in Syst emT ap .
A compile server, which listens for requests from stap clients.
stapd yn
staprun
stapsh
stap-prep
stap-merg e
stap-repo rt
stap-server
11.1. Inst alling Syst emT ap
In Red Hat D eveloper Toolset, SystemT ap is provided by the devtoolset-3-systemtap package and is
automatically installed with devtoolset-3-perftools as described in Section 1.5, “ Installing Red Hat
D eveloper Toolset” .
Note
The Red Hat D eveloper Toolset version of Syst emT ap is available for both Red Hat
Enterprise Linux 6 and Red Hat Enterprise Linux 7, but some new features are only offered by
the Red Hat D eveloper Toolset version of Syst emT ap for Red Hat Enterprise Linux 7. See
Section A.5, “ Changes in SystemTap” for details.
In order to place instrumentation into the Linux kernel, Syst emT ap may also require installation of
additional packages with debugging information. To determine which packages to install, run the
stap-prep utility as follows:
scl enabl e d evto o l set-3 ' stap-prep'
62