This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Procedure - SystemTap install from source modules on Fedora core 5
- From: Kevin Feliksa <feliksa at us dot ibm dot com>
- To: systemtap at sourceware dot org
- Date: Thu, 20 Jul 2006 13:53:30 -0500
- Subject: Procedure - SystemTap install from source modules on Fedora core 5
Hi,
Following is a formalized procedure to install SystemTap from source
modules on
Fedora core 5. Your comments are very much appreciated.
Thanks,
Kevin Feliksa (feliksa@us.ibm.com)
--------------------------------------------------------------------------------------
SystemTap install from source modules on Fedora core 5
SystemTap is tool that enables application developers and system
administrators
to write instrumentation that monitors the performance of the Linux
kernel.
The following procedure is for SystemTap installation from source modules
on
a released Fedora core 5 ISO system.
Installation of SystemTap requires the following:
root (superuser) login privileges
kernel - updated to the latest release
kernel-devel or kernel-[smp-]devel RPM - kernel module build environment
kernel-debuginfo RPM - kernel debugging information
elfutils - latest release with patch module
glib2-devel - latest GIMP ToolKit and GIMP Drawing Kit support library
systemtap - latest release
gcc and gcc-c++ - compilers at the same level used to build the kernel
Installation procedure
Notes: You must have an active Internet connection to perform portions of
this
procedure. All of the commands in this procedure are entered in a terminal
window
and executed in the bash shell.
1. Login to the Linux system as a "root" user (superuser).
2. Obtain the release level of the Linux kernel and the processor
type.
a. Open a terminal window and enter the command: uname -r
This command returns the release level of the kernel.
b. Enter the command: uname -p
This command returns the processor type (architecture) of the machine.
3. Update the Linux kernel module to the latest level, if necessary.
a. Enter the command: yum install kernel
b. The yum command will return the processor type ("Arch") and
release level of the latest available Linux kernel. If a newer version
of the kernel is found, enter "y" at the prompts "Is this ok [y/N]?" to
load the new kernel and to load the GPG key; wait for the "Complete!"
message to appear. Otherwise, continue with step 4.
c. Restart the Linux system. Select with the newer kernel during
initialization
and login as a "root" user (superuser).
d. Open a terminal window and verify the release level of the running
Linux kernel by entering the command:
uname -r
4. Update kernel-devel or kernel-smp-devel (for a symmetrical
multiprocessor)
to the release level of the Linux kernel, if necessary.
a. Enter the command:
rpm -q kernel-devel
or
rpm -q kernel-smp-devel
whichever applies. If the package is installed and is at the release
level of the Linux kernel, go to step 5.
b. Enter the command:
yum install kernel-devel-RL
or
yum install kernel-smp-devel-RL
whichever applies, where RL is the release level of the Linux kernel.
c. If yum finds the ...devel package requested, enter "y" at the
prompt
"Is this ok [y/N]?" to load the new package; wait for the "Complete!"
message to appear. If yum does not find the package, find it using the
Internet or other sources and install it using normal methods.
5. Update the kernel-debuginfo package to the release level of the
Linux kernel,
if necessary.
a. Enter the command: rpm -q kernel-debuginfo
If the package is installed and is at the release level of the Linux
kernel,
go to step 6.
b. Enter the command:
yum --enablerepo=updates-debuginfo install kernel-debuginfo-RL
where RL is the release level of the Linux kernel.
c. If yum finds the kernel-debuginfo package requested, enter "y" at
the
prompt "Is this ok [y/N]?" to load the new package; wait for the "
Complete!"
message to appear. If yum does not find the appropriate package, find it
in
the Internet or other sources and install it using normal methods.
6. Update the gcc package if necessary. The gcc package must be
compatible with the
installed Linux kernel.
a. Enter the command: yum install gcc
If yum finds a package to install, enter "y" at the prompt "Is this ok
[y/N]?"
to load it and its dependencies; wait for the "Complete!" message to
appear.
Otherwise, continue with the next step.
7. Update the gcc-c++ package if necessary. The gcc-c++ package must
be
compatible with the installed Linux kernel.
a. Enter the command: yum install gcc-c++
If yum finds a package to install, enter "y" at the prompt "Is this ok
[y/N]?"
to load it and its dependencies; wait for the "Complete!" message to
appear.
Otherwise, continue with the next step.
8. Update the glib2-devel package if necessary.
a. Enter the command:
yum install glib2-devel
If yum finds a package to install, enter "y" at the prompt "Is this ok
[y/N]?"
to load it and its dependencies; wait for the "Complete!" message to
appear.
Otherwise, continue with the next step.
9. Download the latest elfutils package and elfutils portability
patch.
a. To download the latest elfutils package, point a web browser at
the following address:
ftp://sources.redhat.com/pub/systemtap/elfutils
b. The elfutils package name is in the in the form:
elfutils-NNNN.tar.gz, where
NNNN is the version number. Save the elfutils package to disk.
c. At the same ftp site, the elfutils portability patch (
elfutils-portability.patch)
associated with the elfutils package is also listed. Save the elfutils
portability
patch to disk.
Note: At the ftp address above, the file, README.elfutils, contains
information about building systemtap that may be useful.
d. Move the elfutils package and elfutils portability patch to a
convenient
directory for building systemtap. (Optional.)
10. Untar and patch the elfutils package.
a. Go to the directory were the elfutils package is saved and enter
the command:
tar -zxf elfutils-NNNN.tar.gz
The tar file is decompressed to a sub-directory named elfutils-NNNN.
b. Apply the elfutils-portability.patch in the directory where the
tar
command was executed. Enter the command:
patch -p1 -d elfutils-NNNN < elfutils-portability.patch
Check the messages issued by the patch process to ensure that no errors
occurred. Resolve all problems before continuing.
11. Remove the systemtap package if installed.
a. Enter the command: rpm -q systemtap
b. If systemtap is installed, de-install it by entering the command:
rpm -e systemtap
12. Download the latest systemtap snapshot. The SystemTap package name
is in the format
systemtap-YYYYMMDD.tar.bz2 where YYYYMMDD is the date of the package.
a. To download the systemtap snapshot from an ftp site, point a web
browser
at the following address:
ftp://sources.redhat.com/pub/systemtap/snapshots
and save the newest version of the snapshot to disk.
b. Move the systemtap snapshot to a convenient directory for building
systemtap. (Optional.)
13. Untar the systemtap snapshot.
a. Go to the directory were the systemtap snapshot is saved
and enter the command:
tar -jxf systemtap-YYYYMMDD.tar.bz2
The systemtap snapshot will be decompressed to a sub-directory named src.
14. Check the systemtap.spec.in file for required elements.
a. Go to the src directory that contains the decompressed systemtap
files.
Enter the command:
less systemtap.spec.in
b. Check the current Linux system configuration to verify that it
meets
the requirements indicated in the systemtap.spec.in file. If it does
not, make all necessary changes to the system before proceeding.
15. Build systemtap with elfutils.
a. In the src directory where systemtap was decompressed, enter the
command:
./configure --with-elfutils=PATCHED-ELFUTILS-DIR [add other autoconf
options]
where PATCHED-ELFUTILS-DIR is the directory path where the
patched elfutils files are saved.
Check the messages issued by the configure process to ensure that no
errors
occurred. Resolve all problems before continuing.
b. Enter the following make command:
make all check
This process could last several minutes. If programs "FAIL" during the
testing (ending) phase of this process, make the necessary corrections to
your installation. Then execute the make all check command again to
verify that systemtap is ready to install.
c. Enter the following command to install systemtap: make install
Check the messages issued by the make command to ensure that
no errors occurred. Resolve all problems before continuing.
d. Change directories and enter a SystemTap command to test the
install. Enter the following:
cd /
stap -e 'probe begin { log ("hello world") }'
After a few seconds, stap should produce the message "hello world"
if systemtap installed properly. Press Ctl-c to exit the process.
Congratulations! You have installed SystemTap.
---------------------------------------------------------------------------------