summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Beginners_Guide/en-US
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2008-12-15 14:29:30 -0500
committerWilliam Cohen <wcohen@redhat.com>2008-12-15 14:29:30 -0500
commitcffd1e12179857f6fc50d848c7ecc35742aca75e (patch)
tree4a6ffd428e1eb30e01d325c5cc77b74e5a916419 /doc/SystemTap_Beginners_Guide/en-US
parent131f843df14c779d99094921a076adbea6e65c32 (diff)
downloadsystemtap-steved-cffd1e12179857f6fc50d848c7ecc35742aca75e.tar.gz
systemtap-steved-cffd1e12179857f6fc50d848c7ecc35742aca75e.tar.xz
systemtap-steved-cffd1e12179857f6fc50d848c7ecc35742aca75e.zip
Minor edits and format corrections.
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US')
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Scripts.xml138
-rw-r--r--doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml2
2 files changed, 70 insertions, 70 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml
index fe2e69f4..bb71625e 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml
@@ -129,7 +129,7 @@
</indexterm>
<para>
SystemTap scripts use the file extension <filename>.stp</filename>, and
- are conatains probes written in the following format:
+ contains probes written in the following format:
</para>
</formalpara>
<screen>
@@ -555,21 +555,21 @@ probe timer.s(4)
</indexterm>
<para> Consider the following sample script: </para>
- <example id="helloworld"><title>helloworld.stp</title>
- <programlisting>
- probe begin
- {
- printf ("hello world\n")
- exit ()
- }
- </programlisting>
- </example>
+<example id="helloworld"><title>helloworld.stp</title>
+<programlisting>
+probe begin
+{
+ printf ("hello world\n")
+ exit ()
+}
+</programlisting>
+</example>
<para>
In <xref linkend="helloworld"/>, the event <command>begin</command>
(i.e. the start of the session) triggers the handler enclosed in
<command>{ }</command>, which simply prints <command>hello
- world</command>, then exits.
+ world</command> followed by a new-line, then exits.
</para>
<note>
@@ -666,15 +666,15 @@ probe timer.s(4)
<para> To illustrate this, consider the following probe example: </para>
- <example id="syscall-open">
- <title>variables-in-printf-statements.stp</title>
- <programlisting>
- probe syscall.open
- {
- printf ("%s(%d) open\n", execname(), pid())
- }
- </programlisting>
- </example>
+<example id="syscall-open">
+<title>variables-in-printf-statements.stp</title>
+<programlisting>
+probe syscall.open
+{
+ printf ("%s(%d) open\n", execname(), pid())
+}
+</programlisting>
+</example>
<para>
<xref linkend="syscall-open"/> instructs SystemTap to probe all entries to
@@ -688,16 +688,16 @@ probe timer.s(4)
to "argument1", "format specifier2" is to "argument2", or is this clear
enough? </remark>
- <screen>
- vmware-guestd(2206) open
- hald(2360) open
- hald(2360) open
- hald(2360) open
- df(3433) open
- df(3433) open
- df(3433) open
- hald(2360) open
- </screen>
+<screen>
+vmware-guestd(2206) open
+hald(2360) open
+hald(2360) open
+hald(2360) open
+df(3433) open
+df(3433) open
+df(3433) open
+hald(2360) open
+</screen>
<formalpara id="systemtapscript-functions">
<title>SystemTap Functions</title>
@@ -945,42 +945,42 @@ probe timer.s(4)
<command>thread_indent()</command>:
</para>
- <example id="thread_indent"><title>thread_indent.stp</title>
- <programlisting>
- probe kernel.function("*@net/socket.c")
- {
- printf ("%s -> %s\n", thread_indent(1), probefunc())
- }
- probe kernel.function("*@net/socket.c").return
- {
- printf ("%s &lt;- %s\n", thread_indent(-1), probefunc())
- }
- </programlisting>
- </example>
+<example id="thread_indent"><title>thread_indent.stp</title>
+<programlisting>
+probe kernel.function("*@net/socket.c")
+{
+ printf ("%s -> %s\n", thread_indent(1), probefunc())
+}
+probe kernel.function("*@net/socket.c").return
+{
+ printf ("%s &lt;- %s\n", thread_indent(-1), probefunc())
+}
+</programlisting>
+</example>
<para>
<xref linkend="thread_indent"/> prints out the
<command>thread_indent()</command> and probe functions at each event
in the following format:</para>
- <screen>
- 0 ftp(7223): -&gt; sys_socketcall
- 1159 ftp(7223): -&gt; sys_socket
- 2173 ftp(7223): -&gt; __sock_create
- 2286 ftp(7223): -&gt; sock_alloc_inode
- 2737 ftp(7223): &lt;- sock_alloc_inode
- 3349 ftp(7223): -&gt; sock_alloc
- 3389 ftp(7223): &lt;- sock_alloc
- 3417 ftp(7223): &lt;- __sock_create
- 4117 ftp(7223): -&gt; sock_create
- 4160 ftp(7223): &lt;- sock_create
- 4301 ftp(7223): -&gt; sock_map_fd
- 4644 ftp(7223): -&gt; sock_map_file
- 4699 ftp(7223): &lt;- sock_map_file
- 4715 ftp(7223): &lt;- sock_map_fd
- 4732 ftp(7223): &lt;- sys_socket
- 4775 ftp(7223): &lt;- sys_socketcall
- </screen>
+<screen>
+0 ftp(7223): -&gt; sys_socketcall
+1159 ftp(7223): -&gt; sys_socket
+2173 ftp(7223): -&gt; __sock_create
+2286 ftp(7223): -&gt; sock_alloc_inode
+2737 ftp(7223): &lt;- sock_alloc_inode
+3349 ftp(7223): -&gt; sock_alloc
+3389 ftp(7223): &lt;- sock_alloc
+3417 ftp(7223): &lt;- __sock_create
+4117 ftp(7223): -&gt; sock_create
+4160 ftp(7223): &lt;- sock_create
+4301 ftp(7223): -&gt; sock_map_fd
+4644 ftp(7223): -&gt; sock_map_file
+4699 ftp(7223): &lt;- sock_map_file
+4715 ftp(7223): &lt;- sock_map_fd
+4732 ftp(7223): &lt;- sys_socket
+4775 ftp(7223): &lt;- sys_socketcall
+</screen>
<para>This sample output contains the following information:</para>
@@ -1073,15 +1073,15 @@ probe timer.s(4)
to it. For example:
</para>
- <example id="targetexample">
- <title>targetexample.stp</title>
- <programlisting>
- probe syscall.* {
- if (pid() == target())
- printf("%s/n", name)
- }
- </programlisting>
- </example>
+<example id="targetexample">
+<title>targetexample.stp</title>
+<programlisting>
+probe syscall.* {
+ if (pid() == target())
+ printf("%s/n", name)
+}
+</programlisting>
+</example>
<para>
When <xref linkend="targetexample"/> is run with the argument
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml
index 4e61e247..d9fe6ab4 100644
--- a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml
+++ b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml
@@ -53,7 +53,7 @@
expiration, session termination, etc. A handler is a series of script
language statements that specify the work to be done whenever the event
occurs. This work normally includes extracting data from the event context,
- storing them into internal variables, or printing results.
+ storing them into internal variables, and printing results.
</para>
<section id="understanding-architecture-tools">