summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Beginners_Guide
diff options
context:
space:
mode:
authorddomingo <ddomingo@redhat.com>2008-11-05 10:35:18 +1000
committerddomingo <ddomingo@redhat.com>2008-11-05 10:35:18 +1000
commitd706e984ee8c60d278859a15c74b5a60829789f7 (patch)
treece60b3fd82148dab52fb57d793a841f8865e2c67 /doc/SystemTap_Beginners_Guide
parentf207b82a4ffcba90a35ae5b8cf07a1bd19e2be69 (diff)
downloadsystemtap-steved-d706e984ee8c60d278859a15c74b5a60829789f7.tar.gz
systemtap-steved-d706e984ee8c60d278859a15c74b5a60829789f7.tar.xz
systemtap-steved-d706e984ee8c60d278859a15c74b5a60829789f7.zip
proofreading run 1
Diffstat (limited to 'doc/SystemTap_Beginners_Guide')
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml30
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Installation.xml50
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Introduction.xml9
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch.xml3
4 files changed, 39 insertions, 53 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml b/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml
index a16e4f48..8a772f15 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml
@@ -23,22 +23,11 @@
</para>
<para>
- Normally, however, SystemTap scripts can only be run on systems where
- SystemTap is deployed (as in <xref linkend="installproper"/>). This could
- mean that if you want to run SystemTap on ten systems, you would need to
- deploy SystemTap on <emphasis>all</emphasis> those systems. In some cases,
- this may be neither feasible nor desired to fully deploy SystemTap on those
- systems. 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 <xref linkend="installproper"/>). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on <emphasis>all</emphasis> 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.
</para>
<para>
- To work around this, you can resort to
- <firstterm>cross-instrumentation</firstterm>. Cross-instrumentation is the
- process of generating SystemTap instrumentation module from a SystemTap
- script on one computer to be used on another computer. This process offers
- the following benefits:
+ To work around this, you can resort to <firstterm>cross-instrumentation</firstterm>. Cross-instrumentation is the process of generating SystemTap instrumentation module from a SystemTap script on one computer to be used on another computer. This process offers the following benefits:
</para>
<itemizedlist>
@@ -186,10 +175,9 @@
appropriate values):
</para>
- <para>
- <command>stap -r <replaceable>kernel_version</replaceable> <replaceable>script</replaceable> -m
- <replaceable>module_name</replaceable></command>
- </para>
+<screen>
+stap -r <replaceable>kernel_version</replaceable> <replaceable>script</replaceable> -m <replaceable>module_name</replaceable>
+</screen>
<para>
Here, <command><replaceable>kernel_version</replaceable></command> refers to
@@ -214,9 +202,9 @@
it to the <emphasis>target system</emphasis> and load it using:
</para>
- <para>
- <command>staprun <replaceable>module_name</replaceable>.ko</command>
- </para>
+<screen>
+staprun <replaceable>module_name</replaceable>.ko
+</screen>
<para>
For example, to create the <emphasis>instrumentation module</emphasis>
@@ -249,7 +237,7 @@
<para>
The <emphasis>host system</emphasis> must be the same architecture and
running the same distribution of Linux as the <emphasis>target
- system</emphasis> in order for the <emphasis>instrumentation
+ system</emphasis> in order for the built <emphasis>instrumentation
module</emphasis> to work.
</para>
</important>
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml
index f2c0cd92..80ee8bd7 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml
@@ -121,42 +121,34 @@
</formalpara>
<para>
- If the yum-utils package is installed on the computer and has access to
- the <command>yum</command> repositories,
- the <command>stapprep.sh</command> script can be run
- by root to download and install the needed kernel packages via
- <command>yum</command> and <command>rpm</command> commands. Thus, the
- system administrator should be able to install the needed RPMs with the
- script on the machine:
+ If the <filename>yum-utils</filename> package is installed and the <command>yum</command> repositories are set up properly, you can run the <xref linkend="stapprep"/> script as root. <xref linkend="stapprep"/> will automatically download and install the required packages via <command>yum</command> and <command>rpm</command> commands (assuming that the kernel you wish to probe is currently loaded).
</para>
- <screen>
- ./stapprep.sh
- </screen>
<!-- The script assumes the Red Hat Enterprise Linux debuginfo repository,
<filename>rhel-debuginfo</filename>, but this could be changed. One could
search the /etc/yum.repo.d/ directory for debuginfo repositories -->
- <para>
- If <command>yum</command> is not available on a Red Hat Enterprise Linux
- 5 machine, the following lines of bash script will generate the URL for
- the debuginfo RPM directory:
- </para>
-
-<screen>
+<para>
+ If you do not have <command>yum</command> installed and you are unable to install it, you will have to manually download and install the required packages. To generate the URL from which to download the required packages, use the following script:
+</para>
+
+<formalpara condition="RedHat">
+ <title>systemtapurl.sh</title>
+<para>
+<programlisting>
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"
-</screen>
+</programlisting>
+</para>
+</formalpara>
- <para>
- If <command>yum</command> in not available on a Fedora system, the
- following lines of bash script will generate the URL for the location to
- find the needed kernel RPMs:
- </para>
-<screen>
+<formalpara condition="fedora">
+ <title>systemtapurl.sh</title>
+<para>
+ <programlisting>
echo -n "Enter nvr of kernel-debuginfo (e.g. 2.6.25-14.fc9.x86_64) " ; \
read NVR; \
BASE=`uname -m` ; \
@@ -165,13 +157,11 @@ VERSION=`echo $NVR | awk -F- '{print $1}'` ; \
RELEASE=`echo $NVR | awk -F- '{print $2}'` ; \
echo "http://kojipkgs.fedoraproject.org/\
packages/kernel/$VERSION/$RELEASE/$BASE/"
-</screen>
-
+</programlisting>
+</para>
+</formalpara>
<para>
- The package RPMs can be manually downloaded and copied to the
- machine. Once you have manually copied the packages to the
- machine, install the RPMs by running <command>rpm --force -ivh
- <replaceable>package_names</replaceable></command>.
+Once you have manually downloaded the required packages to the machine, install the RPMs by running <command>rpm --force -ivh <replaceable>package_names</replaceable></command>.
</para>
</section>
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml
index 36dd3c44..dbca02fc 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml
@@ -8,11 +8,16 @@
SystemTap is a tracing and probing tool that allows users to study and monitor the activities of the operating system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like <command>netstat</command>, <command>ps</command>, <command>top</command>, and <command>iostat</command>; however, SystemTap is designed to provide more filtering and analysis options for collected information.
</para>
- <para>
+ <para condition="RedHat">
For system administrators, SystemTap can be used as a performance monitoring tool for &PROD;. It is most useful when other similar tools cannot precisely pinpoint a bottleneck in the system, requiring a deep analysis of kernel activity. In the same manner, application developers can also use SystemTap to monitor, in finer detail, how their application behaves within the Linux system.
</para>
+ <para condition="fedora">
+ For system administrators, SystemTap can be used as a performance monitoring tool for &PROD2;. It is most useful when other similar tools cannot precisely pinpoint a bottleneck in the system, requiring a deep analysis of kernel activity. In the same manner, application developers can also use SystemTap to monitor, in finer detail, how their application behaves within the Linux system.
+ </para>
+
+
<!--
<para>
SystemTap was developed as a Linux version of the DTrace tool (for <trademark>Sun Solaris</trademark>).
@@ -20,7 +25,7 @@
-->
<section id="goals">
<title>Documentation Goals</title>
- <para>SystemTap provides the infrastructure to monitor the running Linux kernel for detailed analysis. This can assist administrators and developers in identifying the underlying cause of a performance or functional problem.</para>
+ <para>SystemTap provides the infrastructure to monitor the running Linux kernel for detailed analysis. This can assist administrators and developers in identifying the underlying cause of a bug or performance problem.</para>
<para>Without SystemTap, monitoring the activity of a running kernel would require a tedious instrument, recompile, install, and reboot sequence. SystemTap is designed to eliminate this, allowing users to gather the same information by simply running user-written SystemTap scripts.</para>
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch.xml
index 2ac1366d..e747771b 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-inodewatch.xml
@@ -27,6 +27,9 @@ no script in examples
</para>
</formalpara>
+<remark>need to add references to sources/man pages that explain how "dev_nr = $file->f_dentry->d_inode->i_sb->s_dev" and "($1 &lt;&lt; 20 | $2)".</remark>
+
+
<para><xref linkend="inodewatch"/> takes the following information about the file as an argument:</para>
<itemizedlist>