Kevin Feliksa - Procedure - SystemTap install...

来源:百度文库 编辑:神马文学网 时间:2024/04/20 12:02:19
This is the mail archive of the systemtap@sourceware.org mailing list for thesystemtap project. Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]
Procedure - SystemTap install from source modules on Fedora core 5
From: Kevin Feliksa 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 sourcemodules onFedora core 5. Your comments are very much appreciated.Thanks,Kevin Feliksa (feliksa@us.ibm.com)--------------------------------------------------------------------------------------SystemTap install from source modules on Fedora core 5SystemTap is tool that enables application developers and systemadministratorsto write instrumentation that monitors the performance of the Linuxkernel.The following procedure is for SystemTap installation from source modulesona released Fedora core 5 ISO system.Installation of SystemTap requires the following:root (superuser) login privilegeskernel - updated to the latest releasekernel-devel or kernel-[smp-]devel RPM - kernel module build environmentkernel-debuginfo RPM - kernel debugging informationelfutils - latest release with patch moduleglib2-devel - latest GIMP ToolKit and GIMP Drawing Kit support librarysystemtap - latest releasegcc and gcc-c++ - compilers at the same level used to build the kernelInstallation procedureNotes: You must have an active Internet connection to perform portions ofthisprocedure. All of the commands in this procedure are entered in a terminalwindowand 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 processortype.a. Open a terminal window and enter the command: uname -rThis command returns the release level of the kernel.b. Enter the command: uname -pThis 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 kernelb. The yum command will return the processor type ("Arch") andrelease level of the latest available Linux kernel. If a newer versionof the kernel is found, enter "y" at the prompts "Is this ok [y/N]?" toload 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 duringinitializationand login as a "root" user (superuser).d. Open a terminal window and verify the release level of the runningLinux kernel by entering the command:uname -r4. Update kernel-devel or kernel-smp-devel (for a symmetricalmultiprocessor)to the release level of the Linux kernel, if necessary.a. Enter the command:rpm -q kernel-develorrpm -q kernel-smp-develwhichever applies. If the package is installed and is at the releaselevel of the Linux kernel, go to step 5.b. Enter the command:yum install kernel-devel-RLoryum install kernel-smp-devel-RLwhichever applies, where RL is the release level of the Linux kernel.c. If yum finds the ...devel package requested, enter "y" at theprompt"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 theInternet or other sources and install it using normal methods.5. Update the kernel-debuginfo package to the release level of theLinux kernel,if necessary.a. Enter the command: rpm -q kernel-debuginfoIf the package is installed and is at the release level of the Linuxkernel,go to step 6.b. Enter the command:yum --enablerepo=updates-debuginfo install kernel-debuginfo-RLwhere RL is the release level of the Linux kernel.c. If yum finds the kernel-debuginfo package requested, enter "y" attheprompt "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 itinthe Internet or other sources and install it using normal methods.6. Update the gcc package if necessary. The gcc package must becompatible with theinstalled Linux kernel.a. Enter the command: yum install gccIf 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 toappear.Otherwise, continue with the next step.7. Update the gcc-c++ package if necessary. The gcc-c++ package mustbecompatible 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 toappear.Otherwise, continue with the next step.8. Update the glib2-devel package if necessary.a. Enter the command:yum install glib2-develIf 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 toappear.Otherwise, continue with the next step.9. Download the latest elfutils package and elfutils portabilitypatch.a. To download the latest elfutils package, point a web browser atthe following address:ftp://sources.redhat.com/pub/systemtap/elfutilsb. The elfutils package name is in the in the form:elfutils-NNNN.tar.gz, whereNNNN 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 elfutilsportabilitypatch to disk.Note: At the ftp address above, the file, README.elfutils, containsinformation about building systemtap that may be useful.d. Move the elfutils package and elfutils portability patch to aconvenientdirectory for building systemtap. (Optional.)10. Untar and patch the elfutils package.a. Go to the directory were the elfutils package is saved and enterthe command:tar -zxf elfutils-NNNN.tar.gzThe tar file is decompressed to a sub-directory named elfutils-NNNN.b. Apply the elfutils-portability.patch in the directory where thetarcommand was executed. Enter the command:patch -p1 -d elfutils-NNNN < elfutils-portability.patchCheck the messages issued by the patch process to ensure that no errorsoccurred. Resolve all problems before continuing.11. Remove the systemtap package if installed.a. Enter the command: rpm -q systemtapb. If systemtap is installed, de-install it by entering the command:rpm -e systemtap12. Download the latest systemtap snapshot. The SystemTap package nameis in the formatsystemtap-YYYYMMDD.tar.bz2 where YYYYMMDD is the date of the package.a. To download the systemtap snapshot from an ftp site, point a webbrowserat the following address:ftp://sources.redhat.com/pub/systemtap/snapshotsand save the newest version of the snapshot to disk.b. Move the systemtap snapshot to a convenient directory for buildingsystemtap. (Optional.)13. Untar the systemtap snapshot.a. Go to the directory were the systemtap snapshot is savedand enter the command:tar -jxf systemtap-YYYYMMDD.tar.bz2The 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 systemtapfiles.Enter the command:less systemtap.spec.inb. Check the current Linux system configuration to verify that itmeetsthe requirements indicated in the systemtap.spec.in file. If it doesnot, make all necessary changes to the system before proceeding.15. Build systemtap with elfutils.a. In the src directory where systemtap was decompressed, enter thecommand:./configure --with-elfutils=PATCHED-ELFUTILS-DIR [add other autoconfoptions]where PATCHED-ELFUTILS-DIR is the directory path where thepatched elfutils files are saved.Check the messages issued by the configure process to ensure that noerrorsoccurred. Resolve all problems before continuing.b. Enter the following make command:make all checkThis process could last several minutes. If programs "FAIL" during thetesting (ending) phase of this process, make the necessary corrections toyour installation. Then execute the make all check command again toverify that systemtap is ready to install.c. Enter the following command to install systemtap: make installCheck the messages issued by the make command to ensure thatno errors occurred. Resolve all problems before continuing.d. Change directories and enter a SystemTap command to test theinstall. 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.--------------------------------------------------------------------------------- Follow-Ups:Re: Procedure - SystemTap install from source modules on Fedora core 5 From: David Smith
Re: Procedure - SystemTap install from source modules on Fedora core 5 From: Frank Ch. Eigler
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]