]> sourceware.org Git - systemtap.git/commitdiff
revisions as per dsmith
authorddomingo <ddomingo@redhat.com>
Mon, 17 Nov 2008 03:04:02 +0000 (13:04 +1000)
committerddomingo <ddomingo@redhat.com>
Mon, 17 Nov 2008 03:04:02 +0000 (13:04 +1000)
doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml
doc/SystemTap_Beginners_Guide/en-US/Installation.xml
doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml
doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml

index 32fdf0219c640be66fddd963eda817dc1b656249..f63d1d70397c7a70a688775d3b16008a9a4c3e36 100644 (file)
@@ -30,7 +30,12 @@ foo[execname()] = gettimeofday_s()
 </section>
 <section id="arrayops-readvalues">
        <title>Reading Values From Arrays</title>
-       <para>You can also use the <command>=</command> operator to read values from an array. This is accomplished by simply including the <command><replaceable>array_name</replaceable>[<replaceable>index_expression</replaceable>]</command> as an element in a mathematical expression. For example:</para>
+       <para>You can also read values from an array the same way you would read the value of a variable. 
+       To do so, include the  
+       <command><replaceable>array_name</replaceable>[<replaceable>index_expression</replaceable>]</command> 
+       statement as an element in a mathematical expression. For example:</para>       
+<!--   
+       <para>You can also use the <command>=</command> operator to read values from an array. This is accomplished by simply including the <command><replaceable>array_name</replaceable>[<replaceable>index_expression</replaceable>]</command> as an element in a mathematical expression. For example:</para>-->
 
 <example id="arrayreadingvaluesfrom">
        <title>Using Array Values in Simple Computations</title>
@@ -187,7 +192,9 @@ probe timer.s(2)
        foreach (count in reads+) 
                printf("%s : %d \n", count, reads[count])
        if(reads["stapio"] >= 20)
-       {exit()}
+       {
+               exit()
+       }
 }
 </programlisting>
 </example>
@@ -221,7 +228,8 @@ probe timer.s(2)
        foreach (count in reads+) 
                printf("%s : %d \n", count, reads[count])
        if(["stapio"] in reads)
-       {printf("stapio read detected, exiting\n")
+       {
+               printf("stapio read detected, exiting\n")
                exit()
        }
 }
index 99d578673bcdc8bb5f36a258eb8a971078279088..568cb74ce808bf2c8621d59e060aabeec9ba716e 100644 (file)
       <listitem><para><filename>kernel-devel</filename></para></listitem>
     </itemizedlist>
 
+       <para>
+           Likewise, the necessary packages for the PAE kernel would be 
+           <filename>kernel-PAE-debuginfo</filename>, <filename>kernel-PAE-debuginfo-common</filename>,
+           and <filename>kernel-PAE-devel</filename>.
+       </para>
+                   
+
+    
     <para> To determine what kernel your system is currently using, use:</para>
                
 <screen>
@@ -82,12 +90,18 @@ uname -r
       <title>Important</title>
        
       <para>
-       The version and architecture of the <filename>-devel</filename>, <filename>-debuginfo</filename> and <filename>-debuginfo-common</filename> packages must match the kernel you wish to probe with SystemTap <emphasis>exactly</emphasis>.
+       The version, variant, and architecture of the <filename>-devel</filename>, <filename>-debuginfo</filename> and <filename>-debuginfo-common</filename> packages must match the kernel you wish to probe with SystemTap <emphasis>exactly</emphasis>.
       </para>
     </important>
 
 <para>
