summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-23 19:08:51 -0500
committerDave Brolley <brolley@redhat.com>2009-11-23 19:08:51 -0500
commit5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba (patch)
treee44ad8807e0b5b2e1bb85682f677d492f1195dbf /testsuite
parent562d60b004e3d7ae73c1c7508be529006bd6430f (diff)
parent90bba7158de040705a101ba1fdf6062866b4b4e9 (diff)
downloadsystemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.tar.gz
systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.tar.xz
systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts: configure
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/buildok/ioblock_test.stp7
-rwxr-xr-xtestsuite/buildok/ioscheduler.stp12
-rwxr-xr-xtestsuite/buildok/netdev.stp4
-rwxr-xr-xtestsuite/buildok/xtime.stp7
-rw-r--r--testsuite/lib/stap_compile.exp2
-rw-r--r--testsuite/systemtap.base/cu-decl-1.c17
-rw-r--r--testsuite/systemtap.base/cu-decl-2.c10
-rw-r--r--testsuite/systemtap.base/cu-decl.exp25
-rw-r--r--testsuite/systemtap.base/externalvar.c52
-rw-r--r--testsuite/systemtap.base/externalvar.exp70
-rw-r--r--testsuite/systemtap.base/externalvar.stp39
-rw-r--r--testsuite/systemtap.base/externalvar_lib.c43
-rwxr-xr-xtestsuite/systemtap.examples/general/badname.stp2
-rwxr-xr-xtestsuite/systemtap.examples/general/grapher.stp2
-rwxr-xr-xtestsuite/systemtap.examples/general/graphs.stp2
-rw-r--r--testsuite/systemtap.examples/index.html29
-rw-r--r--testsuite/systemtap.examples/index.txt64
-rw-r--r--testsuite/systemtap.examples/interrupt/interrupts-by-dev.meta14
-rwxr-xr-x[-rw-r--r--]testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp0
-rw-r--r--testsuite/systemtap.examples/io/ioblktime.meta2
-rw-r--r--testsuite/systemtap.examples/io/iotime.meta2
-rwxr-xr-xtestsuite/systemtap.examples/io/iotime.stp2
-rwxr-xr-xtestsuite/systemtap.examples/io/ttyspy.stp4
-rw-r--r--testsuite/systemtap.examples/keyword-index.html53
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt121
-rw-r--r--testsuite/systemtap.examples/locks/bkl_stats.meta2
-rwxr-xr-xtestsuite/systemtap.examples/locks/bkl_stats.stp10
-rw-r--r--testsuite/systemtap.examples/memory/kmalloc-top.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmanonpage.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmreclaim.meta2
-rw-r--r--testsuite/systemtap.examples/memory/mmwriteback.meta2
-rw-r--r--testsuite/systemtap.examples/network/socket-trace.meta2
-rw-r--r--testsuite/systemtap.examples/network/tcpipstat.meta2
-rwxr-xr-xtestsuite/systemtap.examples/process/errsnoop.stp3
-rw-r--r--testsuite/systemtap.examples/process/forktracker.meta2
-rwxr-xr-xtestsuite/systemtap.examples/process/forktracker.stp2
-rw-r--r--testsuite/systemtap.examples/process/schedtimes.meta2
-rw-r--r--testsuite/systemtap.examples/process/sigkill.meta2
-rw-r--r--testsuite/systemtap.examples/process/sleepingBeauties.meta2
-rwxr-xr-xtestsuite/systemtap.examples/process/sleepingBeauties.stp2
-rwxr-xr-xtestsuite/systemtap.examples/process/wait4time.stp5
-rwxr-xr-xtestsuite/systemtap.examples/profiling/latencytap.stp10
-rw-r--r--testsuite/systemtap.pass1-4/buildok.exp4
43 files changed, 474 insertions, 169 deletions
diff --git a/testsuite/buildok/ioblock_test.stp b/testsuite/buildok/ioblock_test.stp
index 4d3dadfa..21595021 100755
--- a/testsuite/buildok/ioblock_test.stp
+++ b/testsuite/buildok/ioblock_test.stp
@@ -25,3 +25,10 @@ probe ioblock.end {
devname, sector, flags, rw, bio_rw_str(rw), vcnt, idx, phys_segments, size, bytes_done, error, ino)
%)
}
+
+probe ioblock_trace.*
+{
+ log(pp())
+ printf("%s\t%d\t%d\t%d\t%d\t%s\t%d\t%d\t%d\t%d\t%d\t%d\t%p\t%p\t%d\n",
+ devname, q, sector, flags, rw, bio_rw_str(rw), vcnt, idx, phys_segments, size, bytes_done, ino, p_start_sect, bdev_contains, bdev)
+}
diff --git a/testsuite/buildok/ioscheduler.stp b/testsuite/buildok/ioscheduler.stp
index 2d88d2d5..8b377619 100755
--- a/testsuite/buildok/ioscheduler.stp
+++ b/testsuite/buildok/ioscheduler.stp
@@ -7,3 +7,15 @@ probe ioscheduler.*
printf("ppname: %s, elv_name: %s, %d, %d", probefunc(),
elevator_name, disk_major, disk_minor)
}
+
+probe ioscheduler_trace.elv*
+{
+ printf("ppname: %s, request %p, elv_name: %s, %d, %d", probefunc(),
+ rq, elevator_name, disk_major, disk_minor)
+}
+
+probe ioscheduler_trace.plug, ioscheduler_trace.unplug_io, ioscheduler_trace.unplug_timer
+{
+ printf("ppname: %s, request %p", probefunc(), rq_queue)
+}
+
diff --git a/testsuite/buildok/netdev.stp b/testsuite/buildok/netdev.stp
index 49a1eb5c..7e4be82c 100755
--- a/testsuite/buildok/netdev.stp
+++ b/testsuite/buildok/netdev.stp
@@ -1,6 +1,6 @@
#! stap -wp4
-probe netdev.get_stats{
+probe netdev.get_stats ? {
printf("%s", dev_name)
}
@@ -21,7 +21,7 @@ probe netdev.set_promiscuity {
disable, inc)
}
-probe netdev.change_rx_flag {
+probe netdev.change_rx_flag ? {
printf("%s %d", dev_name, flags)
}
diff --git a/testsuite/buildok/xtime.stp b/testsuite/buildok/xtime.stp
new file mode 100755
index 00000000..e41f9b16
--- /dev/null
+++ b/testsuite/buildok/xtime.stp
@@ -0,0 +1,7 @@
+#! stap -p4
+
+# Test for getting at an external global variable PR10622
+probe kernel.function("do_gettimeofday")
+{
+ printf("xtime.tv_sec:%d\n", $xtime->tv_sec); exit();
+}
diff --git a/testsuite/lib/stap_compile.exp b/testsuite/lib/stap_compile.exp
index c8d44203..8780930e 100644
--- a/testsuite/lib/stap_compile.exp
+++ b/testsuite/lib/stap_compile.exp
@@ -19,8 +19,8 @@ proc stap_compile { TEST_NAME compile script args } {
-re "compilation failed" {incr compile_errors 1; exp_continue}
-re "semantic error:" {incr compile_errors 1; exp_continue}
}
- catch close
set res [wait -i $spawn_id]
+ catch close
set res [lindex $res 3]
if {($res == 0 && $compile_errors == 0)
diff --git a/testsuite/systemtap.base/cu-decl-1.c b/testsuite/systemtap.base/cu-decl-1.c
new file mode 100644
index 00000000..9743d298
--- /dev/null
+++ b/testsuite/systemtap.base/cu-decl-1.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+struct foo;
+struct foo* get_foo(void);
+
+void
+print(struct foo* f)
+{
+ printf("%p\n", f);
+}
+
+int
+main()
+{
+ print(get_foo());
+ return 0;
+}
diff --git a/testsuite/systemtap.base/cu-decl-2.c b/testsuite/systemtap.base/cu-decl-2.c
new file mode 100644
index 00000000..46503251
--- /dev/null
+++ b/testsuite/systemtap.base/cu-decl-2.c
@@ -0,0 +1,10 @@
+struct foo {
+ int x, y;
+};
+
+struct foo*
+get_foo()
+{
+ static struct foo f = { 6, 7 };
+ return &f;
+}
diff --git a/testsuite/systemtap.base/cu-decl.exp b/testsuite/systemtap.base/cu-decl.exp
new file mode 100644
index 00000000..ae06ad85
--- /dev/null
+++ b/testsuite/systemtap.base/cu-decl.exp
@@ -0,0 +1,25 @@
+# Check that we can dereference a type declaration that is
+# defined in a separate CU from the function.
+set test "cu-decl"
+
+set script {
+ probe process("cu-decl").function("print") {
+ println($f->x * $f->y)
+ }
+}
+
+set sources "$srcdir/$subdir/$test-1.c $srcdir/$subdir/$test-2.c"
+set res [target_compile $sources $test executable "additional_flags=-g"]
+if { $res != "" } {
+ verbose "target_compile failed: $res" 2
+ fail "$test target compilation"
+ untested "$test"
+} else {
+ pass "$test target compilation"
+}
+if {![utrace_p]} {
+ untested "$test : no kernel utrace support found"
+} else {
+ stap_compile $test 1 "{$script}"
+}
+catch {exec rm $test}
diff --git a/testsuite/systemtap.base/externalvar.c b/testsuite/systemtap.base/externalvar.c
new file mode 100644
index 00000000..a7716029
--- /dev/null
+++ b/testsuite/systemtap.base/externalvar.c
@@ -0,0 +1,52 @@
+/* externalvar test case
+ * Copyright (C) 2009, Red Hat Inc.
+ *
+ * This file is part of systemtap, and is free software. You can
+ * redistribute it and/or modify it under the terms of the GNU General
+ * Public License (GPL); either version 2, or (at your option) any
+ * later version.
+ *
+ * Tests that an external exported variable can be accessed.
+ */
+
+#include <stdlib.h>
+
+// function from our library
+int lib_main (void);
+
+struct exestruct
+{
+ char c;
+ int i;
+ long l;
+ struct exestruct *s1;
+ struct exestruct *s2;
+};
+
+char exevar_c;
+int exevar_i;
+long exevar_l;
+struct exestruct *exe_s;
+
+static void
+main_call ()
+{
+ asm (""); // dummy method, just to probe and extract and jump into lib.
+ lib_main ();
+}
+
+int
+main ()
+{
+ exevar_c = 42;
+ exevar_i = 2;
+ exevar_l = 21;
+ exe_s = (struct exestruct *) malloc(sizeof(struct exestruct));
+ exe_s->i =1;
+ exe_s->l =2;
+ exe_s->c =3;
+ exe_s->s1 = NULL;
+ exe_s->s2 = exe_s;
+ main_call ();
+ return 0;
+}
diff --git a/testsuite/systemtap.base/externalvar.exp b/testsuite/systemtap.base/externalvar.exp
new file mode 100644
index 00000000..668dec55
--- /dev/null
+++ b/testsuite/systemtap.base/externalvar.exp
@@ -0,0 +1,70 @@
+set test "externalvar"
+set testpath "$srcdir/$subdir"
+set testsrc "$testpath/$test.c"
+set testsrclib "$testpath/${test}_lib.c"
+set testexe "[pwd]/$test"
+set testlibname "$test"
+set testlibdir "[pwd]"
+set testso "$testlibdir/lib${testlibname}.so"
+set testflags "additional_flags=-g additional_flags=-O0"
+set testlibflags "$testflags additional_flags=-fPIC additional_flags=-shared"
+set maintestflags "$testflags additional_flags=-L$testlibdir additional_flags=-l$testlibname additional_flags=-Wl,-rpath,$testlibdir"
+
+# Only run on make installcheck and utrace present.
+if {! [installtest_p]} { untested "$test"; return }
+if {! [utrace_p]} { untested "$test"; return }
+
+# Compile our test program and library.
+set res [target_compile $testsrclib $testso executable $testlibflags]
+if { $res != "" } {
+ verbose "target_compile for $testso failed: $res" 2
+ fail "unable to compile $testsrclib"
+ return
+}
+set res [target_compile $testsrc $testexe executable $maintestflags]
+if { $res != "" } {
+ verbose "target_compile failed: $res" 2
+ fail "unable to compile $testsrc"
+ return
+}
+
+set output {exevar_c = 42
+exevar_i = 2
+exevar_l = 21
+exe_s->i = 1
+exe_s->l = 2
+exe_s->c = 3
+exe_s->s1 = 0x0
+exe_s == exe_s->s2
+libvar = 42
+lib_s->i = 1
+lib_s->l = 2
+lib_s->c = 3
+lib_s == lib_s->s1
+lib_s->s2 = 0x0}
+
+# Got to run stap with both the exe and the libraries used as -d args.
+set cmd [concat stap -d $testso -d $testexe -c $testexe $testpath/$test.stp]
+send_log "cmd: $cmd\n"
+catch {eval exec $cmd} res
+send_log "cmd output: $res\n"
+
+set n 0
+set m [llength [split $output "\n"]]
+set expected [split $output "\n"]
+foreach line [split $res "\n"] {
+ if {![string equal $line [lindex $expected $n]]} {
+ fail $test
+ send_log "line [expr $n + 1]: expected \"[lindex $expected $n]\", "
+ send_log "Got \"$line\"\n"
+ return
+ }
+ incr n
+}
+if { $n != $m } {
+ fail $test
+ send_log "Got \"$n\" lines, expected \"$m\" lines\n"
+} else {
+ pass $test
+}
+# exec rm -f $testexe $testso
diff --git a/testsuite/systemtap.base/externalvar.stp b/testsuite/systemtap.base/externalvar.stp
new file mode 100644
index 00000000..7d4b69bb
--- /dev/null
+++ b/testsuite/systemtap.base/externalvar.stp
@@ -0,0 +1,39 @@
+probe process("externalvar").function("main_call")
+{
+ printf("exevar_c = %d\n", $exevar_c);
+ printf("exevar_i = %d\n", $exevar_i);
+ printf("exevar_l = %d\n", $exevar_l);
+
+ printf("exe_s->i = %d\n", $exe_s->i);
+ printf("exe_s->l = %d\n", $exe_s->l);
+ printf("exe_s->c = %d\n", $exe_s->c);
+
+ printf("exe_s->s1 = 0x%x\n", $exe_s->s1);
+ if ($exe_s == $exe_s->s2)
+ {
+ printf("exe_s == exe_s->s2\n");
+ }
+ else
+ {
+ printf("exe_s != exe_s->s2\n");
+ }
+}
+
+probe process("libexternalvar.so").function("lib_call")
+{
+ printf("libvar = %d\n", $libvar);
+
+ printf("lib_s->i = %d\n", $lib_s->i);
+ printf("lib_s->l = %d\n", $lib_s->l);
+ printf("lib_s->c = %d\n", $lib_s->c);
+
+ if ($lib_s == $lib_s->s1)
+ {
+ printf("lib_s == lib_s->s1\n");
+ }
+ else
+ {
+ printf("lib_s != lib_s->s2\n");
+ }
+ printf("lib_s->s2 = 0x%x\n", $lib_s->s2);
+}
diff --git a/testsuite/systemtap.base/externalvar_lib.c b/testsuite/systemtap.base/externalvar_lib.c
new file mode 100644
index 00000000..9017e798
--- /dev/null
+++ b/testsuite/systemtap.base/externalvar_lib.c
@@ -0,0 +1,43 @@
+/* external var test case - library helper
+ * Copyright (C) 2009, Red Hat Inc.
+ *
+ * This file is part of systemtap, and is free software. You can
+ * redistribute it and/or modify it under the terms of the GNU General
+ * Public License (GPL); either version 2, or (at your option) any
+ * later version.
+ *
+ * Tests that an external exported variable can be accessed.
+ */
+
+#include <stdlib.h>
+
+struct libstruct
+{
+ int i;
+ long l;
+ char c;
+ struct libstruct *s1;
+ struct libstruct *s2;
+};
+
+int libvar;
+struct libstruct *lib_s;
+
+static void
+lib_call ()
+{
+ asm(""); // dummy method, just to probe and extract.
+}
+
+void
+lib_main ()
+{
+ libvar = 42;
+ lib_s = (struct libstruct *) malloc(sizeof(struct libstruct));
+ lib_s->i = 1;
+ lib_s->l = 2;
+ lib_s->c = 3;
+ lib_s->s1 = lib_s;
+ lib_s->s2 = NULL;
+ lib_call ();
+}
diff --git a/testsuite/systemtap.examples/general/badname.stp b/testsuite/systemtap.examples/general/badname.stp
index 153e08c5..ba5a793c 100755
--- a/testsuite/systemtap.examples/general/badname.stp
+++ b/testsuite/systemtap.examples/general/badname.stp
@@ -1,4 +1,4 @@
-#!/usr/bin/stap -g
+#!/usr/bin/env stap
# badname.stp
# Prevent the creation of files with undesirable names.
# Source: http://blog.cuviper.com/2009/04/08/hacking-linux-filenames/
diff --git a/testsuite/systemtap.examples/general/grapher.stp b/testsuite/systemtap.examples/general/grapher.stp
index 9079cb40..e8655b37 100755
--- a/testsuite/systemtap.examples/general/grapher.stp
+++ b/testsuite/systemtap.examples/general/grapher.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap
+#! /usr/bin/env stap
probe begin
{
diff --git a/testsuite/systemtap.examples/general/graphs.stp b/testsuite/systemtap.examples/general/graphs.stp
index f55d6cee..9e322820 100755
--- a/testsuite/systemtap.examples/general/graphs.stp
+++ b/testsuite/systemtap.examples/general/graphs.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap
+#! /usr/bin/env stap
# ------------------------------------------------------------------------
# data collection
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
index 55fea0fb..57cf0978 100644
--- a/testsuite/systemtap.examples/index.html
+++ b/testsuite/systemtap.examples/index.html
@@ -58,6 +58,9 @@ keywords: <a href="keyword-index.html#SIMPLE">SIMPLE</a> <br>
<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
keywords: <a href="keyword-index.html#TRACE">TRACE</a> <a href="keyword-index.html#CALLGRAPH">CALLGRAPH</a> <br>
<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
+<li><a href="interrupt/interrupts-by-dev.stp">interrupt/interrupts-by-dev.stp</a> - Record interrupts on a per-device basis.<br>
+keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <br>
+<p>The interrupts-by-dev.stp script profiles interrupts received by each device per 100 ms.</p></li>
<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br>
keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br>
<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li>
@@ -69,7 +72,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC
<p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li>
<li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
-<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
+<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br>
<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
@@ -78,7 +81,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PRO
<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
+<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
<li><a href="io/iotop.stp">io/iotop.stp</a> - Periodically Print I/O Activity by Process Name<br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
@@ -99,22 +102,22 @@ keywords: <a href="keyword-index.html#LOCKING">LOCKING</a> <br>
<p>The bkl.stp script can help determine whether the Big Kernel Lock (BKL) is causing serialization on a multiprocessor system due to excessive contention of the BKL. The bkl.stp script takes one argument which is the number of processes waiting for the Big Kernel Lock (BKL). When the number of processes waiting for the BKL is reached or exceeded, the script will print a time stamp, the number of processes waiting for the BKL, the holder of the BKL, and the amount of time the BKL was held.</p></li>
<li><a href="locks/bkl_stats.stp">locks/bkl_stats.stp</a> - Per Process Statistics on Big Kernel Lock (BKL) Use<br>
keywords: <a href="keyword-index.html#LOCKING">LOCKING</a> <br>
-<p>The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent holding the lock for each of the processes.</p></li>
+<p>The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent in holding the lock for each of the processes.</p></li>
<li><a href="memory/kmalloc-top">memory/kmalloc-top</a> - Show Paths to Kernel Malloc (kmalloc) Invocations<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e).</p></li>
+<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).</p></li>
<li><a href="memory/mmanonpage.stp">memory/mmanonpage.stp</a> - Track Virtual Memory System Actions on Anonymous Pages<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. Its useful in debugging leaks in the anonymous regions of a process.</p></li>
+<p>The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. It's useful in debugging leaks in the anonymous regions of a process.</p></li>
<li><a href="memory/mmfilepage.stp">memory/mmfilepage.stp</a> - Track Virtual Memory System Actions on File Backed Pages<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<p>The mmfilepage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, copy on writes mapping, and unmapping operations for file backed pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. The mmfilepage.stp script is useful in debugging leaks in the mapped file regions of a process.</p></li>
<li><a href="memory/mmreclaim.stp">memory/mmreclaim.stp</a> - Track Virtual Memory System Page Reclamation<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.</p></li>
+<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. It's useful in debugging performance problems that occur due to page reclamation.</p></li>
<li><a href="memory/mmwriteback.stp">memory/mmwriteback.stp</a> - Track Virtual Memory System Writing to Disk<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.</p></li>
+<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. It's useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.</p></li>
<li><a href="memory/numa_faults.stp">memory/numa_faults.stp</a> - Summarize Process Misses across NUMA Nodes<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#NUMA">NUMA</a> <br>
<p>The numa_faults.stp script tracks the read and write pages faults for each process. When the script exits it prints out the total read and write pages faults for each process. The script also provide a break down of page faults per node for each process. This script is useful for determining whether the program has good locality (page faults limited to a single node) on a NUMA computer.</p></li>
@@ -138,7 +141,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li>
<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br>
-<p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li>
+<p>The script instruments each of the functions in the Linux kernel's net/socket.c file. The script prints out trace data. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li>
<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br>
<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li>
@@ -150,7 +153,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<p>The tcpdumplike.stp prints out a line for each TCP packet received. Each line includes the source and destination IP addresses, the source and destination ports, and flags.</p></li>
<li><a href="network/tcpipstat.stp">network/tcpipstat.stp</a> - Display network statistics for individual TCP sockets.<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#STATISTICS">STATISTICS</a> <br>
-<p>tcpipstat collects and display network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simmer to that of the command netstat -s, only sorted and grouped by individual sockets.</p></li>
+<p>tcpipstat collects and displays network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simular to that of the command netstat -s, only sorted and grouped by individual sockets.</p></li>
<li><a href="process/chng_cpu.stp">process/chng_cpu.stp</a> - Monitor Changes in Processor Executing a Task<br>
keywords: <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <br>
<p>The chng_cpu.stp script takes an argument which is the executable name of the task it should monitor. Each time a task with that executable name is found running on a different processor, the script prints out the thread id (tid), the executable name, the processor now running the task, the thread state, and a backtrace showing the kernel functions that triggered the running of the task on the processor.</p></li>
@@ -159,7 +162,7 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde
<p>The script prints a periodic tabular report about failing system calls, by process and by syscall failure. The first optional argument specifies the reporting interval (in seconds, default 5); the second optional argument gives a screen height (number of lines in the report, default 20).</p></li>
<li><a href="process/forktracker.stp">process/forktracker.stp</a> - Trace Creation of Processes<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <br>
-<p>The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful for determine what process is creating a flurry of short-lived processes.</p></li>
+<p>The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful to determine what process is creating a flurry of short-lived processes.</p></li>
<li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#LOCKING">LOCKING</a> <a href="keyword-index.html#FUTEX">FUTEX</a> <br>
<p>The script watches the futex syscall on the system. On exit the futexes address, the number of contentions, and the average time for each contention on the futex are printed from lowest pid number to highest.</p></li>
@@ -174,7 +177,7 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <br>
<p>The script prints a variety of resource limits for a given pid, like /proc/$$/limits on recent kernels.</p></li>
<li><a href="process/schedtimes.stp">process/schedtimes.stp</a> - Track Time Processes Spend in Various States using Tracepoints<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <br>
-<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
+<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
<li><a href="process/sig_by_pid.stp">process/sig_by_pid.stp</a> - Signal Counts by Process ID<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>Print signal counts by process ID in descending order.</p></li>
@@ -183,13 +186,13 @@ keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>Print signal counts by process name in descending order.</p></li>
<li><a href="process/sigkill.stp">process/sigkill.stp</a> - Track SIGKILL Signals<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
-<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name and user ID that sents the signal.</p></li>
<li><a href="process/sigmon.stp">process/sigmon.stp</a> - Track a particular signal to a specific process<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>The script watches for a particular signal sent to a specific process. When that signal is sent to the specified process, the script prints out the PID and executable of the process sending the signal, the PID and executable name of the process receiving the signal, and the signal number and name.</p></li>
<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br>
-<p>The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
+<p>The script monitors the time that threads spend in waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#SLEEP">SLEEP</a> <br>
<p>The script watches each nanosleep syscall on the system. At the end of each nanosleep syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in parentheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
index 16b45aac..56c18c34 100644
--- a/testsuite/systemtap.examples/index.txt
+++ b/testsuite/systemtap.examples/index.txt
@@ -50,6 +50,13 @@ keywords: trace callgraph
the trigger.
+interrupt/interrupts-by-dev.stp - Record interrupts on a per-device basis.
+keywords: interrupt
+
+ The interrupts-by-dev.stp script profiles interrupts received by each
+ device per 100 ms.
+
+
interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI)
keywords: interrupt backtrace
@@ -80,9 +87,9 @@ keywords: io
The ioblktime.stp script tracks the amount of time that each block IO
requests spend waiting for completion. The script computes the
- average time waiting time for block IO per device and prints list
- every 10 seconds. In some cases there can be too many outstanding
- block IO operations and the script may exceed the default number of
+ average waiting time for block IO per device and prints list every 10
+ seconds. In some cases there can be too many outstanding block IO
+ operations and the script may exceed the default number of
MAXMAPENTRIES allowed. In this case the allowed number can be
increased with "-DMAXMAPENTRIES=10000" option on the stap command
line.
@@ -112,7 +119,7 @@ keywords: syscall read write time io
The script watches each open, close, read, and write syscalls on the
system. For each file the scripts observes opened it accumulates the
- amount of wall clock time spend in read and write operations and the
+ amount of wall clock time spent in read and write operations and the
number of bytes read and written. When a file is closed the script
prints out a pair of lines for the file. Both lines begin with a
timestamp in microseconds, the PID number, and the executable name in
@@ -183,7 +190,7 @@ keywords: locking
waited for the BKL followed by the number of times that the process
waited, the minimum time of the wait, the average and the maximum
time waited. The second table lists has similar information for the
- time spent holding the lock for each of the processes.
+ time spent in holding the lock for each of the processes.
memory/kmalloc-top - Show Paths to Kernel Malloc (kmalloc) Invocations
@@ -192,9 +199,9 @@ keywords: memory
The kmalloc-top perl program runs a small systemtap script to collect
stack traces for each call to the kmalloc function and counts the
time that each stack trace is observed. When kmalloc-top exits it
- prints out sorted list. The output can be be filtered to print only
- only the first stack traces (-t) stack traces with more a minimum
- counts (-m), or exclude certain stack traces (-e).
+ prints out sorted list. The output can be filtered to print only the
+ first N stack traces (-t), stack traces with a minimum counts (-m),
+ or exclude certain stack traces (-e).
memory/mmanonpage.stp - Track Virtual Memory System Actions on Anonymous Pages
@@ -206,7 +213,7 @@ keywords: memory
the script is terminated the counts are printed for each process that
allocated pages while the script was running. This script displays
the anonymous page statistics for each process that ran while the
- script is active. Its useful in debugging leaks in the anonymous
+ script is active. It's useful in debugging leaks in the anonymous
regions of a process.
@@ -227,7 +234,7 @@ keywords: memory
The mmreclaim.stp script uses the virtual memory tracepoints
available in some kernels to track page reclaim activity that
- occurred while the script was running. Its useful is debugging
+ occurred while the script was running. It's useful in debugging
performance problems that occur due to page reclamation.
@@ -237,8 +244,8 @@ keywords: memory
The mmwriteback.stp script uses the virtual memory tracepoints
available in some kernels to report all of the file writebacks that
occur form kupdate, pdflush and kjournald while the script is
- running. Its useful in determining where writes are coming from on a
- supposedly idle system that is experiencing unexpected IO.
+ running. It's useful in determining where writes are coming from on
+ a supposedly idle system that is experiencing unexpected IO.
memory/numa_faults.stp - Summarize Process Misses across NUMA Nodes
@@ -306,12 +313,12 @@ keywords: network tcp buffer memory
network/socket-trace.stp - Trace Functions called in Network Socket Code
keywords: network socket
- The script instrument each of the functions inn the Linux kernel's
- net/socket.c file. The script prints out trace. The first element of
- a line is time delta in microseconds from the previous entry. This
- is followed by the command name and the PID. The "->" and "<-"
- indicates function entry and function exit, respectively. The last
- element of the line is the function name.
+ The script instruments each of the functions in the Linux kernel's
+ net/socket.c file. The script prints out trace data. The first
+ element of a line is time delta in microseconds from the previous
+ entry. This is followed by the command name and the PID. The "->" and
+ "<-" indicates function entry and function exit, respectively. The
+ last element of the line is the function name.
network/tcp_connections.stp - Track Creation of Incoming TCP Connections
@@ -343,9 +350,9 @@ keywords: network traffic
network/tcpipstat.stp - Display network statistics for individual TCP sockets.
keywords: network statistics
- tcpipstat collects and display network statistics related to
+ tcpipstat collects and displays network statistics related to
individual TCP sockets or groups of sockets. The statistics that are
- collected are simmer to that of the command netstat -s, only sorted
+ collected are simular to that of the command netstat -s, only sorted
and grouped by individual sockets.
@@ -375,7 +382,7 @@ process/forktracker.stp - Trace Creation of Processes
keywords: process scheduler
The forktracker.stp script prints out a time-stamped entry showing
- each fork and exec operation on the machine. This can be useful for
+ each fork and exec operation on the machine. This can be useful to
determine what process is creating a flurry of short-lived processes.
@@ -418,10 +425,11 @@ process/schedtimes.stp - Track Time Processes Spend in Various States using Trac
keywords: process scheduler time tracepoint
The schedtimes.stp script instruments the scheduler to track the
- amount of time that each process spends running, sleeping, queued,
- and waiting for io. On exit the script prints out the accumulated
- time for each state of processes observed. Optionally, this script
- can be used with the '-c' or '-x' options to focus on a specific PID.
+ amount of time that each process spends in running, sleeping,
+ queuing, and waiting for io. On exit the script prints out the
+ accumulated time for each state of processes observed. Optionally,
+ this script can be used with the '-c' or '-x' options to focus on a
+ specific PID.
process/sig_by_pid.stp - Signal Counts by Process ID
@@ -441,8 +449,8 @@ keywords: signals
The script traces any SIGKILL signals. When that SIGKILL signal is
sent to a process, the script prints out the signal name, the
- destination executable and process ID, the executable name user ID
- that sent the signal.
+ destination executable and process ID, the executable name and user
+ ID that sents the signal.
process/sigmon.stp - Track a particular signal to a specific process
@@ -458,7 +466,7 @@ keywords: signals
process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
keywords: io scheduler backtrace
- The script monitors the time that threads spend waiting for IO
+ The script monitors the time that threads spend in waiting for IO
operations (in "D" state) in the wait_for_completion function. If a
thread spends over 10ms, its name and backtrace is printed, and later
so is the total delay.
diff --git a/testsuite/systemtap.examples/interrupt/interrupts-by-dev.meta b/testsuite/systemtap.examples/interrupt/interrupts-by-dev.meta
new file mode 100644
index 00000000..a89038b4
--- /dev/null
+++ b/testsuite/systemtap.examples/interrupt/interrupts-by-dev.meta
@@ -0,0 +1,14 @@
+title: Record interrupts on a per-device basis.
+name: interrupts-by-dev.stp
+version: 1.0
+author: Prerna Saxena (prerna@linux.vnet.ibm.com)
+keywords: interrupt
+subsystem: interrupt
+status: production
+exit: user-controlled
+output: timed
+scope: system-wide
+description: The interrupts-by-dev.stp script profiles interrupts received by each device per 100 ms.
+test_support: stap -l 'kernel.trace("irq_handler_entry")'
+test_check: stap -p4 interrupts-by-dev.stp
+test_installcheck: stap interrupts-by-dev.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp b/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp
index 3bcfd5e1..3bcfd5e1 100644..100755
--- a/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp
+++ b/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp
diff --git a/testsuite/systemtap.examples/io/ioblktime.meta b/testsuite/systemtap.examples/io/ioblktime.meta
index 01f34295..ff895a3f 100644
--- a/testsuite/systemtap.examples/io/ioblktime.meta
+++ b/testsuite/systemtap.examples/io/ioblktime.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.
+description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.
test_check: stap -p4 ioblktime.stp
test_installcheck: stap ioblktime.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/io/iotime.meta b/testsuite/systemtap.examples/io/iotime.meta
index cf22eacf..30e0599b 100644
--- a/testsuite/systemtap.examples/io/iotime.meta
+++ b/testsuite/systemtap.examples/io/iotime.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: trace
scope: system-wide
-description: The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.
+description: The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.
test_check: stap -p4 iotime.stp
test_installcheck: stap iotime.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/io/iotime.stp b/testsuite/systemtap.examples/io/iotime.stp
index 60fb09af..288e91d0 100755
--- a/testsuite/systemtap.examples/io/iotime.stp
+++ b/testsuite/systemtap.examples/io/iotime.stp
@@ -12,7 +12,7 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Print out the amount of time spent in the read and write systemcall
- * when a process closes each file is closed. Note that the systemtap
+ * when each file opened by the process is closed. Note that the systemtap
* script needs to be running before the open operations occur for
* the script to record data.
*
diff --git a/testsuite/systemtap.examples/io/ttyspy.stp b/testsuite/systemtap.examples/io/ttyspy.stp
index 272d82e9..0c98f391 100755
--- a/testsuite/systemtap.examples/io/ttyspy.stp
+++ b/testsuite/systemtap.examples/io/ttyspy.stp
@@ -1,11 +1,11 @@
-#! /usr/bin/stap -g
+#! /usr/bin/env stap
# May also need --skip-badvars
global activity_time, activity_log
/* Concatenate head and tail, to a max of @num chars, preferring to keep the tail
(as if it were a recent history buffer). */
-function strcattail:string(head:string,tail:string,num:long) %{
+function strcattail:string(head:string,tail:string,num:long) %{ /* pure */
unsigned taillen = strlen(THIS->tail);
unsigned headlen = strlen(THIS->head);
unsigned maxlen = THIS->num < MAXSTRINGLEN ? THIS->num : MAXSTRINGLEN;
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
index 1a2855e1..f7f08597 100644
--- a/testsuite/systemtap.examples/keyword-index.html
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -56,7 +56,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC
<p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li>
<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br>
-<p>The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
+<p>The script monitors the time that threads spend in waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
</ul>
<h3><a name="BUFFER">BUFFER</a></h3>
<ul>
@@ -144,6 +144,9 @@ keywords: <a href="keyword-index.html#FILESYSTEM">FILESYSTEM</a> <a href="keywor
</ul>
<h3><a name="INTERRUPT">INTERRUPT</a></h3>
<ul>
+<li><a href="interrupt/interrupts-by-dev.stp">interrupt/interrupts-by-dev.stp</a> - Record interrupts on a per-device basis.<br>
+keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <br>
+<p>The interrupts-by-dev.stp script profiles interrupts received by each device per 100 ms.</p></li>
<li><a href="interrupt/scf.stp">interrupt/scf.stp</a> - Tally Backtraces for Inter-Processor Interrupt (IPI)<br>
keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br>
<p>The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency.</p></li>
@@ -155,7 +158,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC
<p>When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace.</p></li>
<li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
-<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
+<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li>
<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br>
<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li>
@@ -164,7 +167,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PRO
<p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
+<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
<li><a href="io/iotop.stp">io/iotop.stp</a> - Periodically Print I/O Activity by Process Name<br>
keywords: <a href="keyword-index.html#IO">IO</a> <br>
<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
@@ -182,7 +185,7 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#TTY
<p>The ttyspy.stp script uses tty_audit hooks to monitor recent typing activity on the system, printing a scrolling record of recent keystrokes, on a per-tty basis.</p></li>
<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br>
-<p>The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
+<p>The script monitors the time that threads spend in waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
</ul>
<h3><a name="LOCKING">LOCKING</a></h3>
<ul>
@@ -191,7 +194,7 @@ keywords: <a href="keyword-index.html#LOCKING">LOCKING</a> <br>
<p>The bkl.stp script can help determine whether the Big Kernel Lock (BKL) is causing serialization on a multiprocessor system due to excessive contention of the BKL. The bkl.stp script takes one argument which is the number of processes waiting for the Big Kernel Lock (BKL). When the number of processes waiting for the BKL is reached or exceeded, the script will print a time stamp, the number of processes waiting for the BKL, the holder of the BKL, and the amount of time the BKL was held.</p></li>
<li><a href="locks/bkl_stats.stp">locks/bkl_stats.stp</a> - Per Process Statistics on Big Kernel Lock (BKL) Use<br>
keywords: <a href="keyword-index.html#LOCKING">LOCKING</a> <br>
-<p>The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent holding the lock for each of the processes.</p></li>
+<p>The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent in holding the lock for each of the processes.</p></li>
<li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#LOCKING">LOCKING</a> <a href="keyword-index.html#FUTEX">FUTEX</a> <br>
<p>The script watches the futex syscall on the system. On exit the futexes address, the number of contentions, and the average time for each contention on the futex are printed from lowest pid number to highest.</p></li>
@@ -200,19 +203,19 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde
<ul>
<li><a href="memory/kmalloc-top">memory/kmalloc-top</a> - Show Paths to Kernel Malloc (kmalloc) Invocations<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e).</p></li>
+<p>The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).</p></li>
<li><a href="memory/mmanonpage.stp">memory/mmanonpage.stp</a> - Track Virtual Memory System Actions on Anonymous Pages<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. Its useful in debugging leaks in the anonymous regions of a process.</p></li>
+<p>The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. It's useful in debugging leaks in the anonymous regions of a process.</p></li>
<li><a href="memory/mmfilepage.stp">memory/mmfilepage.stp</a> - Track Virtual Memory System Actions on File Backed Pages<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
<p>The mmfilepage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, copy on writes mapping, and unmapping operations for file backed pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. The mmfilepage.stp script is useful in debugging leaks in the mapped file regions of a process.</p></li>
<li><a href="memory/mmreclaim.stp">memory/mmreclaim.stp</a> - Track Virtual Memory System Page Reclamation<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.</p></li>
+<p>The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. It's useful in debugging performance problems that occur due to page reclamation.</p></li>
<li><a href="memory/mmwriteback.stp">memory/mmwriteback.stp</a> - Track Virtual Memory System Writing to Disk<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <br>
-<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.</p></li>
+<p>The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. It's useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.</p></li>
<li><a href="memory/numa_faults.stp">memory/numa_faults.stp</a> - Summarize Process Misses across NUMA Nodes<br>
keywords: <a href="keyword-index.html#MEMORY">MEMORY</a> <a href="keyword-index.html#NUMA">NUMA</a> <br>
<p>The numa_faults.stp script tracks the read and write pages faults for each process. When the script exits it prints out the total read and write pages faults for each process. The script also provide a break down of page faults per node for each process. This script is useful for determining whether the program has good locality (page faults limited to a single node) on a NUMA computer.</p></li>
@@ -254,7 +257,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<p>The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer.</p></li>
<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br>
-<p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li>
+<p>The script instruments each of the functions in the Linux kernel's net/socket.c file. The script prints out trace data. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li>
<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br>
<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li>
@@ -266,7 +269,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<p>The tcpdumplike.stp prints out a line for each TCP packet received. Each line includes the source and destination IP addresses, the source and destination ports, and flags.</p></li>
<li><a href="network/tcpipstat.stp">network/tcpipstat.stp</a> - Display network statistics for individual TCP sockets.<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#STATISTICS">STATISTICS</a> <br>
-<p>tcpipstat collects and display network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simmer to that of the command netstat -s, only sorted and grouped by individual sockets.</p></li>
+<p>tcpipstat collects and displays network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simular to that of the command netstat -s, only sorted and grouped by individual sockets.</p></li>
</ul>
<h3><a name="NFS">NFS</a></h3>
<ul>
@@ -296,13 +299,13 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde
<p>The script prints a periodic tabular report about failing system calls, by process and by syscall failure. The first optional argument specifies the reporting interval (in seconds, default 5); the second optional argument gives a screen height (number of lines in the report, default 20).</p></li>
<li><a href="process/forktracker.stp">process/forktracker.stp</a> - Trace Creation of Processes<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <br>
-<p>The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful for determine what process is creating a flurry of short-lived processes.</p></li>
+<p>The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful to determine what process is creating a flurry of short-lived processes.</p></li>
<li><a href="process/plimit.stp">process/plimit.stp</a> - print resource limits<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <br>
<p>The script prints a variety of resource limits for a given pid, like /proc/$$/limits on recent kernels.</p></li>
<li><a href="process/schedtimes.stp">process/schedtimes.stp</a> - Track Time Processes Spend in Various States using Tracepoints<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <br>
-<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
+<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
</ul>
<h3><a name="PROFILING">PROFILING</a></h3>
<ul>
@@ -335,7 +338,7 @@ keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <br>
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
+<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
</ul>
<h3><a name="SCHEDULER">SCHEDULER</a></h3>
<ul>
@@ -344,16 +347,16 @@ keywords: <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <br>
<p>The chng_cpu.stp script takes an argument which is the executable name of the task it should monitor. Each time a task with that executable name is found running on a different processor, the script prints out the thread id (tid), the executable name, the processor now running the task, the thread state, and a backtrace showing the kernel functions that triggered the running of the task on the processor.</p></li>
<li><a href="process/forktracker.stp">process/forktracker.stp</a> - Trace Creation of Processes<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <br>
-<p>The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful for determine what process is creating a flurry of short-lived processes.</p></li>
+<p>The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful to determine what process is creating a flurry of short-lived processes.</p></li>
<li><a href="process/migrate.stp">process/migrate.stp</a> - Track the Migration of Specific Executables<br>
keywords: <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <br>
<p>The migrate.stp script takes an argument which is the executable name of the task it should monitor. Each time a task with that executable name migrates between processors an entry is printed with the process id (pid), the executable name, the processor off loading the task, and the process taking the task. Note that the task may or may not be executing at the time of the migration.</p></li>
<li><a href="process/schedtimes.stp">process/schedtimes.stp</a> - Track Time Processes Spend in Various States using Tracepoints<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <br>
-<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
+<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br>
-<p>The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
+<p>The script monitors the time that threads spend in waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li>
</ul>
<h3><a name="SCSI">SCSI</a></h3>
<ul>
@@ -371,7 +374,7 @@ keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>Print signal counts by process name in descending order.</p></li>
<li><a href="process/sigkill.stp">process/sigkill.stp</a> - Track SIGKILL Signals<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
-<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<p>The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name and user ID that sents the signal.</p></li>
<li><a href="process/sigmon.stp">process/sigmon.stp</a> - Track a particular signal to a specific process<br>
keywords: <a href="keyword-index.html#SIGNALS">SIGNALS</a> <br>
<p>The script watches for a particular signal sent to a specific process. When that signal is sent to the specified process, the script prints out the PID and executable of the process sending the signal, the PID and executable name of the process receiving the signal, and the signal number and name.</p></li>
@@ -392,7 +395,7 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde
<ul>
<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br>
-<p>The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li>
+<p>The script instruments each of the functions in the Linux kernel's net/socket.c file. The script prints out trace data. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.</p></li>
<li><a href="network/tcp_connections.stp">network/tcp_connections.stp</a> - Track Creation of Incoming TCP Connections<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#TCP">TCP</a> <a href="keyword-index.html#SOCKET">SOCKET</a> <br>
<p>The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request.</p></li>
@@ -401,13 +404,13 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<ul>
<li><a href="network/tcpipstat.stp">network/tcpipstat.stp</a> - Display network statistics for individual TCP sockets.<br>
keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-index.html#STATISTICS">STATISTICS</a> <br>
-<p>tcpipstat collects and display network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simmer to that of the command netstat -s, only sorted and grouped by individual sockets.</p></li>
+<p>tcpipstat collects and displays network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simular to that of the command netstat -s, only sorted and grouped by individual sockets.</p></li>
</ul>
<h3><a name="SYSCALL">SYSCALL</a></h3>
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
+<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
<li><a href="process/errsnoop.stp">process/errsnoop.stp</a> - tabulate system call errors<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SYSCALL">SYSCALL</a> <br>
<p>The script prints a periodic tabular report about failing system calls, by process and by syscall failure. The first optional argument specifies the reporting interval (in seconds, default 5); the second optional argument gives a screen height (number of lines in the report, default 20).</p></li>
@@ -440,10 +443,10 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
+<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
<li><a href="process/schedtimes.stp">process/schedtimes.stp</a> - Track Time Processes Spend in Various States using Tracepoints<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <br>
-<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
+<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
</ul>
<h3><a name="TRACE">TRACE</a></h3>
<ul>
@@ -461,7 +464,7 @@ keywords: <a href="keyword-index.html#NETWORK">NETWORK</a> <a href="keyword-inde
<p>Every five seconds the dropwatch.stp script lists the number of socket buffers freed at locations in the kernel.</p></li>
<li><a href="process/schedtimes.stp">process/schedtimes.stp</a> - Track Time Processes Spend in Various States using Tracepoints<br>
keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#TRACEPOINT">TRACEPOINT</a> <br>
-<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
+<p>The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.</p></li>
</ul>
<h3><a name="TRAFFIC">TRAFFIC</a></h3>
<ul>
@@ -497,7 +500,7 @@ keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-inde
<ul>
<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
keywords: <a href="keyword-index.html#SYSCALL">SYSCALL</a> <a href="keyword-index.html#READ">READ</a> <a href="keyword-index.html#WRITE">WRITE</a> <a href="keyword-index.html#TIME">TIME</a> <a href="keyword-index.html#IO">IO</a> <br>
-<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
+<p>The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spent in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parentheses. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls.</p></li>
</ul>
</td>
</tr>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
index 6de9c330..d224d4ef 100644
--- a/testsuite/systemtap.examples/keyword-index.txt
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -33,7 +33,7 @@ keywords: io backtrace
process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
keywords: io scheduler backtrace
- The script monitors the time that threads spend waiting for IO
+ The script monitors the time that threads spend in waiting for IO
operations (in "D" state) in the wait_for_completion function. If a
thread spends over 10ms, its name and backtrace is printed, and later
so is the total delay.
@@ -198,6 +198,13 @@ keywords: filesystem hack
= INTERRUPT =
+interrupt/interrupts-by-dev.stp - Record interrupts on a per-device basis.
+keywords: interrupt
+
+ The interrupts-by-dev.stp script profiles interrupts received by each
+ device per 100 ms.
+
+
interrupt/scf.stp - Tally Backtraces for Inter-Processor Interrupt (IPI)
keywords: interrupt backtrace
@@ -223,9 +230,9 @@ keywords: io
The ioblktime.stp script tracks the amount of time that each block IO
requests spend waiting for completion. The script computes the
- average time waiting time for block IO per device and prints list
- every 10 seconds. In some cases there can be too many outstanding
- block IO operations and the script may exceed the default number of
+ average waiting time for block IO per device and prints list every 10
+ seconds. In some cases there can be too many outstanding block IO
+ operations and the script may exceed the default number of
MAXMAPENTRIES allowed. In this case the allowed number can be
increased with "-DMAXMAPENTRIES=10000" option on the stap command
line.
@@ -255,7 +262,7 @@ keywords: syscall read write time io
The script watches each open, close, read, and write syscalls on the
system. For each file the scripts observes opened it accumulates the
- amount of wall clock time spend in read and write operations and the
+ amount of wall clock time spent in read and write operations and the
number of bytes read and written. When a file is closed the script
prints out a pair of lines for the file. Both lines begin with a
timestamp in microseconds, the PID number, and the executable name in
@@ -305,7 +312,7 @@ keywords: io tty per-process monitor
process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
keywords: io scheduler backtrace
- The script monitors the time that threads spend waiting for IO
+ The script monitors the time that threads spend in waiting for IO
operations (in "D" state) in the wait_for_completion function. If a
thread spends over 10ms, its name and backtrace is printed, and later
so is the total delay.
@@ -337,7 +344,7 @@ keywords: locking
waited for the BKL followed by the number of times that the process
waited, the minimum time of the wait, the average and the maximum
time waited. The second table lists has similar information for the
- time spent holding the lock for each of the processes.
+ time spent in holding the lock for each of the processes.
process/futexes.stp - System-Wide Futex Contention
@@ -357,9 +364,9 @@ keywords: memory
The kmalloc-top perl program runs a small systemtap script to collect
stack traces for each call to the kmalloc function and counts the
time that each stack trace is observed. When kmalloc-top exits it
- prints out sorted list. The output can be be filtered to print only
- only the first stack traces (-t) stack traces with more a minimum
- counts (-m), or exclude certain stack traces (-e).
+ prints out sorted list. The output can be filtered to print only the
+ first N stack traces (-t), stack traces with a minimum counts (-m),
+ or exclude certain stack traces (-e).
memory/mmanonpage.stp - Track Virtual Memory System Actions on Anonymous Pages
@@ -371,7 +378,7 @@ keywords: memory
the script is terminated the counts are printed for each process that
allocated pages while the script was running. This script displays
the anonymous page statistics for each process that ran while the
- script is active. Its useful in debugging leaks in the anonymous
+ script is active. It's useful in debugging leaks in the anonymous
regions of a process.
@@ -392,7 +399,7 @@ keywords: memory
The mmreclaim.stp script uses the virtual memory tracepoints
available in some kernels to track page reclaim activity that
- occurred while the script was running. Its useful is debugging
+ occurred while the script was running. It's useful in debugging
performance problems that occur due to page reclamation.
@@ -402,8 +409,8 @@ keywords: memory
The mmwriteback.stp script uses the virtual memory tracepoints
available in some kernels to report all of the file writebacks that
occur form kupdate, pdflush and kjournald while the script is
- running. Its useful in determining where writes are coming from on a
- supposedly idle system that is experiencing unexpected IO.
+ running. It's useful in determining where writes are coming from on
+ a supposedly idle system that is experiencing unexpected IO.
memory/numa_faults.stp - Summarize Process Misses across NUMA Nodes
@@ -501,12 +508,12 @@ keywords: network tcp buffer memory
network/socket-trace.stp - Trace Functions called in Network Socket Code
keywords: network socket
- The script instrument each of the functions inn the Linux kernel's
- net/socket.c file. The script prints out trace. The first element of
- a line is time delta in microseconds from the previous entry. This
- is followed by the command name and the PID. The "->" and "<-"
- indicates function entry and function exit, respectively. The last
- element of the line is the function name.
+ The script instruments each of the functions in the Linux kernel's
+ net/socket.c file. The script prints out trace data. The first
+ element of a line is time delta in microseconds from the previous
+ entry. This is followed by the command name and the PID. The "->" and
+ "<-" indicates function entry and function exit, respectively. The
+ last element of the line is the function name.
network/tcp_connections.stp - Track Creation of Incoming TCP Connections
@@ -538,9 +545,9 @@ keywords: network traffic
network/tcpipstat.stp - Display network statistics for individual TCP sockets.
keywords: network statistics
- tcpipstat collects and display network statistics related to
+ tcpipstat collects and displays network statistics related to
individual TCP sockets or groups of sockets. The statistics that are
- collected are simmer to that of the command netstat -s, only sorted
+ collected are simular to that of the command netstat -s, only sorted
and grouped by individual sockets.
@@ -601,7 +608,7 @@ process/forktracker.stp - Trace Creation of Processes
keywords: process scheduler
The forktracker.stp script prints out a time-stamped entry showing
- each fork and exec operation on the machine. This can be useful for
+ each fork and exec operation on the machine. This can be useful to
determine what process is creating a flurry of short-lived processes.
@@ -616,10 +623,11 @@ process/schedtimes.stp - Track Time Processes Spend in Various States using Trac
keywords: process scheduler time tracepoint
The schedtimes.stp script instruments the scheduler to track the
- amount of time that each process spends running, sleeping, queued,
- and waiting for io. On exit the script prints out the accumulated
- time for each state of processes observed. Optionally, this script
- can be used with the '-c' or '-x' options to focus on a specific PID.
+ amount of time that each process spends in running, sleeping,
+ queuing, and waiting for io. On exit the script prints out the
+ accumulated time for each state of processes observed. Optionally,
+ this script can be used with the '-c' or '-x' options to focus on a
+ specific PID.
= PROFILING =
@@ -709,7 +717,7 @@ keywords: syscall read write time io
The script watches each open, close, read, and write syscalls on the
system. For each file the scripts observes opened it accumulates the
- amount of wall clock time spend in read and write operations and the
+ amount of wall clock time spent in read and write operations and the
number of bytes read and written. When a file is closed the script
prints out a pair of lines for the file. Both lines begin with a
timestamp in microseconds, the PID number, and the executable name in
@@ -738,7 +746,7 @@ process/forktracker.stp - Trace Creation of Processes
keywords: process scheduler
The forktracker.stp script prints out a time-stamped entry showing
- each fork and exec operation on the machine. This can be useful for
+ each fork and exec operation on the machine. This can be useful to
determine what process is creating a flurry of short-lived processes.
@@ -757,16 +765,17 @@ process/schedtimes.stp - Track Time Processes Spend in Various States using Trac
keywords: process scheduler time tracepoint
The schedtimes.stp script instruments the scheduler to track the
- amount of time that each process spends running, sleeping, queued,
- and waiting for io. On exit the script prints out the accumulated
- time for each state of processes observed. Optionally, this script
- can be used with the '-c' or '-x' options to focus on a specific PID.
+ amount of time that each process spends in running, sleeping,
+ queuing, and waiting for io. On exit the script prints out the
+ accumulated time for each state of processes observed. Optionally,
+ this script can be used with the '-c' or '-x' options to focus on a
+ specific PID.
process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
keywords: io scheduler backtrace
- The script monitors the time that threads spend waiting for IO
+ The script monitors the time that threads spend in waiting for IO
operations (in "D" state) in the wait_for_completion function. If a
thread spends over 10ms, its name and backtrace is printed, and later
so is the total delay.
@@ -801,8 +810,8 @@ keywords: signals
The script traces any SIGKILL signals. When that SIGKILL signal is
sent to a process, the script prints out the signal name, the
- destination executable and process ID, the executable name user ID
- that sent the signal.
+ destination executable and process ID, the executable name and user
+ ID that sents the signal.
process/sigmon.stp - Track a particular signal to a specific process
@@ -841,12 +850,12 @@ keywords: syscall sleep
network/socket-trace.stp - Trace Functions called in Network Socket Code
keywords: network socket
- The script instrument each of the functions inn the Linux kernel's
- net/socket.c file. The script prints out trace. The first element of
- a line is time delta in microseconds from the previous entry. This
- is followed by the command name and the PID. The "->" and "<-"
- indicates function entry and function exit, respectively. The last
- element of the line is the function name.
+ The script instruments each of the functions in the Linux kernel's
+ net/socket.c file. The script prints out trace data. The first
+ element of a line is time delta in microseconds from the previous
+ entry. This is followed by the command name and the PID. The "->" and
+ "<-" indicates function entry and function exit, respectively. The
+ last element of the line is the function name.
network/tcp_connections.stp - Track Creation of Incoming TCP Connections
@@ -864,9 +873,9 @@ keywords: network tcp socket
network/tcpipstat.stp - Display network statistics for individual TCP sockets.
keywords: network statistics
- tcpipstat collects and display network statistics related to
+ tcpipstat collects and displays network statistics related to
individual TCP sockets or groups of sockets. The statistics that are
- collected are simmer to that of the command netstat -s, only sorted
+ collected are simular to that of the command netstat -s, only sorted
and grouped by individual sockets.
@@ -877,7 +886,7 @@ keywords: syscall read write time io
The script watches each open, close, read, and write syscalls on the
system. For each file the scripts observes opened it accumulates the
- amount of wall clock time spend in read and write operations and the
+ amount of wall clock time spent in read and write operations and the
number of bytes read and written. When a file is closed the script
prints out a pair of lines for the file. Both lines begin with a
timestamp in microseconds, the PID number, and the executable name in
@@ -971,7 +980,7 @@ keywords: syscall read write time io
The script watches each open, close, read, and write syscalls on the
system. For each file the scripts observes opened it accumulates the
- amount of wall clock time spend in read and write operations and the
+ amount of wall clock time spent in read and write operations and the
number of bytes read and written. When a file is closed the script
prints out a pair of lines for the file. Both lines begin with a
timestamp in microseconds, the PID number, and the executable name in
@@ -986,10 +995,11 @@ process/schedtimes.stp - Track Time Processes Spend in Various States using Trac
keywords: process scheduler time tracepoint
The schedtimes.stp script instruments the scheduler to track the
- amount of time that each process spends running, sleeping, queued,
- and waiting for io. On exit the script prints out the accumulated
- time for each state of processes observed. Optionally, this script
- can be used with the '-c' or '-x' options to focus on a specific PID.
+ amount of time that each process spends in running, sleeping,
+ queuing, and waiting for io. On exit the script prints out the
+ accumulated time for each state of processes observed. Optionally,
+ this script can be used with the '-c' or '-x' options to focus on a
+ specific PID.
= TRACE =
@@ -1026,10 +1036,11 @@ process/schedtimes.stp - Track Time Processes Spend in Various States using Trac
keywords: process scheduler time tracepoint
The schedtimes.stp script instruments the scheduler to track the
- amount of time that each process spends running, sleeping, queued,
- and waiting for io. On exit the script prints out the accumulated
- time for each state of processes observed. Optionally, this script
- can be used with the '-c' or '-x' options to focus on a specific PID.
+ amount of time that each process spends in running, sleeping,
+ queuing, and waiting for io. On exit the script prints out the
+ accumulated time for each state of processes observed. Optionally,
+ this script can be used with the '-c' or '-x' options to focus on a
+ specific PID.
= TRAFFIC =
@@ -1097,7 +1108,7 @@ keywords: syscall read write time io
The script watches each open, close, read, and write syscalls on the
system. For each file the scripts observes opened it accumulates the
- amount of wall clock time spend in read and write operations and the
+ amount of wall clock time spent in read and write operations and the
number of bytes read and written. When a file is closed the script
prints out a pair of lines for the file. Both lines begin with a
timestamp in microseconds, the PID number, and the executable name in
diff --git a/testsuite/systemtap.examples/locks/bkl_stats.meta b/testsuite/systemtap.examples/locks/bkl_stats.meta
index 16ac2911..e8080bf4 100644
--- a/testsuite/systemtap.examples/locks/bkl_stats.meta
+++ b/testsuite/systemtap.examples/locks/bkl_stats.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent holding the lock for each of the processes.
+description: The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent in holding the lock for each of the processes.
test_support: stap -l 'kernel.function("lock_kernel").return'
test_check: stap -p4 bkl_stats.stp
test_installcheck: stap bkl_stats.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/locks/bkl_stats.stp b/testsuite/systemtap.examples/locks/bkl_stats.stp
index 4481e493..4a8eba6d 100755
--- a/testsuite/systemtap.examples/locks/bkl_stats.stp
+++ b/testsuite/systemtap.examples/locks/bkl_stats.stp
@@ -11,12 +11,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Print out the amount of time spent in the read and write systemcall
- * when a process closes each file is closed. Note that the systemtap
- * script needs to be running before the open operations occur for
- * the script to record data.
- *
- * Description: displays statisics for waiting and holding big kernel lock (BKL)
+ * Description: displays statistics for waiting and holding big kernel lock (BKL)
*
* Run: stap bkl_stats.stap
*
@@ -73,11 +68,10 @@ probe kernel.function("lock_kernel").return {
}
probe kernel.function("unlock_kernel") {
- # record the amount of time the process held the lock
t = gettimeofday_us()
s = holder_time[tid()]
holder_time[tid()] = t
- # record the amount of time waiting for the lock
+ # record the amount of time the process held the lock
if (s) {
holder_stats[tid()] <<< t - s
names[tid()] = execname()
diff --git a/testsuite/systemtap.examples/memory/kmalloc-top.meta b/testsuite/systemtap.examples/memory/kmalloc-top.meta
index f4c2a9d1..6388c3e1 100644
--- a/testsuite/systemtap.examples/memory/kmalloc-top.meta
+++ b/testsuite/systemtap.examples/memory/kmalloc-top.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e).
+description: The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be filtered to print only the first N stack traces (-t), stack traces with a minimum counts (-m), or exclude certain stack traces (-e).
test_check: ./kmalloc-top -o "-p4" -c "sleep 0"
test_installcheck: ./kmalloc-top -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmanonpage.meta b/testsuite/systemtap.examples/memory/mmanonpage.meta
index 96ddd3a3..5e5cb843 100644
--- a/testsuite/systemtap.examples/memory/mmanonpage.meta
+++ b/testsuite/systemtap.examples/memory/mmanonpage.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. Its useful in debugging leaks in the anonymous regions of a process.
+description: The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. It's useful in debugging leaks in the anonymous regions of a process.
test_support: stap -l 'kernel.trace("mm_page_allocation"),kernel.trace("mm_page_free"),kernel.trace("mm_anon_fault"),kernel.trace("mm_anon_pgin"),kernel.trace("mm_anon_cow"),kernel.trace("mm_anon_unmap"),kernel.trace("mm_anon_userfree")'
test_check: stap -p4 mmanonpage.stp
test_installcheck: stap mmanonpage.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmreclaim.meta b/testsuite/systemtap.examples/memory/mmreclaim.meta
index 4b5c9de2..a2828574 100644
--- a/testsuite/systemtap.examples/memory/mmreclaim.meta
+++ b/testsuite/systemtap.examples/memory/mmreclaim.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. Its useful is debugging performance problems that occur due to page reclamation.
+description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occurred while the script was running. It's useful in debugging performance problems that occur due to page reclamation.
test_support: stap -l 'kernel.trace("mm_directreclaim_reclaimall"),kernel.trace("mm_pagereclaim_shrinkinactive"),kernel.trace("mm_pagereclaim_free"),kernel.trace("mm_pagereclaim_pgout"),kernel.trace("mm_pagereclaim_shrinkactive_a2a"),kernel.trace("mm_pagereclaim_shrinkinactive_i2a"),kernel.trace("mm_pagereclaim_shrinkactive_a2i"),kernel.trace("mm_pagereclaim_shrinkinactive_i2i")'
test_check: stap -p4 mmreclaim.stp
test_installcheck: stap mmreclaim.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/memory/mmwriteback.meta b/testsuite/systemtap.examples/memory/mmwriteback.meta
index 76cc53a7..62b52cf9 100644
--- a/testsuite/systemtap.examples/memory/mmwriteback.meta
+++ b/testsuite/systemtap.examples/memory/mmwriteback.meta
@@ -8,7 +8,7 @@ status: experimental
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.
+description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. It's useful in determining where writes are coming from on a supposedly idle system that is experiencing unexpected IO.
test_support: stap -l 'kernel.trace("mm_pdflush_bgwriteout"),kernel.trace("mm_pdflush_kupdate"),kernel.trace("mm_pagereclaim_pgout")'
test_check: stap -p4 mmwriteback.stp
test_installcheck: stap mmwriteback.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/network/socket-trace.meta b/testsuite/systemtap.examples/network/socket-trace.meta
index f73731b5..83af903c 100644
--- a/testsuite/systemtap.examples/network/socket-trace.meta
+++ b/testsuite/systemtap.examples/network/socket-trace.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: trace
scope: system-wide
-description: The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.
+description: The script instruments each of the functions in the Linux kernel's net/socket.c file. The script prints out trace data. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name.
test_check: stap -p4 socket-trace.stp
test_installcheck: stap socket-trace.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/network/tcpipstat.meta b/testsuite/systemtap.examples/network/tcpipstat.meta
index 9e97ea5b..59cddaa8 100644
--- a/testsuite/systemtap.examples/network/tcpipstat.meta
+++ b/testsuite/systemtap.examples/network/tcpipstat.meta
@@ -9,7 +9,7 @@ exit: user-controlled
output: timed
scope: per-socket
arg_[0-9]+: tcpstat.stp [index=laddr|raddr|lport|rport|tuple] [timeout=<N sec>] [nozeros=1|0] [filters...]
-description: tcpipstat collects and display network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simmer to that of the command netstat -s, only sorted and grouped by individual sockets.
+description: tcpipstat collects and displays network statistics related to individual TCP sockets or groups of sockets. The statistics that are collected are simular to that of the command netstat -s, only sorted and grouped by individual sockets.
test_support: stap -l 'tcpmib.InSegs'
test_check: stap -p4 tcpipstat.stp
test_installcheck: stap tcpipstat.stp timeout=1
diff --git a/testsuite/systemtap.examples/process/errsnoop.stp b/testsuite/systemtap.examples/process/errsnoop.stp
index a3f17b77..4ad4ea1b 100755
--- a/testsuite/systemtap.examples/process/errsnoop.stp
+++ b/testsuite/systemtap.examples/process/errsnoop.stp
@@ -1,5 +1,4 @@
-#!/bin/sh
-//usr/bin/env stap -DMAXMAPENTRIES=20480 $0 $@; exit $?
+#!/usr/bin/env stap -DMAXMAPENTRIES=20480 $0 $@; exit $?
# errsnoop.stp
# Copyright (C) 2009 Red Hat, Inc., Eugene Teo <eteo@redhat.com>
#
diff --git a/testsuite/systemtap.examples/process/forktracker.meta b/testsuite/systemtap.examples/process/forktracker.meta
index 2ba3a659..21c5bc29 100644
--- a/testsuite/systemtap.examples/process/forktracker.meta
+++ b/testsuite/systemtap.examples/process/forktracker.meta
@@ -8,6 +8,6 @@ status: production
exit: user-controlled
output: trace
scope: system-wide
-description: The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful for determine what process is creating a flurry of short-lived processes.
+description: The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful to determine what process is creating a flurry of short-lived processes.
test_check: stap -p4 forktracker.stp
test_installcheck: stap forktracker.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/forktracker.stp b/testsuite/systemtap.examples/process/forktracker.stp
index 525aa0a5..f892ce17 100755
--- a/testsuite/systemtap.examples/process/forktracker.stp
+++ b/testsuite/systemtap.examples/process/forktracker.stp
@@ -1,7 +1,7 @@
#! /usr/bin/env stap
#
# This is a stap script to monitor process creations (fork(), exec()'s).
-# Based off of stap script found: http://picobot.org/wordpress/?p=27
+# Based on stap script found: http://picobot.org/wordpress/?p=27
# With some minor modifications (i.e. timestamping)
#
# Usage: stap forktracker.stp
diff --git a/testsuite/systemtap.examples/process/schedtimes.meta b/testsuite/systemtap.examples/process/schedtimes.meta
index 5315042a..9386a3e8 100644
--- a/testsuite/systemtap.examples/process/schedtimes.meta
+++ b/testsuite/systemtap.examples/process/schedtimes.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: sorted-list
scope: system-wide
-description: The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.
+description: The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends in running, sleeping, queuing, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID.
test_support: stap -l 'kernel.trace("sched_switch"),kernel.trace("sched_wakeup")'
test_check: stap -p4 schedtimes.stp
test_installcheck: stap schedtimes.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sigkill.meta b/testsuite/systemtap.examples/process/sigkill.meta
index b9c83f15..fed49a05 100644
--- a/testsuite/systemtap.examples/process/sigkill.meta
+++ b/testsuite/systemtap.examples/process/sigkill.meta
@@ -8,7 +8,7 @@ status: production
exit: user-controlled
output: trace
scope: systemwide
-description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name user ID that sent the signal.
+description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the destination executable and process ID, the executable name and user ID that sents the signal.
arg_1: The name of the signal to look for on selected process.
test_check: stap -p4 sigkill.stp
test_installcheck: stap sigkill.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sleepingBeauties.meta b/testsuite/systemtap.examples/process/sleepingBeauties.meta
index b2692ba0..693a7789 100644
--- a/testsuite/systemtap.examples/process/sleepingBeauties.meta
+++ b/testsuite/systemtap.examples/process/sleepingBeauties.meta
@@ -2,6 +2,6 @@ title: Generating Backtraces of Threads Waiting for IO Operations
name: sleepingBeauties.stp
keywords: io scheduler backtrace
subsystem: scheduler
-description: The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.
+description: The script monitors the time that threads spend in waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.
test_check: stap -p4 sleepingBeauties.stp
test_installcheck: stap sleepingBeauties.stp -c "sleep 0.2"
diff --git a/testsuite/systemtap.examples/process/sleepingBeauties.stp b/testsuite/systemtap.examples/process/sleepingBeauties.stp
index 64c563a3..143fbe1c 100755
--- a/testsuite/systemtap.examples/process/sleepingBeauties.stp
+++ b/testsuite/systemtap.examples/process/sleepingBeauties.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap
+#! /usr/bin/env stap
function time () { return gettimeofday_ms() }
global time_name = "ms"
diff --git a/testsuite/systemtap.examples/process/wait4time.stp b/testsuite/systemtap.examples/process/wait4time.stp
index 2fd914b9..3e374b14 100755
--- a/testsuite/systemtap.examples/process/wait4time.stp
+++ b/testsuite/systemtap.examples/process/wait4time.stp
@@ -11,10 +11,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Print out the amount of time spent in the read and write systemcall
- * when a process closes each file is closed. Note that the script needs
- * to be running before the open operations occur for the script
- * to record data.
+ * Print out the time spent in wait4 systemcall
*
* Format is:
* timestamp pid (executabable) wait4: time_us pid
diff --git a/testsuite/systemtap.examples/profiling/latencytap.stp b/testsuite/systemtap.examples/profiling/latencytap.stp
index d202ec81..7fdbbc4e 100755
--- a/testsuite/systemtap.examples/profiling/latencytap.stp
+++ b/testsuite/systemtap.examples/profiling/latencytap.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap -g
+#! /usr/bin/env stap
# Record the time that a process has spent asleep, and in what function
@@ -7,8 +7,7 @@ global sleep_time
global process_names
global sleep_agg
-function _get_sleep_time:long(rq_param:long, p_param:long)
-%{
+function _get_sleep_time:long(rq_param:long, p_param:long) %{ /* pure */
struct rq *rq = (struct rq *)(unsigned long)THIS->rq_param;
struct task_struct *p = (struct task_struct *)(unsigned long)THIS->p_param;
struct sched_entity *se = &p->se;
@@ -19,9 +18,8 @@ function _get_sleep_time:long(rq_param:long, p_param:long)
THIS->__retvalue = delta;
%}
-# Get the backtrace from an arbitrary task
-function task_backtrace:string (task:long)
-%{
+# Get the backtrace from an arbitrary task
+function task_backtrace:string (task:long) %{ /* pure */
_stp_stack_snprint_tsk(THIS->__retvalue, MAXSTRINGLEN,
(struct task_struct *)(unsigned long)THIS->task, 0, MAXTRACE);
%}
diff --git a/testsuite/systemtap.pass1-4/buildok.exp b/testsuite/systemtap.pass1-4/buildok.exp
index 12275c1d..a9f16a8b 100644
--- a/testsuite/systemtap.pass1-4/buildok.exp
+++ b/testsuite/systemtap.pass1-4/buildok.exp
@@ -6,11 +6,7 @@ foreach file [lsort [glob -nocomplain $srcdir/$self/*.stp]] {
# some tests are known to fail.
switch $test {
buildok/perfmon01.stp {setup_kfail 909 *-*-*}
- buildok/twentyseven.stp {setup_kfail 4166 *-*-*}
- buildok/sched_test.stp {setup_kfail 1155 *-*-*}
- buildok/process_test.stp {setup_kfail 1155 *-*-*}
buildok/rpc-all-probes.stp {setup_kfail 4413 *-*-*}
- buildok/nfs-all-probes.stp {setup_kfail 4413 *-*-*}
buildok/per-process-syscall.stp {if {![utrace_p]} { setup_kfail 9999 *-*-*} }
}
if {$rc == 0} { pass $test } else { fail $test }