From 05357b75ce6983b306f5c454fe41fd167d6cda85 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Wed, 5 Nov 2008 10:58:16 -0500 Subject: Minor cleanup of Using Systemtap Chapter and factoring out scripts. --- .../en-US/CrossInstrumenting.xml | 7 ++-- .../en-US/Installation.xml | 38 ++++++++-------------- .../en-US/Using_SystemTap.xml | 4 ++- .../en-US/extras/fedoradebugurl.sh | 9 +++++ .../en-US/extras/rheldebugurl.sh | 6 ++++ 5 files changed, 36 insertions(+), 28 deletions(-) create mode 100755 doc/SystemTap_Beginners_Guide/en-US/extras/fedoradebugurl.sh create mode 100755 doc/SystemTap_Beginners_Guide/en-US/extras/rheldebugurl.sh (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml b/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml index 5e29307c..3ff3c2d8 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml @@ -23,7 +23,7 @@ - Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in ). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on all those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPMs that provide compilers or debug information on specific machines, which will prevent the deployment of SystemTap. + Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in ). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on all those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPMs that provide compilers or debug information on specific machines, which will prevent the deployment of SystemTap. @@ -204,8 +204,9 @@ staprun module_name.ko - For example, to create the instrumentation module - simple.ko from a SystemTap script named + For example, to create the + instrumentation module simple.ko + from a SystemTap script named simple.stp for the target kernel 2.6.18-92.1.10.el5 (on x86_64 architecture), use the following command: diff --git a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml index e5384abc..8ba7bdcf 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml @@ -4,7 +4,7 @@
- Setup and Installation + Installation and Setup required packages, installation thru yum, repos (?); possibly, a script to install all required packages @@ -107,14 +107,14 @@ uname -r The script can be used by normal users to determine what supporting kernel RPMs need to be installed on the machine to use SystemTap with a particular kernel. The script run without any arguments detemines the RPMs needed for the currently running kernel. The script can also accept one argument, the output uname -r, to determine the related RPMs required for a kernel that may not be currently running on the machine. --> - - stapprep.sh - - - - - - + +stapprep.sh + + + + + + - systemtapurl.sh +rheldebugurl.sh -pkg=`grep distroverpkg /etc/yum.conf |awk -F= '{print $2}'` -releasever=`rpm -q --qf "%{version}" $pkg` -base=`uname -m` -echo "ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$base" + - systemtapurl.sh +fedoradebugurl.sh - -echo -n "Enter nvr of kernel-debuginfo (e.g. 2.6.25-14.fc9.x86_64) " ; \ -read NVR; \ -BASE=`uname -m` ; \ -NVR=`echo $NVR | sed s/.$BASE//` ; \ -VERSION=`echo $NVR | awk -F- '{print $1}'` ; \ -RELEASE=`echo $NVR | awk -F- '{print $2}'` ; \ -echo "http://kojipkgs.fedoraproject.org/\ -packages/kernel/$VERSION/$RELEASE/$BASE/" + + diff --git a/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml b/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml index 7fc93e8b..f71483d7 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml @@ -73,7 +73,9 @@ -v - Makes the output of the SystemTap session more verbose. You can repeat this option to (for example, stap -vvv script.stp); provide more details on the script's execution. This option is particularly useful if you encounter any errors in running the script. + Makes the output of the SystemTap session more + verbose. You can repeat this option (for example, stap + -vvv script.stp) to provide more details on the script's execution. This option is particularly useful if you encounter any errors in running the script. For more information about common SystemTap script errors, refer to . diff --git a/doc/SystemTap_Beginners_Guide/en-US/extras/fedoradebugurl.sh b/doc/SystemTap_Beginners_Guide/en-US/extras/fedoradebugurl.sh new file mode 100755 index 00000000..ac6b5251 --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/extras/fedoradebugurl.sh @@ -0,0 +1,9 @@ +#! /bin/bash +echo -n "Enter nvr of kernel-debuginfo (e.g. 2.6.25-14.fc9.x86_64) " ; \ +read NVR; \ +BASE=`uname -m` ; \ +NVR=`echo $NVR | sed s/.$BASE//` ; \ +VERSION=`echo $NVR | awk -F- '{print $1}'` ; \ +RELEASE=`echo $NVR | awk -F- '{print $2}'` ; \ +echo "http://kojipkgs.fedoraproject.org/\ +packages/kernel/$VERSION/$RELEASE/$BASE/" diff --git a/doc/SystemTap_Beginners_Guide/en-US/extras/rheldebugurl.sh b/doc/SystemTap_Beginners_Guide/en-US/extras/rheldebugurl.sh new file mode 100755 index 00000000..72b03bcd --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/extras/rheldebugurl.sh @@ -0,0 +1,6 @@ +#! /bin/bash +pkg=`grep distroverpkg /etc/yum.conf |awk -F= '{print $2}'` +releasever=`rpm -q --qf "%{version}" $pkg` +base=`uname -m` +echo "ftp://ftp.redhat.com/pub/redhat/linux/\ +enterprise/$releasever/en/os/$base/Debuginfo" -- cgit