-       To help ease your deployment of SystemTap, you can use <xref linkend="stapprep"/>. You can use <xref linkend="stapprep"/> to detemine the kernel information packages you need to install in order to run SystemTap. If you run <xref linkend="stapprep"/> (as an ordinary, non-root user) without any arguments, it will display the kernel information packages required for the <emphasis>loaded</emphasis> kernel. You can also pass a specific kernel version to <xref linkend="stapprep"/>  (e.g. <computeroutput>2.6.18-92.el5</computeroutput>) if you wish to probe a kernel that is not currently loaded.
+       To help ease your deployment of SystemTap, you can use <xref linkend="stapprep"/>. 
+       <xref linkend="stapprep"/> determines the kernel information packages you need to install in order
+       to run SystemTap. If you run <xref linkend="stapprep"/> (as an ordinary, non-root user) without 
+       any arguments, it will display the kernel information packages required for the 
+       <emphasis>loaded</emphasis> kernel. You can also pass a specific kernel version to 
+       <xref linkend="stapprep"/>  (e.g. <computeroutput>2.6.18-92.el5</computeroutput>) if you wish 
+       to probe a kernel that is not currently loaded.
 </para>
 
 <note>
@@ -176,13 +190,13 @@ Once you have manually downloaded the required packages to the machine, install
     </para>-->
 
 <screen>
-Pass 1: parsed user script and 45 library script(s) in 340usr/0sys/358real ms.\r
-Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in 290usr/260sys/568real ms.\r
-Pass 3: translated to C into "/tmp/stapiArgLX/stap_e5886fa50499994e6a87aacdc43cd392_399.c" in 490usr/430sys/938real ms.\r
-Pass 4: compiled C into "stap_e5886fa50499994e6a87aacdc43cd392_399.ko" in 3310usr/430sys/3714real ms.\r
-Pass 5: starting run.\r
-read performed\r
-Pass 5: run completed in 10usr/40sys/73real ms.\r
+Pass 1: parsed user script and 45 library script(s) in 340usr/0sys/358real ms.
+Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in 290usr/260sys/568real ms.
+Pass 3: translated to C into "/tmp/stapiArgLX/stap_e5886fa50499994e6a87aacdc43cd392_399.c" in 490usr/430sys/938real ms.
+Pass 4: compiled C into "stap_e5886fa50499994e6a87aacdc43cd392_399.ko" in 3310usr/430sys/3714real ms.
+Pass 5: starting run.
+read performed
+Pass 5: run completed in 10usr/40sys/73real ms.
 </screen>
 
     <para> The last three lines of the output (i.e. beginning with
index b1f40669f6bb8e605adfd481eb46a0934f027cdd..fccf0469245a04c0ab3397d6e4fc62731d1f7bb4 100644 (file)
@@ -71,18 +71,22 @@ if (<replaceable>condition</replaceable>)
 <example id="simpleifelseexample">
        <title>ifelse.stp</title>
 <programlisting>
-global countread, countnonread\r
-probe kernel.function("vfs_read"),kernel.function("vfs_write")\r
-{\r
-       if (probefunc()=="vfs_read") {\r
-       countread ++ }\r
-       else {countnonread ++}\r
-}\r
-probe timer.s(5) { exit() }\r
-probe end \r
-{\r
-       printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread)\r
-}\r 
+global countread, countnonread
+probe kernel.function("vfs_read"),kernel.function("vfs_write")
+{
+       if (probefunc()=="vfs_read") {
+               countread ++ 
+       }
+       else {
+               countnonread ++
+       }
+}
+probe timer.s(5) { exit() }
+probe end 
+{
+       printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread)
+}
 </programlisting>
 </example>
 
index 3324a50d526f5a078e62d0de09778237646476f9..f16373563f4624cae7cb579afebb14c0eae47ace 100644 (file)
        <term>stapdev</term>
        <listitem>
 <para>
-       Members of this group can use <command>stap</command> to run SystemTap scripts, or <command>staprun</command> to run SystemTap instrumentation modules.
+       Members of this group can use <command>stap</command> to run SystemTap scripts, or <command>staprun</command> to run SystemTap instrumentation modules. 
+</para>        
+       
+
+<para>
+       Running <command>stap</command> involves compiling SystemTap scripts into kernel modules and 
+       loading them into the kernel. This requires elevated privileges to the system, which are granted 
+       to <command>stapdev</command> members. Unfortunately, such privileges also grant effective root 
+       access to <command>stapdev</command> members. As such, you should only grant  
+       <command>stapdev</command> group membership to users whom you can trust root access.
 </para>
+       
        </listitem>
 </varlistentry>
 
This page took 0.036192 seconds and 5 git commands to generate.