From: ddomingo Date: Mon, 17 Nov 2008 03:04:02 +0000 (+1000) Subject: revisions as per dsmith X-Git-Tag: release-0.9~258 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b3e8f644958f5033beebeb91edf11d5edf21c8c1;p=systemtap.git revisions as per dsmith --- diff --git a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml index 32fdf0219..f63d1d703 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Array-Operations.xml @@ -30,7 +30,12 @@ foo[execname()] = gettimeofday_s()
Reading Values From Arrays - You can also use the = operator to read values from an array. This is accomplished by simply including the array_name[index_expression] as an element in a mathematical expression. For example: + You can also read values from an array the same way you would read the value of a variable. + To do so, include the + array_name[index_expression] + statement as an element in a mathematical expression. For example: + Using Array Values in Simple Computations @@ -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() + } } @@ -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() } } diff --git a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml index 99d578673..568cb74ce 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml @@ -63,6 +63,14 @@ kernel-devel + + Likewise, the necessary packages for the PAE kernel would be + kernel-PAE-debuginfo, kernel-PAE-debuginfo-common, + and kernel-PAE-devel. + + + + To determine what kernel your system is currently using, use: @@ -82,12 +90,18 @@ uname -r Important - The version and architecture of the -devel, -debuginfo and -debuginfo-common packages must match the kernel you wish to probe with SystemTap exactly. + The version, variant, and architecture of the -devel, -debuginfo and -debuginfo-common packages must match the kernel you wish to probe with SystemTap exactly. - To help ease your deployment of SystemTap, you can use . You can use to detemine the kernel information packages you need to install in order to run SystemTap. If you run (as an ordinary, non-root user) without any arguments, it will display the kernel information packages required for the loaded kernel. You can also pass a specific kernel version to (e.g. 2.6.18-92.el5) if you wish to probe a kernel that is not currently loaded. + To help ease your deployment of SystemTap, you can use . + determines the kernel information packages you need to install in order + to run SystemTap. If you run (as an ordinary, non-root user) without + any arguments, it will display the kernel information packages required for the + loaded kernel. You can also pass a specific kernel version to + (e.g. 2.6.18-92.el5) if you wish + to probe a kernel that is not currently loaded. @@ -176,13 +190,13 @@ Once you have manually downloaded the required packages to the machine, install --> -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. +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. The last three lines of the output (i.e. beginning with diff --git a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml index b1f40669f..fccf04692 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml @@ -71,18 +71,22 @@ if (condition) ifelse.stp -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) -} +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) +} + diff --git a/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml b/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml index 3324a50d5..f16373563 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml @@ -49,8 +49,18 @@ stapdev - Members of this group can use stap to run SystemTap scripts, or staprun to run SystemTap instrumentation modules. + Members of this group can use stap to run SystemTap scripts, or staprun to run SystemTap instrumentation modules. + + + + + Running stap involves compiling SystemTap scripts into kernel modules and + loading them into the kernel. This requires elevated privileges to the system, which are granted + to stapdev members. Unfortunately, such privileges also grant effective root + access to stapdev members. As such, you should only grant + stapdev group membership to users whom you can trust root access. +