summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.examples')
-rw-r--r--testsuite/systemtap.examples/.gitignore3
-rw-r--r--testsuite/systemtap.examples/ChangeLog11
-rwxr-xr-x[-rw-r--r--]testsuite/systemtap.examples/examples-index-gen.pl5
-rwxr-xr-xtestsuite/systemtap.examples/general/ansi_colors.stp (renamed from testsuite/systemtap.examples/small_demos/ansi_colors.stp)0
-rw-r--r--testsuite/systemtap.examples/general/click.wav (renamed from testsuite/systemtap.examples/small_demos/click.wav)bin1290 -> 1290 bytes
-rw-r--r--testsuite/systemtap.examples/general/graphs.meta (renamed from testsuite/systemtap.examples/graphs.meta)0
-rw-r--r--testsuite/systemtap.examples/general/graphs.stp (renamed from testsuite/systemtap.examples/graphs.stp)0
-rw-r--r--testsuite/systemtap.examples/general/helloworld.meta (renamed from testsuite/systemtap.examples/helloworld.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/general/helloworld.stp (renamed from testsuite/systemtap.examples/helloworld.stp)0
-rwxr-xr-xtestsuite/systemtap.examples/general/key.stp (renamed from testsuite/systemtap.examples/small_demos/key.stp)0
-rwxr-xr-xtestsuite/systemtap.examples/general/keyhack.stp (renamed from testsuite/systemtap.examples/small_demos/keyhack.stp)0
-rw-r--r--testsuite/systemtap.examples/general/para-callgraph.meta (renamed from testsuite/systemtap.examples/para-callgraph.meta)0
-rw-r--r--testsuite/systemtap.examples/general/para-callgraph.stp (renamed from testsuite/systemtap.examples/para-callgraph.stp)0
-rw-r--r--testsuite/systemtap.examples/general/return.wav (renamed from testsuite/systemtap.examples/small_demos/return.wav)bin6584 -> 6584 bytes
-rw-r--r--testsuite/systemtap.examples/html/html_footer.tmpl (renamed from testsuite/systemtap.examples/html_footer.tmpl)0
-rw-r--r--testsuite/systemtap.examples/html/html_header.tmpl (renamed from testsuite/systemtap.examples/html_header.tmpl)6
-rw-r--r--testsuite/systemtap.examples/html/systemtap.css (renamed from testsuite/systemtap.examples/systemtap.css)0
-rw-r--r--testsuite/systemtap.examples/html/systemtapcorner.gif (renamed from testsuite/systemtap.examples/systemtapcorner.gif)bin970 -> 970 bytes
-rw-r--r--testsuite/systemtap.examples/html/systemtaplogo.png (renamed from testsuite/systemtap.examples/systemtaplogo.png)bin1860 -> 1860 bytes
-rw-r--r--testsuite/systemtap.examples/index.html154
-rw-r--r--testsuite/systemtap.examples/index.txt238
-rw-r--r--testsuite/systemtap.examples/io/disktop.meta (renamed from testsuite/systemtap.examples/disktop.meta)0
-rw-r--r--testsuite/systemtap.examples/io/disktop.stp (renamed from testsuite/systemtap.examples/disktop.stp)0
-rw-r--r--testsuite/systemtap.examples/io/io_submit.meta (renamed from testsuite/systemtap.examples/io_submit.meta)0
-rw-r--r--testsuite/systemtap.examples/io/io_submit.stp (renamed from testsuite/systemtap.examples/io_submit.stp)0
-rwxr-xr-xtestsuite/systemtap.examples/io/iostat-scsi.stp (renamed from testsuite/systemtap.examples/iostat-scsi.stp)0
-rw-r--r--testsuite/systemtap.examples/io/iostat-scsi.txt (renamed from testsuite/systemtap.examples/iostat-scsi.txt)0
-rw-r--r--testsuite/systemtap.examples/io/iotime.meta (renamed from testsuite/systemtap.examples/iotime.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/io/iotime.stp (renamed from testsuite/systemtap.examples/iotime.stp)0
-rw-r--r--testsuite/systemtap.examples/io/iotop.meta (renamed from testsuite/systemtap.examples/iotop.meta)0
-rw-r--r--testsuite/systemtap.examples/io/iotop.stp (renamed from testsuite/systemtap.examples/iotop.stp)0
-rw-r--r--testsuite/systemtap.examples/io/traceio.meta (renamed from testsuite/systemtap.examples/traceio.meta)0
-rw-r--r--testsuite/systemtap.examples/io/traceio.stp (renamed from testsuite/systemtap.examples/traceio.stp)0
-rw-r--r--testsuite/systemtap.examples/io/traceio2.meta (renamed from testsuite/systemtap.examples/traceio2.meta)0
-rw-r--r--testsuite/systemtap.examples/io/traceio2.stp (renamed from testsuite/systemtap.examples/traceio2.stp)0
-rw-r--r--testsuite/systemtap.examples/keyword-index.html299
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt500
-rw-r--r--testsuite/systemtap.examples/network/nettop.meta (renamed from testsuite/systemtap.examples/nettop.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/network/nettop.stp (renamed from testsuite/systemtap.examples/nettop.stp)0
-rw-r--r--testsuite/systemtap.examples/network/nettop.txt (renamed from testsuite/systemtap.examples/nettop.txt)0
-rw-r--r--testsuite/systemtap.examples/network/socket-trace.meta (renamed from testsuite/systemtap.examples/socket-trace.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/network/socket-trace.stp (renamed from testsuite/systemtap.examples/socket-trace.stp)0
-rwxr-xr-xtestsuite/systemtap.examples/network/socktop (renamed from testsuite/systemtap.examples/socktop)0
-rw-r--r--testsuite/systemtap.examples/network/socktop.txt (renamed from testsuite/systemtap.examples/socktop.txt)0
-rw-r--r--testsuite/systemtap.examples/process/futexes.meta (renamed from testsuite/systemtap.examples/futexes.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/futexes.stp (renamed from testsuite/systemtap.examples/futexes.stp)0
-rw-r--r--testsuite/systemtap.examples/process/futexes.txt (renamed from testsuite/systemtap.examples/futexes.txt)0
-rw-r--r--testsuite/systemtap.examples/process/pf2.meta (renamed from testsuite/systemtap.examples/pf2.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/pf2.stp (renamed from testsuite/systemtap.examples/pf2.stp)0
-rw-r--r--testsuite/systemtap.examples/process/pf2.txt (renamed from testsuite/systemtap.examples/pf2.txt)0
-rwxr-xr-xtestsuite/systemtap.examples/process/proc_snoop.stp (renamed from testsuite/systemtap.examples/small_demos/proc_snoop.stp)0
-rw-r--r--testsuite/systemtap.examples/process/sig_by_pid.meta (renamed from testsuite/systemtap.examples/sig_by_pid.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/sig_by_pid.stp (renamed from testsuite/systemtap.examples/sig_by_pid.stp)0
-rw-r--r--testsuite/systemtap.examples/process/sig_by_pid.txt (renamed from testsuite/systemtap.examples/sig_by_pid.txt)0
-rw-r--r--testsuite/systemtap.examples/process/sig_by_proc.meta (renamed from testsuite/systemtap.examples/sig_by_proc.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/sig_by_proc.stp (renamed from testsuite/systemtap.examples/sig_by_proc.stp)0
-rw-r--r--testsuite/systemtap.examples/process/sig_by_proc.txt (renamed from testsuite/systemtap.examples/sig_by_proc.txt)0
-rw-r--r--testsuite/systemtap.examples/process/sigkill.meta (renamed from testsuite/systemtap.examples/sigkill.meta)0
-rw-r--r--testsuite/systemtap.examples/process/sigkill.stp (renamed from testsuite/systemtap.examples/sigkill.stp)0
-rw-r--r--testsuite/systemtap.examples/process/sigmon.meta (renamed from testsuite/systemtap.examples/sigmon.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/sigmon.stp (renamed from testsuite/systemtap.examples/sigmon.stp)0
-rw-r--r--testsuite/systemtap.examples/process/sleepingBeauties.meta (renamed from testsuite/systemtap.examples/sleepingBeauties.meta)0
-rw-r--r--testsuite/systemtap.examples/process/sleepingBeauties.stp (renamed from testsuite/systemtap.examples/sleepingBeauties.stp)0
-rw-r--r--testsuite/systemtap.examples/process/sleeptime.meta (renamed from testsuite/systemtap.examples/sleeptime.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/sleeptime.stp (renamed from testsuite/systemtap.examples/sleeptime.stp)0
-rw-r--r--testsuite/systemtap.examples/process/syscalls_by_pid.meta (renamed from testsuite/systemtap.examples/syscalls_by_pid.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/syscalls_by_pid.stp (renamed from testsuite/systemtap.examples/syscalls_by_pid.stp)0
-rw-r--r--testsuite/systemtap.examples/process/syscalls_by_pid.txt (renamed from testsuite/systemtap.examples/syscalls_by_pid.txt)0
-rw-r--r--testsuite/systemtap.examples/process/syscalls_by_proc.meta (renamed from testsuite/systemtap.examples/syscalls_by_proc.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/syscalls_by_proc.stp (renamed from testsuite/systemtap.examples/syscalls_by_proc.stp)0
-rw-r--r--testsuite/systemtap.examples/process/syscalls_by_proc.txt (renamed from testsuite/systemtap.examples/syscalls_by_proc.txt)0
-rwxr-xr-xtestsuite/systemtap.examples/process/syscalltimes (renamed from testsuite/systemtap.examples/syscalltimes)0
-rw-r--r--testsuite/systemtap.examples/process/syscalltimes.txt (renamed from testsuite/systemtap.examples/syscalltimes.txt)0
-rw-r--r--testsuite/systemtap.examples/process/wait4time.meta (renamed from testsuite/systemtap.examples/wait4time.meta)0
-rwxr-xr-xtestsuite/systemtap.examples/process/wait4time.stp (renamed from testsuite/systemtap.examples/wait4time.stp)0
-rw-r--r--testsuite/systemtap.examples/profiling/functioncallcount.meta (renamed from testsuite/systemtap.examples/functioncallcount.meta)0
-rw-r--r--testsuite/systemtap.examples/profiling/functioncallcount.stp (renamed from testsuite/systemtap.examples/functioncallcount.stp)0
-rw-r--r--testsuite/systemtap.examples/profiling/thread-times.meta (renamed from testsuite/systemtap.examples/thread-times.meta)0
-rw-r--r--testsuite/systemtap.examples/profiling/thread-times.stp (renamed from testsuite/systemtap.examples/thread-times.stp)0
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/close.stp14
-rw-r--r--testsuite/systemtap.examples/small_demos/demo_script.txt102
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/fileopen.stp24
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/kmalloc.stp22
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/kmalloc2.stp26
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/prof.stp35
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/rwtiming.stp74
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/sched_snoop.stp35
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/sys.stp17
-rwxr-xr-xtestsuite/systemtap.examples/small_demos/top.stp24
-rw-r--r--testsuite/systemtap.examples/subsystem-index.html186
-rw-r--r--testsuite/systemtap.examples/subsystem-index.txt267
91 files changed, 1661 insertions, 381 deletions
diff --git a/testsuite/systemtap.examples/.gitignore b/testsuite/systemtap.examples/.gitignore
deleted file mode 100644
index 748cbe2d..00000000
--- a/testsuite/systemtap.examples/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-index.*
-keyword-index.*
-subsystem-index.*
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog
index db334b3f..d5840f96 100644
--- a/testsuite/systemtap.examples/ChangeLog
+++ b/testsuite/systemtap.examples/ChangeLog
@@ -1,3 +1,14 @@
+2008-08-07 Frank Ch. Eigler <fche@elastic.org>
+
+ * *index.txt, *index.html: New generated files.
+ * .gitignore: Zap it.
+ * html/*, examples-index-gen.pl: Adapt to html/ boilerplate subdir.
+
+2008-08-07 Frank Ch. Eigler <fche@elastic.org>
+
+ * small_demos: Unique parts kept, others dropped.
+ * all other samples: Moved into new subdirectories.
+
2008-08-07 David Smith <dsmith@redhat.com>
* .gitignore: New file.
diff --git a/testsuite/systemtap.examples/examples-index-gen.pl b/testsuite/systemtap.examples/examples-index-gen.pl
index bc12577e..8e968159 100644..100755
--- a/testsuite/systemtap.examples/examples-index-gen.pl
+++ b/testsuite/systemtap.examples/examples-index-gen.pl
@@ -1,3 +1,4 @@
+#! /usr/bin/perl
# Generates index files from examples .meta file info.
# Copyright (C) 2008 Red Hat Inc.
#
@@ -78,12 +79,12 @@ sub add_meta_html(*;$) {
my $HEADER = "SYSTEMTAP EXAMPLES INDEX\n"
. "(see also subsystem-index.txt, keyword-index.txt)\n\n";
-my $header_tmpl = "$inputdir/html_header.tmpl";
+my $header_tmpl = "$inputdir/html/html_header.tmpl";
open(TEMPLATE, "<$header_tmpl")
|| die "couldn't open $header_tmpl, $!";
my $HTMLHEADER = do { local $/; <TEMPLATE> };
close(TEMPLATE);
-my $footer_tmpl = "$inputdir/html_footer.tmpl";
+my $footer_tmpl = "$inputdir/html/html_footer.tmpl";
open(TEMPLATE, "<$footer_tmpl")
|| die "couldn't open $footer_tmpl, $!";
my $HTMLFOOTER = do { local $/; <TEMPLATE> };
diff --git a/testsuite/systemtap.examples/small_demos/ansi_colors.stp b/testsuite/systemtap.examples/general/ansi_colors.stp
index 0d9d7c47..0d9d7c47 100755
--- a/testsuite/systemtap.examples/small_demos/ansi_colors.stp
+++ b/testsuite/systemtap.examples/general/ansi_colors.stp
diff --git a/testsuite/systemtap.examples/small_demos/click.wav b/testsuite/systemtap.examples/general/click.wav
index 8214b229..8214b229 100644
--- a/testsuite/systemtap.examples/small_demos/click.wav
+++ b/testsuite/systemtap.examples/general/click.wav
Binary files differ
diff --git a/testsuite/systemtap.examples/graphs.meta b/testsuite/systemtap.examples/general/graphs.meta
index 60a522b3..60a522b3 100644
--- a/testsuite/systemtap.examples/graphs.meta
+++ b/testsuite/systemtap.examples/general/graphs.meta
diff --git a/testsuite/systemtap.examples/graphs.stp b/testsuite/systemtap.examples/general/graphs.stp
index 0c8e3796..0c8e3796 100644
--- a/testsuite/systemtap.examples/graphs.stp
+++ b/testsuite/systemtap.examples/general/graphs.stp
diff --git a/testsuite/systemtap.examples/helloworld.meta b/testsuite/systemtap.examples/general/helloworld.meta
index 60bc53f2..60bc53f2 100644
--- a/testsuite/systemtap.examples/helloworld.meta
+++ b/testsuite/systemtap.examples/general/helloworld.meta
diff --git a/testsuite/systemtap.examples/helloworld.stp b/testsuite/systemtap.examples/general/helloworld.stp
index efe45b79..efe45b79 100755
--- a/testsuite/systemtap.examples/helloworld.stp
+++ b/testsuite/systemtap.examples/general/helloworld.stp
diff --git a/testsuite/systemtap.examples/small_demos/key.stp b/testsuite/systemtap.examples/general/key.stp
index 6d2d6c3f..6d2d6c3f 100755
--- a/testsuite/systemtap.examples/small_demos/key.stp
+++ b/testsuite/systemtap.examples/general/key.stp
diff --git a/testsuite/systemtap.examples/small_demos/keyhack.stp b/testsuite/systemtap.examples/general/keyhack.stp
index 3137baad..3137baad 100755
--- a/testsuite/systemtap.examples/small_demos/keyhack.stp
+++ b/testsuite/systemtap.examples/general/keyhack.stp
diff --git a/testsuite/systemtap.examples/para-callgraph.meta b/testsuite/systemtap.examples/general/para-callgraph.meta
index 3ce4b648..3ce4b648 100644
--- a/testsuite/systemtap.examples/para-callgraph.meta
+++ b/testsuite/systemtap.examples/general/para-callgraph.meta
diff --git a/testsuite/systemtap.examples/para-callgraph.stp b/testsuite/systemtap.examples/general/para-callgraph.stp
index 1afb8837..1afb8837 100644
--- a/testsuite/systemtap.examples/para-callgraph.stp
+++ b/testsuite/systemtap.examples/general/para-callgraph.stp
diff --git a/testsuite/systemtap.examples/small_demos/return.wav b/testsuite/systemtap.examples/general/return.wav
index 20f978cc..20f978cc 100644
--- a/testsuite/systemtap.examples/small_demos/return.wav
+++ b/testsuite/systemtap.examples/general/return.wav
Binary files differ
diff --git a/testsuite/systemtap.examples/html_footer.tmpl b/testsuite/systemtap.examples/html/html_footer.tmpl
index 27eccd3c..27eccd3c 100644
--- a/testsuite/systemtap.examples/html_footer.tmpl
+++ b/testsuite/systemtap.examples/html/html_footer.tmpl
diff --git a/testsuite/systemtap.examples/html_header.tmpl b/testsuite/systemtap.examples/html/html_header.tmpl
index 33ce558f..25c7e5a0 100644
--- a/testsuite/systemtap.examples/html_header.tmpl
+++ b/testsuite/systemtap.examples/html/html_header.tmpl
@@ -3,7 +3,7 @@
<html>
<head>
<title>SystemTap Examples</title>
- <link rel="stylesheet" href="systemtap.css" type="text/css">
+ <link rel="stylesheet" href="html/systemtap.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
</head>
@@ -11,7 +11,7 @@
<body>
<table cellspacing="2" cellpadding="2" border="0" width="100%">
<tr>
- <td valign="bottom" height="80"><img src="systemtaplogo.png"
+ <td valign="bottom" height="80"><img src="html/systemtaplogo.png"
alt="SystemTap logo" width="165" height="25"></td>
<td valign="bottom" class="topnavright" align="right">
<a href="http://sourceware.org/systemtap/">SystemTap</a>&nbsp;|&nbsp;
@@ -21,7 +21,7 @@
<div class="mainbackground">
<div class="maintextregion">
- <img src="systemtapcorner.gif">
+ <img src="html/systemtapcorner.gif">
<table cellspacing="2" cellpadding="4" border="0" width="99%"
style="margin-top:17;">
<tr>
diff --git a/testsuite/systemtap.examples/systemtap.css b/testsuite/systemtap.examples/html/systemtap.css
index 445d95f4..445d95f4 100644
--- a/testsuite/systemtap.examples/systemtap.css
+++ b/testsuite/systemtap.examples/html/systemtap.css
diff --git a/testsuite/systemtap.examples/systemtapcorner.gif b/testsuite/systemtap.examples/html/systemtapcorner.gif
index c44f2c75..c44f2c75 100644
--- a/testsuite/systemtap.examples/systemtapcorner.gif
+++ b/testsuite/systemtap.examples/html/systemtapcorner.gif
Binary files differ
diff --git a/testsuite/systemtap.examples/systemtaplogo.png b/testsuite/systemtap.examples/html/systemtaplogo.png
index c223babd..c223babd 100644
--- a/testsuite/systemtap.examples/systemtaplogo.png
+++ b/testsuite/systemtap.examples/html/systemtaplogo.png
Binary files differ
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
new file mode 100644
index 00000000..7557fffe
--- /dev/null
+++ b/testsuite/systemtap.examples/index.html
@@ -0,0 +1,154 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+ <title>SystemTap Examples</title>
+ <link rel="stylesheet" href="html/systemtap.css" type="text/css">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+
+<body>
+ <table cellspacing="2" cellpadding="2" border="0" width="100%">
+ <tr>
+ <td valign="bottom" height="80"><img src="html/systemtaplogo.png"
+ alt="SystemTap logo" width="165" height="25"></td>
+ <td valign="bottom" class="topnavright" align="right">
+ <a href="http://sourceware.org/systemtap/">SystemTap</a>&nbsp;|&nbsp;
+ </td>
+ </tr>
+ </table>
+
+ <div class="mainbackground">
+ <div class="maintextregion">
+ <img src="html/systemtapcorner.gif">
+ <table cellspacing="2" cellpadding="4" border="0" width="99%"
+ style="margin-top:17;">
+ <tr>
+ <td width="200">&nbsp;</td>
+ <td valign="bottom"><h1>Examples</h1></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td valign="top">
+
+ <h2>Example Indexes</h2>
+ <ul>
+ <li><a href="index.html">All Examples</a></li>
+ <li><a href="subsystem-index.html">By Subsystem</a></li>
+ <li><a href="keyword-index.html">By Keyword</a></li>
+ </ul>
+
+<h2>All Examples</h2>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+<li><a href="general/helloworld.stp">general/helloworld.stp</a> - SystemTap "Hello World" Program<br>
+output: text, exits: fixed, status: production<br>
+subsystem: none, keywords: simple<br>
+<p>A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: trace callgraph<br>
+<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: disk, keywords: disk<br>
+<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
+<li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br>
+output: sorted on-exit, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io backtrace<br>
+<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/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
+<li><a href="io/traceio.stp">io/traceio.stp</a> - Track Cumulative I/O Activity by Process Name<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Every second print out the top ten executables sorted in descending order based on cumulative I/O traffic observed.</p></li>
+<li><a href="io/traceio2.stp">io/traceio2.stp</a> - Watch I/O Activity on a Particular Device<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Print out the executable name and process number as reads and writes to the specified device occur.</p></li>
+<li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network traffic per-process<br>
+<p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li>
+<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network socket<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>
+<li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: locking, keywords: syscall locking futex<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>
+<li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br>
+output: sorted-list, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling<br>
+<p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li>
+<li><a href="process/sig_by_pid.stp">process/sig_by_pid.stp</a> - Signal Counts by Process ID<br>
+output: sorted-list on-exit, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<br>
+<p>Print signal counts by process ID in descending order.</p></li>
+<li><a href="process/sig_by_proc.stp">process/sig_by_proc.stp</a> - Signal Counts by Process Name<br>
+output: sorted-list on-exit, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<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>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: signals, keywords: signals<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 desination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
+output: trace, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<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>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: scheduler, keywords: io scheduler<br>
+<p>The script monitor time threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms wall-clock time waiting, information is printed out describing the thread number and executable name. When slow the wait_for_completion function complete, backtraces for the long duration calls are printed out.</p></li>
+<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall sleep<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 paretheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
+<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall<br>
+<p>The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each PID ordered from greatest to least number of syscalls.</p></li>
+<li><a href="process/syscalls_by_proc.stp">process/syscalls_by_proc.stp</a> - System-Wide Count of Syscalls by Executable<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall<br>
+<p>The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each executable ordered from greates to least number of syscalls.</p></li>
+<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall wait4<br>
+<p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".</p></li>
+<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling functions<br>
+<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
+<li><a href="profiling/thread-times.stp">profiling/thread-times.stp</a> - Profile kernel functions<br>
+output: sorted-list, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling<br>
+<p>The thread-times.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top twenty processes with samples broken down into percentage total time spent in user-space and kernel-space.</p></li>
+</ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <table cellspacing="2" cellpadding="2" border="0" width="100%">
+ <tr>
+ <td align="center" class="footer"><a href=
+ "http://sourceware.org/systemtap">SystemTap</a></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
new file mode 100644
index 00000000..e90cf2c6
--- /dev/null
+++ b/testsuite/systemtap.examples/index.txt
@@ -0,0 +1,238 @@
+SYSTEMTAP EXAMPLES INDEX
+(see also subsystem-index.txt, keyword-index.txt)
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+general/helloworld.stp - SystemTap "Hello World" Program
+output: text, exits: fixed, status: production
+subsystem: none, keywords: simple
+
+ A basic "Hello World" program implemented in SystemTap script. It
+ prints out "hello world" message and then immediately exits.
+
+
+general/para-callgraph.stp - Tracing Calls for Sections of Code
+output: trace, exits: user-controlled, status: production
+subsystem: kernel, keywords: trace callgraph
+
+ The script takes two arguments: the first argument is the function to
+ starts/stops the per thread call graph traces and the second argument
+ is the list of functions to generate trace information on. The script
+ prints out a timestap for the thread, the function name and pid,
+ followed by entry or exit symboly and function name.
+
+
+io/disktop.stp - Summarize Disk Read/Write Traffic
+output: timed, exits: user-controlled, status: production
+subsystem: disk, keywords: disk
+
+ Get the status of reading/writing disk every 5 seconds, output top
+ ten entries during that period.
+
+
+io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
+output: sorted on-exit, exits: user-controlled, status: production
+subsystem: io, keywords: io backtrace
+
+ 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.
+
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
+io/iotop.stp - Periodically Print I/O Activity by Process Name
+output: timed, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Every five seconds print out the top ten executables generating I/O
+ traffic during that interval sorted in descending order.
+
+
+io/traceio.stp - Track Cumulative I/O Activity by Process Name
+output: timed, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Every second print out the top ten executables sorted in descending
+ order based on cumulative I/O traffic observed.
+
+
+io/traceio2.stp - Watch I/O Activity on a Particular Device
+output: trace, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Print out the executable name and process number as reads and writes
+ to the specified device occur.
+
+
+network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
+output: timed, exits: user-controlled, status: production
+subsystem: network, keywords: network traffic per-process
+
+ Every five seconds the nettop.stp script prints out a list of
+ processed (PID and command) with the number of packets sent/received
+ and the amount of data sent/received by the process during that
+ interval.
+
+
+network/socket-trace.stp - Trace Functions called in Network Socket Code
+output: trace, exits: user-controlled, status: production
+subsystem: network, 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.
+
+
+process/futexes.stp - System-Wide Futex Contention
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: locking, keywords: syscall locking futex
+
+ 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.
+
+
+process/pf2.stp - Profile kernel functions
+output: sorted-list, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling
+
+ The pf2.stp script sets up time-based sampling. Every five seconds it
+ prints out a sorted list with the top ten kernel functions with
+ samples.
+
+
+process/sig_by_pid.stp - Signal Counts by Process ID
+output: sorted-list on-exit, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ Print signal counts by process ID in descending order.
+
+
+process/sig_by_proc.stp - Signal Counts by Process Name
+output: sorted-list on-exit, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ Print signal counts by process name in descending order.
+
+
+process/sigkill.stp - Track SIGKILL Signals
+output: trace, exits: user-controlled, status: production
+subsystem: signals, 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
+ desination executable and process ID, the executable name user ID
+ that sent the signal.
+
+
+process/syscalls_by_pid.stp - System-Wide Count of Syscalls by PID
+output: trace, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ 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.
+
+
+process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
+output: trace, exits: user-controlled, status: production
+subsystem: scheduler, keywords: io scheduler
+
+ The script monitor time threads spend waiting for IO operations (in
+ "D" state) in the wait_for_completion function. If a thread spends
+ over 10ms wall-clock time waiting, information is printed out
+ describing the thread number and executable name. When slow the
+ wait_for_completion function complete, backtraces for the long
+ duration calls are printed out.
+
+
+process/sleeptime.stp - Trace Time Spent in nanosleep Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall sleep
+
+ 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
+ paretheses, the "nanosleep:" key, and the duration of the sleep in
+ microseconds.
+
+
+process/syscalls_by_pid.stp - System-Wide Count of Syscalls by PID
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall
+
+ The script watches all syscall on the system. On exit the script
+ prints a list showing the number of systemcalls executed by each PID
+ ordered from greatest to least number of syscalls.
+
+
+process/syscalls_by_proc.stp - System-Wide Count of Syscalls by Executable
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall
+
+ The script watches all syscall on the system. On exit the script
+ prints a list showing the number of systemcalls executed by each
+ executable ordered from greates to least number of syscalls.
+
+
+process/wait4time.stp - Trace Time Spent in wait4 Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall wait4
+
+ The script watches each wait4 syscall on the system. At the end of
+ each wait4 syscall the script prints out a line with a timestamp in
+ microseconds, the pid, the executable name in paretheses, the
+ "wait4:" key, the duration of the wait and the PID that the wait4 was
+ waiting for. If the waited for PID is not specified , it is "-1".
+
+
+profiling/functioncallcount.stp - Count Times Functions Called
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling functions
+
+ The functioncallcount.stp script takes one argument, a list of
+ functions to probe. The script will run and count the number of times
+ that each of the functions on the list is called. On exit the script
+ will print a sorted list from most frequently to least frequently
+ called function.
+
+
+profiling/thread-times.stp - Profile kernel functions
+output: sorted-list, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling
+
+ The thread-times.stp script sets up time-based sampling. Every five
+ seconds it prints out a sorted list with the top twenty processes
+ with samples broken down into percentage total time spent in
+ user-space and kernel-space.
+
+
diff --git a/testsuite/systemtap.examples/disktop.meta b/testsuite/systemtap.examples/io/disktop.meta
index b063075b..b063075b 100644
--- a/testsuite/systemtap.examples/disktop.meta
+++ b/testsuite/systemtap.examples/io/disktop.meta
diff --git a/testsuite/systemtap.examples/disktop.stp b/testsuite/systemtap.examples/io/disktop.stp
index 2637d735..2637d735 100644
--- a/testsuite/systemtap.examples/disktop.stp
+++ b/testsuite/systemtap.examples/io/disktop.stp
diff --git a/testsuite/systemtap.examples/io_submit.meta b/testsuite/systemtap.examples/io/io_submit.meta
index 911cb837..911cb837 100644
--- a/testsuite/systemtap.examples/io_submit.meta
+++ b/testsuite/systemtap.examples/io/io_submit.meta
diff --git a/testsuite/systemtap.examples/io_submit.stp b/testsuite/systemtap.examples/io/io_submit.stp
index 735dd6f9..735dd6f9 100644
--- a/testsuite/systemtap.examples/io_submit.stp
+++ b/testsuite/systemtap.examples/io/io_submit.stp
diff --git a/testsuite/systemtap.examples/iostat-scsi.stp b/testsuite/systemtap.examples/io/iostat-scsi.stp
index ef778e53..ef778e53 100755
--- a/testsuite/systemtap.examples/iostat-scsi.stp
+++ b/testsuite/systemtap.examples/io/iostat-scsi.stp
diff --git a/testsuite/systemtap.examples/iostat-scsi.txt b/testsuite/systemtap.examples/io/iostat-scsi.txt
index 8222f659..8222f659 100644
--- a/testsuite/systemtap.examples/iostat-scsi.txt
+++ b/testsuite/systemtap.examples/io/iostat-scsi.txt
diff --git a/testsuite/systemtap.examples/iotime.meta b/testsuite/systemtap.examples/io/iotime.meta
index f656ff85..f656ff85 100644
--- a/testsuite/systemtap.examples/iotime.meta
+++ b/testsuite/systemtap.examples/io/iotime.meta
diff --git a/testsuite/systemtap.examples/iotime.stp b/testsuite/systemtap.examples/io/iotime.stp
index 4fbd6b6e..4fbd6b6e 100755
--- a/testsuite/systemtap.examples/iotime.stp
+++ b/testsuite/systemtap.examples/io/iotime.stp
diff --git a/testsuite/systemtap.examples/iotop.meta b/testsuite/systemtap.examples/io/iotop.meta
index d5331eda..d5331eda 100644
--- a/testsuite/systemtap.examples/iotop.meta
+++ b/testsuite/systemtap.examples/io/iotop.meta
diff --git a/testsuite/systemtap.examples/iotop.stp b/testsuite/systemtap.examples/io/iotop.stp
index 6050343c..6050343c 100644
--- a/testsuite/systemtap.examples/iotop.stp
+++ b/testsuite/systemtap.examples/io/iotop.stp
diff --git a/testsuite/systemtap.examples/traceio.meta b/testsuite/systemtap.examples/io/traceio.meta
index da0b99f3..da0b99f3 100644
--- a/testsuite/systemtap.examples/traceio.meta
+++ b/testsuite/systemtap.examples/io/traceio.meta
diff --git a/testsuite/systemtap.examples/traceio.stp b/testsuite/systemtap.examples/io/traceio.stp
index d3757c23..d3757c23 100644
--- a/testsuite/systemtap.examples/traceio.stp
+++ b/testsuite/systemtap.examples/io/traceio.stp
diff --git a/testsuite/systemtap.examples/traceio2.meta b/testsuite/systemtap.examples/io/traceio2.meta
index 4b63108c..4b63108c 100644
--- a/testsuite/systemtap.examples/traceio2.meta
+++ b/testsuite/systemtap.examples/io/traceio2.meta
diff --git a/testsuite/systemtap.examples/traceio2.stp b/testsuite/systemtap.examples/io/traceio2.stp
index 656c38b3..656c38b3 100644
--- a/testsuite/systemtap.examples/traceio2.stp
+++ b/testsuite/systemtap.examples/io/traceio2.stp
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
new file mode 100644
index 00000000..07cca25b
--- /dev/null
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -0,0 +1,299 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+ <title>SystemTap Examples</title>
+ <link rel="stylesheet" href="html/systemtap.css" type="text/css">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+
+<body>
+ <table cellspacing="2" cellpadding="2" border="0" width="100%">
+ <tr>
+ <td valign="bottom" height="80"><img src="html/systemtaplogo.png"
+ alt="SystemTap logo" width="165" height="25"></td>
+ <td valign="bottom" class="topnavright" align="right">
+ <a href="http://sourceware.org/systemtap/">SystemTap</a>&nbsp;|&nbsp;
+ </td>
+ </tr>
+ </table>
+
+ <div class="mainbackground">
+ <div class="maintextregion">
+ <img src="html/systemtapcorner.gif">
+ <table cellspacing="2" cellpadding="4" border="0" width="99%"
+ style="margin-top:17;">
+ <tr>
+ <td width="200">&nbsp;</td>
+ <td valign="bottom"><h1>Examples</h1></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td valign="top">
+
+ <h2>Example Indexes</h2>
+ <ul>
+ <li><a href="index.html">All Examples</a></li>
+ <li><a href="subsystem-index.html">By Subsystem</a></li>
+ <li><a href="keyword-index.html">By Keyword</a></li>
+ </ul>
+
+<h2>Examples by Keyword</h2>
+<h3>BACKTRACE</h3>
+<ul>
+<li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br>
+output: sorted on-exit, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io backtrace<br>
+<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>
+</ul>
+<h3>CALLGRAPH</h3>
+<ul>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: trace callgraph<br>
+<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+</ul>
+<h3>CPU</h3>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+</ul>
+<h3>DISK</h3>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+<li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: disk, keywords: disk<br>
+<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
+</ul>
+<h3>FUNCTIONS</h3>
+<ul>
+<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling functions<br>
+<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
+</ul>
+<h3>FUTEX</h3>
+<ul>
+<li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: locking, keywords: syscall locking futex<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>
+</ul>
+<h3>GRAPH</h3>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+</ul>
+<h3>IO</h3>
+<ul>
+<li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br>
+output: sorted on-exit, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io backtrace<br>
+<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/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
+<li><a href="io/traceio.stp">io/traceio.stp</a> - Track Cumulative I/O Activity by Process Name<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Every second print out the top ten executables sorted in descending order based on cumulative I/O traffic observed.</p></li>
+<li><a href="io/traceio2.stp">io/traceio2.stp</a> - Watch I/O Activity on a Particular Device<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Print out the executable name and process number as reads and writes to the specified device occur.</p></li>
+<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: scheduler, keywords: io scheduler<br>
+<p>The script monitor time threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms wall-clock time waiting, information is printed out describing the thread number and executable name. When slow the wait_for_completion function complete, backtraces for the long duration calls are printed out.</p></li>
+</ul>
+<h3>LOCKING</h3>
+<ul>
+<li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: locking, keywords: syscall locking futex<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>
+</ul>
+<h3>NETWORK</h3>
+<ul>
+<li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network traffic per-process<br>
+<p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li>
+<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network socket<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>
+</ul>
+<h3>PER-PROCESS</h3>
+<ul>
+<li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network traffic per-process<br>
+<p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li>
+</ul>
+<h3>PROFILING</h3>
+<ul>
+<li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br>
+output: sorted-list, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling<br>
+<p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li>
+<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling functions<br>
+<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
+<li><a href="profiling/thread-times.stp">profiling/thread-times.stp</a> - Profile kernel functions<br>
+output: sorted-list, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling<br>
+<p>The thread-times.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top twenty processes with samples broken down into percentage total time spent in user-space and kernel-space.</p></li>
+</ul>
+<h3>READ</h3>
+<ul>
+<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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>SCHEDULER</h3>
+<ul>
+<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: scheduler, keywords: io scheduler<br>
+<p>The script monitor time threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms wall-clock time waiting, information is printed out describing the thread number and executable name. When slow the wait_for_completion function complete, backtraces for the long duration calls are printed out.</p></li>
+</ul>
+<h3>SIGNALS</h3>
+<ul>
+<li><a href="process/sig_by_pid.stp">process/sig_by_pid.stp</a> - Signal Counts by Process ID<br>
+output: sorted-list on-exit, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<br>
+<p>Print signal counts by process ID in descending order.</p></li>
+<li><a href="process/sig_by_proc.stp">process/sig_by_proc.stp</a> - Signal Counts by Process Name<br>
+output: sorted-list on-exit, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<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>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: signals, keywords: signals<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 desination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
+output: trace, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<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>
+</ul>
+<h3>SIMPLE</h3>
+<ul>
+<li><a href="general/helloworld.stp">general/helloworld.stp</a> - SystemTap "Hello World" Program<br>
+output: text, exits: fixed, status: production<br>
+subsystem: none, keywords: simple<br>
+<p>A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.</p></li>
+</ul>
+<h3>SLEEP</h3>
+<ul>
+<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall sleep<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 paretheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
+</ul>
+<h3>SOCKET</h3>
+<ul>
+<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network socket<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>
+</ul>
+<h3>SYSCALL</h3>
+<ul>
+<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: locking, keywords: syscall locking futex<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>
+<li><a href="process/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall sleep<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 paretheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
+<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall<br>
+<p>The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each PID ordered from greatest to least number of syscalls.</p></li>
+<li><a href="process/syscalls_by_proc.stp">process/syscalls_by_proc.stp</a> - System-Wide Count of Syscalls by Executable<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall<br>
+<p>The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each executable ordered from greates to least number of syscalls.</p></li>
+<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall wait4<br>
+<p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".</p></li>
+</ul>
+<h3>TIME</h3>
+<ul>
+<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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>TRACE</h3>
+<ul>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: trace callgraph<br>
+<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+</ul>
+<h3>TRAFFIC</h3>
+<ul>
+<li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network traffic per-process<br>
+<p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li>
+</ul>
+<h3>USE</h3>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+</ul>
+<h3>WAIT4</h3>
+<ul>
+<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall wait4<br>
+<p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".</p></li>
+</ul>
+<h3>WRITE</h3>
+<ul>
+<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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>
+ </table>
+ </div>
+ </div>
+
+ <table cellspacing="2" cellpadding="2" border="0" width="100%">
+ <tr>
+ <td align="center" class="footer"><a href=
+ "http://sourceware.org/systemtap">SystemTap</a></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
new file mode 100644
index 00000000..606430f2
--- /dev/null
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -0,0 +1,500 @@
+SYSTEMTAP EXAMPLES INDEX BY KEYWORD
+(see also index.txt, subsystem-index.txt)
+
+= BACKTRACE =
+
+io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
+output: sorted on-exit, exits: user-controlled, status: production
+subsystem: io, keywords: io backtrace
+
+ 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.
+
+
+= CALLGRAPH =
+
+general/para-callgraph.stp - Tracing Calls for Sections of Code
+output: trace, exits: user-controlled, status: production
+subsystem: kernel, keywords: trace callgraph
+
+ The script takes two arguments: the first argument is the function to
+ starts/stops the per thread call graph traces and the second argument
+ is the list of functions to generate trace information on. The script
+ prints out a timestap for the thread, the function name and pid,
+ followed by entry or exit symboly and function name.
+
+
+= CPU =
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+= DISK =
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+io/disktop.stp - Summarize Disk Read/Write Traffic
+output: timed, exits: user-controlled, status: production
+subsystem: disk, keywords: disk
+
+ Get the status of reading/writing disk every 5 seconds, output top
+ ten entries during that period.
+
+
+= FUNCTIONS =
+
+profiling/functioncallcount.stp - Count Times Functions Called
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling functions
+
+ The functioncallcount.stp script takes one argument, a list of
+ functions to probe. The script will run and count the number of times
+ that each of the functions on the list is called. On exit the script
+ will print a sorted list from most frequently to least frequently
+ called function.
+
+
+= FUTEX =
+
+process/futexes.stp - System-Wide Futex Contention
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: locking, keywords: syscall locking futex
+
+ 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.
+
+
+= GRAPH =
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+= IO =
+
+io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
+output: sorted on-exit, exits: user-controlled, status: production
+subsystem: io, keywords: io backtrace
+
+ 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.
+
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
+io/iotop.stp - Periodically Print I/O Activity by Process Name
+output: timed, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Every five seconds print out the top ten executables generating I/O
+ traffic during that interval sorted in descending order.
+
+
+io/traceio.stp - Track Cumulative I/O Activity by Process Name
+output: timed, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Every second print out the top ten executables sorted in descending
+ order based on cumulative I/O traffic observed.
+
+
+io/traceio2.stp - Watch I/O Activity on a Particular Device
+output: trace, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Print out the executable name and process number as reads and writes
+ to the specified device occur.
+
+
+process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
+output: trace, exits: user-controlled, status: production
+subsystem: scheduler, keywords: io scheduler
+
+ The script monitor time threads spend waiting for IO operations (in
+ "D" state) in the wait_for_completion function. If a thread spends
+ over 10ms wall-clock time waiting, information is printed out
+ describing the thread number and executable name. When slow the
+ wait_for_completion function complete, backtraces for the long
+ duration calls are printed out.
+
+
+= LOCKING =
+
+process/futexes.stp - System-Wide Futex Contention
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: locking, keywords: syscall locking futex
+
+ 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.
+
+
+= NETWORK =
+
+network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
+output: timed, exits: user-controlled, status: production
+subsystem: network, keywords: network traffic per-process
+
+ Every five seconds the nettop.stp script prints out a list of
+ processed (PID and command) with the number of packets sent/received
+ and the amount of data sent/received by the process during that
+ interval.
+
+
+network/socket-trace.stp - Trace Functions called in Network Socket Code
+output: trace, exits: user-controlled, status: production
+subsystem: network, 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.
+
+
+= PER-PROCESS =
+
+network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
+output: timed, exits: user-controlled, status: production
+subsystem: network, keywords: network traffic per-process
+
+ Every five seconds the nettop.stp script prints out a list of
+ processed (PID and command) with the number of packets sent/received
+ and the amount of data sent/received by the process during that
+ interval.
+
+
+= PROFILING =
+
+process/pf2.stp - Profile kernel functions
+output: sorted-list, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling
+
+ The pf2.stp script sets up time-based sampling. Every five seconds it
+ prints out a sorted list with the top ten kernel functions with
+ samples.
+
+
+profiling/functioncallcount.stp - Count Times Functions Called
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling functions
+
+ The functioncallcount.stp script takes one argument, a list of
+ functions to probe. The script will run and count the number of times
+ that each of the functions on the list is called. On exit the script
+ will print a sorted list from most frequently to least frequently
+ called function.
+
+
+profiling/thread-times.stp - Profile kernel functions
+output: sorted-list, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling
+
+ The thread-times.stp script sets up time-based sampling. Every five
+ seconds it prints out a sorted list with the top twenty processes
+ with samples broken down into percentage total time spent in
+ user-space and kernel-space.
+
+
+= READ =
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
+= SCHEDULER =
+
+process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
+output: trace, exits: user-controlled, status: production
+subsystem: scheduler, keywords: io scheduler
+
+ The script monitor time threads spend waiting for IO operations (in
+ "D" state) in the wait_for_completion function. If a thread spends
+ over 10ms wall-clock time waiting, information is printed out
+ describing the thread number and executable name. When slow the
+ wait_for_completion function complete, backtraces for the long
+ duration calls are printed out.
+
+
+= SIGNALS =
+
+process/sig_by_pid.stp - Signal Counts by Process ID
+output: sorted-list on-exit, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ Print signal counts by process ID in descending order.
+
+
+process/sig_by_proc.stp - Signal Counts by Process Name
+output: sorted-list on-exit, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ Print signal counts by process name in descending order.
+
+
+process/sigkill.stp - Track SIGKILL Signals
+output: trace, exits: user-controlled, status: production
+subsystem: signals, 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
+ desination executable and process ID, the executable name user ID
+ that sent the signal.
+
+
+process/syscalls_by_pid.stp - System-Wide Count of Syscalls by PID
+output: trace, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ 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.
+
+
+= SIMPLE =
+
+general/helloworld.stp - SystemTap "Hello World" Program
+output: text, exits: fixed, status: production
+subsystem: none, keywords: simple
+
+ A basic "Hello World" program implemented in SystemTap script. It
+ prints out "hello world" message and then immediately exits.
+
+
+= SLEEP =
+
+process/sleeptime.stp - Trace Time Spent in nanosleep Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall sleep
+
+ 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
+ paretheses, the "nanosleep:" key, and the duration of the sleep in
+ microseconds.
+
+
+= SOCKET =
+
+network/socket-trace.stp - Trace Functions called in Network Socket Code
+output: trace, exits: user-controlled, status: production
+subsystem: network, 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.
+
+
+= SYSCALL =
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
+process/futexes.stp - System-Wide Futex Contention
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: locking, keywords: syscall locking futex
+
+ 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.
+
+
+process/sleeptime.stp - Trace Time Spent in nanosleep Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall sleep
+
+ 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
+ paretheses, the "nanosleep:" key, and the duration of the sleep in
+ microseconds.
+
+
+process/syscalls_by_pid.stp - System-Wide Count of Syscalls by PID
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall
+
+ The script watches all syscall on the system. On exit the script
+ prints a list showing the number of systemcalls executed by each PID
+ ordered from greatest to least number of syscalls.
+
+
+process/syscalls_by_proc.stp - System-Wide Count of Syscalls by Executable
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall
+
+ The script watches all syscall on the system. On exit the script
+ prints a list showing the number of systemcalls executed by each
+ executable ordered from greates to least number of syscalls.
+
+
+process/wait4time.stp - Trace Time Spent in wait4 Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall wait4
+
+ The script watches each wait4 syscall on the system. At the end of
+ each wait4 syscall the script prints out a line with a timestamp in
+ microseconds, the pid, the executable name in paretheses, the
+ "wait4:" key, the duration of the wait and the PID that the wait4 was
+ waiting for. If the waited for PID is not specified , it is "-1".
+
+
+= TIME =
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
+= TRACE =
+
+general/para-callgraph.stp - Tracing Calls for Sections of Code
+output: trace, exits: user-controlled, status: production
+subsystem: kernel, keywords: trace callgraph
+
+ The script takes two arguments: the first argument is the function to
+ starts/stops the per thread call graph traces and the second argument
+ is the list of functions to generate trace information on. The script
+ prints out a timestap for the thread, the function name and pid,
+ followed by entry or exit symboly and function name.
+
+
+= TRAFFIC =
+
+network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
+output: timed, exits: user-controlled, status: production
+subsystem: network, keywords: network traffic per-process
+
+ Every five seconds the nettop.stp script prints out a list of
+ processed (PID and command) with the number of packets sent/received
+ and the amount of data sent/received by the process during that
+ interval.
+
+
+= USE =
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+= WAIT4 =
+
+process/wait4time.stp - Trace Time Spent in wait4 Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall wait4
+
+ The script watches each wait4 syscall on the system. At the end of
+ each wait4 syscall the script prints out a line with a timestamp in
+ microseconds, the pid, the executable name in paretheses, the
+ "wait4:" key, the duration of the wait and the PID that the wait4 was
+ waiting for. If the waited for PID is not specified , it is "-1".
+
+
+= WRITE =
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
diff --git a/testsuite/systemtap.examples/nettop.meta b/testsuite/systemtap.examples/network/nettop.meta
index 61d1c153..61d1c153 100644
--- a/testsuite/systemtap.examples/nettop.meta
+++ b/testsuite/systemtap.examples/network/nettop.meta
diff --git a/testsuite/systemtap.examples/nettop.stp b/testsuite/systemtap.examples/network/nettop.stp
index 96db413a..96db413a 100755
--- a/testsuite/systemtap.examples/nettop.stp
+++ b/testsuite/systemtap.examples/network/nettop.stp
diff --git a/testsuite/systemtap.examples/nettop.txt b/testsuite/systemtap.examples/network/nettop.txt
index 2bfd4967..2bfd4967 100644
--- a/testsuite/systemtap.examples/nettop.txt
+++ b/testsuite/systemtap.examples/network/nettop.txt
diff --git a/testsuite/systemtap.examples/socket-trace.meta b/testsuite/systemtap.examples/network/socket-trace.meta
index 0b26f2fe..0b26f2fe 100644
--- a/testsuite/systemtap.examples/socket-trace.meta
+++ b/testsuite/systemtap.examples/network/socket-trace.meta
diff --git a/testsuite/systemtap.examples/socket-trace.stp b/testsuite/systemtap.examples/network/socket-trace.stp
index 13ab8e06..13ab8e06 100755
--- a/testsuite/systemtap.examples/socket-trace.stp
+++ b/testsuite/systemtap.examples/network/socket-trace.stp
diff --git a/testsuite/systemtap.examples/socktop b/testsuite/systemtap.examples/network/socktop
index 123e37e9..123e37e9 100755
--- a/testsuite/systemtap.examples/socktop
+++ b/testsuite/systemtap.examples/network/socktop
diff --git a/testsuite/systemtap.examples/socktop.txt b/testsuite/systemtap.examples/network/socktop.txt
index 0ebce003..0ebce003 100644
--- a/testsuite/systemtap.examples/socktop.txt
+++ b/testsuite/systemtap.examples/network/socktop.txt
diff --git a/testsuite/systemtap.examples/futexes.meta b/testsuite/systemtap.examples/process/futexes.meta
index ff303122..ff303122 100644
--- a/testsuite/systemtap.examples/futexes.meta
+++ b/testsuite/systemtap.examples/process/futexes.meta
diff --git a/testsuite/systemtap.examples/futexes.stp b/testsuite/systemtap.examples/process/futexes.stp
index 16c62937..16c62937 100755
--- a/testsuite/systemtap.examples/futexes.stp
+++ b/testsuite/systemtap.examples/process/futexes.stp
diff --git a/testsuite/systemtap.examples/futexes.txt b/testsuite/systemtap.examples/process/futexes.txt
index 51de4352..51de4352 100644
--- a/testsuite/systemtap.examples/futexes.txt
+++ b/testsuite/systemtap.examples/process/futexes.txt
diff --git a/testsuite/systemtap.examples/pf2.meta b/testsuite/systemtap.examples/process/pf2.meta
index d0a534bd..d0a534bd 100644
--- a/testsuite/systemtap.examples/pf2.meta
+++ b/testsuite/systemtap.examples/process/pf2.meta
diff --git a/testsuite/systemtap.examples/pf2.stp b/testsuite/systemtap.examples/process/pf2.stp
index a804c3ff..a804c3ff 100755
--- a/testsuite/systemtap.examples/pf2.stp
+++ b/testsuite/systemtap.examples/process/pf2.stp
diff --git a/testsuite/systemtap.examples/pf2.txt b/testsuite/systemtap.examples/process/pf2.txt
index 0fafe17e..0fafe17e 100644
--- a/testsuite/systemtap.examples/pf2.txt
+++ b/testsuite/systemtap.examples/process/pf2.txt
diff --git a/testsuite/systemtap.examples/small_demos/proc_snoop.stp b/testsuite/systemtap.examples/process/proc_snoop.stp
index 24499b4b..24499b4b 100755
--- a/testsuite/systemtap.examples/small_demos/proc_snoop.stp
+++ b/testsuite/systemtap.examples/process/proc_snoop.stp
diff --git a/testsuite/systemtap.examples/sig_by_pid.meta b/testsuite/systemtap.examples/process/sig_by_pid.meta
index 03b02fba..03b02fba 100644
--- a/testsuite/systemtap.examples/sig_by_pid.meta
+++ b/testsuite/systemtap.examples/process/sig_by_pid.meta
diff --git a/testsuite/systemtap.examples/sig_by_pid.stp b/testsuite/systemtap.examples/process/sig_by_pid.stp
index 9c1493f5..9c1493f5 100755
--- a/testsuite/systemtap.examples/sig_by_pid.stp
+++ b/testsuite/systemtap.examples/process/sig_by_pid.stp
diff --git a/testsuite/systemtap.examples/sig_by_pid.txt b/testsuite/systemtap.examples/process/sig_by_pid.txt
index 927b4607..927b4607 100644
--- a/testsuite/systemtap.examples/sig_by_pid.txt
+++ b/testsuite/systemtap.examples/process/sig_by_pid.txt
diff --git a/testsuite/systemtap.examples/sig_by_proc.meta b/testsuite/systemtap.examples/process/sig_by_proc.meta
index eea42be4..eea42be4 100644
--- a/testsuite/systemtap.examples/sig_by_proc.meta
+++ b/testsuite/systemtap.examples/process/sig_by_proc.meta
diff --git a/testsuite/systemtap.examples/sig_by_proc.stp b/testsuite/systemtap.examples/process/sig_by_proc.stp
index ce845aed..ce845aed 100755
--- a/testsuite/systemtap.examples/sig_by_proc.stp
+++ b/testsuite/systemtap.examples/process/sig_by_proc.stp
diff --git a/testsuite/systemtap.examples/sig_by_proc.txt b/testsuite/systemtap.examples/process/sig_by_proc.txt
index d09da9fe..d09da9fe 100644
--- a/testsuite/systemtap.examples/sig_by_proc.txt
+++ b/testsuite/systemtap.examples/process/sig_by_proc.txt
diff --git a/testsuite/systemtap.examples/sigkill.meta b/testsuite/systemtap.examples/process/sigkill.meta
index 57032224..57032224 100644
--- a/testsuite/systemtap.examples/sigkill.meta
+++ b/testsuite/systemtap.examples/process/sigkill.meta
diff --git a/testsuite/systemtap.examples/sigkill.stp b/testsuite/systemtap.examples/process/sigkill.stp
index 8f754219..8f754219 100644
--- a/testsuite/systemtap.examples/sigkill.stp
+++ b/testsuite/systemtap.examples/process/sigkill.stp
diff --git a/testsuite/systemtap.examples/sigmon.meta b/testsuite/systemtap.examples/process/sigmon.meta
index 18834997..18834997 100644
--- a/testsuite/systemtap.examples/sigmon.meta
+++ b/testsuite/systemtap.examples/process/sigmon.meta
diff --git a/testsuite/systemtap.examples/sigmon.stp b/testsuite/systemtap.examples/process/sigmon.stp
index 31d7822e..31d7822e 100755
--- a/testsuite/systemtap.examples/sigmon.stp
+++ b/testsuite/systemtap.examples/process/sigmon.stp
diff --git a/testsuite/systemtap.examples/sleepingBeauties.meta b/testsuite/systemtap.examples/process/sleepingBeauties.meta
index 95e08361..95e08361 100644
--- a/testsuite/systemtap.examples/sleepingBeauties.meta
+++ b/testsuite/systemtap.examples/process/sleepingBeauties.meta
diff --git a/testsuite/systemtap.examples/sleepingBeauties.stp b/testsuite/systemtap.examples/process/sleepingBeauties.stp
index 64c563a3..64c563a3 100644
--- a/testsuite/systemtap.examples/sleepingBeauties.stp
+++ b/testsuite/systemtap.examples/process/sleepingBeauties.stp
diff --git a/testsuite/systemtap.examples/sleeptime.meta b/testsuite/systemtap.examples/process/sleeptime.meta
index d6c59345..d6c59345 100644
--- a/testsuite/systemtap.examples/sleeptime.meta
+++ b/testsuite/systemtap.examples/process/sleeptime.meta
diff --git a/testsuite/systemtap.examples/sleeptime.stp b/testsuite/systemtap.examples/process/sleeptime.stp
index b5729ceb..b5729ceb 100755
--- a/testsuite/systemtap.examples/sleeptime.stp
+++ b/testsuite/systemtap.examples/process/sleeptime.stp
diff --git a/testsuite/systemtap.examples/syscalls_by_pid.meta b/testsuite/systemtap.examples/process/syscalls_by_pid.meta
index 590652b3..590652b3 100644
--- a/testsuite/systemtap.examples/syscalls_by_pid.meta
+++ b/testsuite/systemtap.examples/process/syscalls_by_pid.meta
diff --git a/testsuite/systemtap.examples/syscalls_by_pid.stp b/testsuite/systemtap.examples/process/syscalls_by_pid.stp
index 47aa4955..47aa4955 100755
--- a/testsuite/systemtap.examples/syscalls_by_pid.stp
+++ b/testsuite/systemtap.examples/process/syscalls_by_pid.stp
diff --git a/testsuite/systemtap.examples/syscalls_by_pid.txt b/testsuite/systemtap.examples/process/syscalls_by_pid.txt
index 4943a139..4943a139 100644
--- a/testsuite/systemtap.examples/syscalls_by_pid.txt
+++ b/testsuite/systemtap.examples/process/syscalls_by_pid.txt
diff --git a/testsuite/systemtap.examples/syscalls_by_proc.meta b/testsuite/systemtap.examples/process/syscalls_by_proc.meta
index 79aa3e87..79aa3e87 100644
--- a/testsuite/systemtap.examples/syscalls_by_proc.meta
+++ b/testsuite/systemtap.examples/process/syscalls_by_proc.meta
diff --git a/testsuite/systemtap.examples/syscalls_by_proc.stp b/testsuite/systemtap.examples/process/syscalls_by_proc.stp
index af7d6932..af7d6932 100755
--- a/testsuite/systemtap.examples/syscalls_by_proc.stp
+++ b/testsuite/systemtap.examples/process/syscalls_by_proc.stp
diff --git a/testsuite/systemtap.examples/syscalls_by_proc.txt b/testsuite/systemtap.examples/process/syscalls_by_proc.txt
index dd554083..dd554083 100644
--- a/testsuite/systemtap.examples/syscalls_by_proc.txt
+++ b/testsuite/systemtap.examples/process/syscalls_by_proc.txt
diff --git a/testsuite/systemtap.examples/syscalltimes b/testsuite/systemtap.examples/process/syscalltimes
index 84ca77a9..84ca77a9 100755
--- a/testsuite/systemtap.examples/syscalltimes
+++ b/testsuite/systemtap.examples/process/syscalltimes
diff --git a/testsuite/systemtap.examples/syscalltimes.txt b/testsuite/systemtap.examples/process/syscalltimes.txt
index d50f73ad..d50f73ad 100644
--- a/testsuite/systemtap.examples/syscalltimes.txt
+++ b/testsuite/systemtap.examples/process/syscalltimes.txt
diff --git a/testsuite/systemtap.examples/wait4time.meta b/testsuite/systemtap.examples/process/wait4time.meta
index a939d466..a939d466 100644
--- a/testsuite/systemtap.examples/wait4time.meta
+++ b/testsuite/systemtap.examples/process/wait4time.meta
diff --git a/testsuite/systemtap.examples/wait4time.stp b/testsuite/systemtap.examples/process/wait4time.stp
index ba300ea7..ba300ea7 100755
--- a/testsuite/systemtap.examples/wait4time.stp
+++ b/testsuite/systemtap.examples/process/wait4time.stp
diff --git a/testsuite/systemtap.examples/functioncallcount.meta b/testsuite/systemtap.examples/profiling/functioncallcount.meta
index 4d419528..4d419528 100644
--- a/testsuite/systemtap.examples/functioncallcount.meta
+++ b/testsuite/systemtap.examples/profiling/functioncallcount.meta
diff --git a/testsuite/systemtap.examples/functioncallcount.stp b/testsuite/systemtap.examples/profiling/functioncallcount.stp
index e393b612..e393b612 100644
--- a/testsuite/systemtap.examples/functioncallcount.stp
+++ b/testsuite/systemtap.examples/profiling/functioncallcount.stp
diff --git a/testsuite/systemtap.examples/thread-times.meta b/testsuite/systemtap.examples/profiling/thread-times.meta
index fcbf062e..fcbf062e 100644
--- a/testsuite/systemtap.examples/thread-times.meta
+++ b/testsuite/systemtap.examples/profiling/thread-times.meta
diff --git a/testsuite/systemtap.examples/thread-times.stp b/testsuite/systemtap.examples/profiling/thread-times.stp
index 1aeb2037..1aeb2037 100644
--- a/testsuite/systemtap.examples/thread-times.stp
+++ b/testsuite/systemtap.examples/profiling/thread-times.stp
diff --git a/testsuite/systemtap.examples/small_demos/close.stp b/testsuite/systemtap.examples/small_demos/close.stp
deleted file mode 100755
index 7ba2a036..00000000
--- a/testsuite/systemtap.examples/small_demos/close.stp
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env stap
-
-probe syscall.close {
- printf("%s: %s(%s) = ", execname(), name, argstr)
-}
-
-probe syscall.close.return {
- printf("%s\n", returnstr(returnp))
-}
-
-probe end {
- printf("DONE\n")
-}
-
diff --git a/testsuite/systemtap.examples/small_demos/demo_script.txt b/testsuite/systemtap.examples/small_demos/demo_script.txt
deleted file mode 100644
index f3166a49..00000000
--- a/testsuite/systemtap.examples/small_demos/demo_script.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-> cd /root/systemtap
-
-A systemtap script can be as simple as a single line. For example,
-the following script places a probepoint on the kernel sys_read()
-function and prints all callers with the function's arguments.
-
->stap -e 'probe syscall.open {printf("%s: %s\n", execname(), argstr)}'
-
-Most scripts are a bit longer. (show top.stp)
-This script sets a probepoint on all kernel functions beginning with "sys_".
-When the probepoint is hit, it increments an entry in the map
-(or associative array) "syscalls" with the key "probefunc()" which returns
-the name of the function that was triggered. For example, "sys_read".
-
-There is a timer that is triggered every 5000ms or 5 seconds. That timer
-calls the function print_top(). print_top() sorts the syscalls map
-and prints the top 20 entries. Then it clears the map.
-
-> ./top.stp
-
-(after stopping "top" go ahead and enter "./sys.stp". It takes a minute
-to load this script. Diplay the source in another window and talk
-while it is loading.)
-
-The "top" script looked only at the functions called. If we want more
-detail about the functions, we can use systemtap to examine their local
-arguments and variables. However that would be difficult because each
-system call has different parameters. The Syscall Tapset solves
-this problem. To use it, we set probe points using the syntax "syscall.name"
-instead of kernel.function("sys_name"). The Syscall Tapset provides three
-defined variables we can use:
-name - the name of the function
-argstr - on function entry, a formatted string containing the arguments
-retstr - on function exit, the return value and possibly error code
-
-In this example, we filter out programs named "staprun" because this is
-part of the systemtap infrastructure. (It may be filtered out
-automatically in the future.)
-
-The next example shows how you can use systemtap to focus on
-specific programs or pids. (show prof.stp)
-
-Like the "top" example, this script places probes on all kernel
-functions starting with "sys_". Only the probepoint also checks to see
-if the tid/pid matches the one returned by "target()". We'll show how
-the target pid is set later.
-
-Unlike the previous examples, this script sets a probe point on all the
-system call returns. When triggered, this probepoint computes the elapsed
-time since the function entry.
-
-To run this script, we must give it a pid to use for the target, or a
-program to run, in which case target will be its pid.
-
-> ./prof.stp -c "top -n5"
-
---------------------------------
-
-Systemtap can also run in an unsafe mode where you can give
-it arbitrary C code to run at probepoints, or modify kernel variables
-and structures. This is very dangerous so only experts with root access will
-ever be permitted to do this.
-
-(show keyhack.stp)
-
-The next example will modify the local variable "keycode" in the "kdb_keycode"
-function in the kernel driver. We indicate it is a local variable by putting
-a dollar sign before the name.
-
-./keyhack.stp
-
-(prints error message)
-
-To tell systemtap we really want to run this script, we must use the "-g" flag.
-
-./keyhack.stp -g
-
-(type some keys. "m" should display as "b" in every window)
-
-This example is not something you would normally want to do. There are
-far better ways to remap a keyboard. What it demonstartes is that Systemtap
-can modify variables in a running kernel.
-
-(show kmalloc.stp)
-This next script shows the kind of statistics systemtap can collect.
-It collects information about kernel allocations.
-
-> ./kmalloc.stp
-
-Now we can refine this further
-(show kmalloc2.stp)
-
-Remember in some previous examples, we used maps or associative arrays. Maps can contain
-statistics too. So we have enhanced the previous script to collect statistics per
-program name. The output might be large so we'll redirect it to a file.
-
-> ./kmalloc2.stp > out
-
-(runs for 10 seconds)
-
-> more out
-
diff --git a/testsuite/systemtap.examples/small_demos/fileopen.stp b/testsuite/systemtap.examples/small_demos/fileopen.stp
deleted file mode 100755
index c1298f9c..00000000
--- a/testsuite/systemtap.examples/small_demos/fileopen.stp
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /usr/bin/env stap
-
-#
-# fileopen.stp
-#
-# This is based on dtrace script from
-# http://www.gnome.org/~gman/blog/2006/Jan
-#
-# stap fileopen.stp -c "zenity --about"
-# or
-# ./fileopen.stp -c "program or script"
-
-global opens
-
-probe syscall.open {
- if (target() == pid()) opens[filename] ++
-}
-
-probe end {
- foreach([name] in opens+) {
- printf("%-70s%5d\n", name, opens[name])
- }
-}
-
diff --git a/testsuite/systemtap.examples/small_demos/kmalloc.stp b/testsuite/systemtap.examples/small_demos/kmalloc.stp
deleted file mode 100755
index 9157928d..00000000
--- a/testsuite/systemtap.examples/small_demos/kmalloc.stp
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /usr/bin/env stap
-
-# Using statistics to examine kernel memory allocations
-
-global kmalloc
-
-probe kernel.function("__kmalloc") {
- kmalloc <<< $size
-}
-
-# Exit after 10 seconds
-probe timer.ms(10000) { exit () }
-
-probe end {
- printf("Count: %d allocations\n", @count(kmalloc))
- printf("Sum: %d Kbytes\n", @sum(kmalloc)/1000)
- printf("Average: %d bytes\n", @avg(kmalloc))
- printf("Min: %d bytes\n", @min(kmalloc))
- printf("Max: %d bytes\n", @max(kmalloc))
- print("\nAllocations by size in bytes\n")
- print(@hist_log(kmalloc))
-}
diff --git a/testsuite/systemtap.examples/small_demos/kmalloc2.stp b/testsuite/systemtap.examples/small_demos/kmalloc2.stp
deleted file mode 100755
index 2622dd2f..00000000
--- a/testsuite/systemtap.examples/small_demos/kmalloc2.stp
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /usr/bin/env stap
-
-# Using statistics and maps to examine kernel memory allocations
-
-global kmalloc
-
-probe kernel.function("__kmalloc") {
- kmalloc[execname()] <<< $size
-}
-
-# Exit after 10 seconds
-probe timer.ms(10000) { exit () }
-
-probe end {
- foreach ([name] in kmalloc) {
- printf("Allocations for %s\n", name)
- printf("Count: %d allocations\n", @count(kmalloc[name]))
- printf("Sum: %d Kbytes\n", @sum(kmalloc[name])/1000)
- printf("Average: %d bytes\n", @avg(kmalloc[name]))
- printf("Min: %d bytes\n", @min(kmalloc[name]))
- printf("Max: %d bytes\n", @max(kmalloc[name]))
- print("\nAllocations by size in bytes\n")
- print(@hist_log(kmalloc[name]))
- printf("-------------------------------------------------------\n\n");
- }
-}
diff --git a/testsuite/systemtap.examples/small_demos/prof.stp b/testsuite/systemtap.examples/small_demos/prof.stp
deleted file mode 100755
index 389f743a..00000000
--- a/testsuite/systemtap.examples/small_demos/prof.stp
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env stap
-
-# This is an example of profiling a specific command or pid.
-# It works by recording the time when a system call is entered
-# exited.
-
-# Usage: prof.stp -c "top -n5"
-# Will start up "top" and after 5 iterations, will exit.
-#
-# Usage: prof.stp -x 3323
-# Will profile pid 3323 until it ^c is hit.
-#
-
-probe kernel.function("sys_*").call {
- if (target() == tid())
- calltime[tid()] = gettimeofday_us()
-}
-
-probe kernel.function("sys_*").return {
- if (target() != tid()) next
- now = gettimeofday_us()
- c = calltime[tid()]
- if (!c) next
- ttime[probefunc()] <<< now - c
- delete calltime[tid()]
-}
-
-probe end {
- printf("\n")
- foreach (x in ttime)
- printf("%-20s\tcalls:%6d\tavg time (us):%5d\ttotal(us):%7d\n",
- x, @count(ttime[x]), @avg(ttime[x]), @sum(ttime[x]))
-}
-
-global calltime, ttime
diff --git a/testsuite/systemtap.examples/small_demos/rwtiming.stp b/testsuite/systemtap.examples/small_demos/rwtiming.stp
deleted file mode 100755
index d570c581..00000000
--- a/testsuite/systemtap.examples/small_demos/rwtiming.stp
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /usr/bin/env stap
-# rwtiming.stp
-#
-# This is a simple example to track the amount of time
-# spent doing reads and writes for the various programs running on the
-# system.
-
-probe begin { log("starting probe") }
-
-global names, opens, reads, writes
-global entry_opens, entry_reads, entry_writes
-global time_opens, time_reads, time_writes
-
-probe kernel.function("sys_open") {
- t=gettimeofday_us(); p=pid(); e=execname();
- names[e]=1
- opens[e] ++ # plain integer
- entry_opens[p] = t;
-}
-
-probe kernel.function("sys_open").return {
- t=gettimeofday_us(); p=pid(); e=execname();
- time_opens[e] <<< t - entry_opens[p];
-}
-
-probe kernel.function("sys_read") {
- t= gettimeofday_us(); p =pid(); e=execname();
- names[e]=1
- reads[e] <<< $count # statistics
- entry_reads[p] = t;
-}
-
-probe kernel.function("sys_read").return {
- t=gettimeofday_us(); p=pid(); e=execname();
- time_reads[e] <<< t - entry_reads[p];
-}
-
-probe kernel.function("sys_write") {
- t=gettimeofday_us(); p=pid(); e=execname();
- names[e]=1
- writes[e] <<< $count # statistics
- entry_writes[p] = t;
-}
-
-probe kernel.function("sys_write").return {
- t = gettimeofday_us(); p = pid(); e=execname();
- time_writes[e] <<< t - entry_writes[p];
-}
-
-probe end {
- foreach(name+ in names) { # sort by names
- printf ("process: %s\n", name)
- if (opens[name]) {
- printf ("opens n=%d\n", opens[name])
- print (@hist_log(time_opens[name]))
- }
- if (@count(reads[name])) {
- printf ("reads n=%d, sum=%d, avg=%d\n",
- @count(reads[name]), # extracting stat results
- @sum(reads[name]),
- @avg(reads[name]))
- print ("read timing distribution\n")
- print (@hist_log(time_reads[name]))
- }
- if (@count(writes[name])) {
- printf ("writes n=%d, sum=%d, avg=%d\n",
- @count(writes[name]), # extracting stat results
- @sum(writes[name]),
- @avg(writes[name]))
- print ("write timing distribution\n")
- print (@hist_log(time_writes[name]))
- }
- }
-}
diff --git a/testsuite/systemtap.examples/small_demos/sched_snoop.stp b/testsuite/systemtap.examples/small_demos/sched_snoop.stp
deleted file mode 100755
index 623643dd..00000000
--- a/testsuite/systemtap.examples/small_demos/sched_snoop.stp
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env stap
-
-global start_ts
-
-probe begin {
- start_ts = gettimeofday_us()
- printf("%12s %3s %5s %5s %-16s ACTION\n",
- "TIMESTAMP", "CPU", "PID", "TID", "EXECNAME")
-}
-
-function report(action:string) {
- printf("%3d %12d %5d %5d %-16s %s\n",
- gettimeofday_us() - start_ts, cpu(),
- pid(), tid(), execname(), action)
-}
-
-probe scheduler.cpu_off {
- report(sprintf("cpu_off%s", idle? " [idle]" : ""))
-}
-
-probe scheduler.cpu_on {
- report(sprintf("cpu_on%s", idle? " [idle]" : ""))
-}
-
-probe scheduler.tick {
- report(sprintf("tick%s", idle? " [idle]" : ""))
-}
-
-probe scheduler.migrate ? {
- report("migrate")
-}
-
-probe scheduler.balance ? {
- report("balance")
-}
diff --git a/testsuite/systemtap.examples/small_demos/sys.stp b/testsuite/systemtap.examples/small_demos/sys.stp
deleted file mode 100755
index 2df20bc3..00000000
--- a/testsuite/systemtap.examples/small_demos/sys.stp
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env stap
-
-# print all system calls on the system
-
-probe syscall.* {
- if (execname() != "staprun")
- printf("%s: %s (%s) = ", execname(), name, argstr)
-}
-
-probe syscall.*.return {
- if (execname() != "staprun")
- printf("%s\n", retstr)
-}
-
-probe end {
- printf("\n")
-}
diff --git a/testsuite/systemtap.examples/small_demos/top.stp b/testsuite/systemtap.examples/small_demos/top.stp
deleted file mode 100755
index b46b9940..00000000
--- a/testsuite/systemtap.examples/small_demos/top.stp
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env stap
-#
-# This script continuously lists the top 20 systemcalls on the system
-#
-
-global syscalls
-
-function print_top () {
- printf ("SYSCALL\t\t\t\tCOUNT\n")
- foreach ([name] in syscalls- limit 20)
- printf("%-20s\t\t%5d\n",name, syscalls[name])
- printf("--------------------------------------\n")
- delete syscalls
-}
-
-probe syscall.* {
- syscalls[probefunc()]++
-}
-
-# print top syscalls every 5 seconds
-probe timer.ms(5000) {
- print_top ()
-}
-
diff --git a/testsuite/systemtap.examples/subsystem-index.html b/testsuite/systemtap.examples/subsystem-index.html
new file mode 100644
index 00000000..c868d340
--- /dev/null
+++ b/testsuite/systemtap.examples/subsystem-index.html
@@ -0,0 +1,186 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+ <title>SystemTap Examples</title>
+ <link rel="stylesheet" href="html/systemtap.css" type="text/css">
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+</head>
+
+<body>
+ <table cellspacing="2" cellpadding="2" border="0" width="100%">
+ <tr>
+ <td valign="bottom" height="80"><img src="html/systemtaplogo.png"
+ alt="SystemTap logo" width="165" height="25"></td>
+ <td valign="bottom" class="topnavright" align="right">
+ <a href="http://sourceware.org/systemtap/">SystemTap</a>&nbsp;|&nbsp;
+ </td>
+ </tr>
+ </table>
+
+ <div class="mainbackground">
+ <div class="maintextregion">
+ <img src="html/systemtapcorner.gif">
+ <table cellspacing="2" cellpadding="4" border="0" width="99%"
+ style="margin-top:17;">
+ <tr>
+ <td width="200">&nbsp;</td>
+ <td valign="bottom"><h1>Examples</h1></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td valign="top">
+
+ <h2>Example Indexes</h2>
+ <ul>
+ <li><a href="index.html">All Examples</a></li>
+ <li><a href="subsystem-index.html">By Subsystem</a></li>
+ <li><a href="keyword-index.html">By Keyword</a></li>
+ </ul>
+
+<h2>Examples by Subsystem</h2>
+<h3>CPU</h3>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+</ul>
+<h3>DISK</h3>
+<ul>
+<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
+output: plot data, exits: user-controlled, status: production<br>
+subsystem: disk cpu, keywords: disk cpu use graph<br>
+<p>The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE.</p></li>
+<li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: disk, keywords: disk<br>
+<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
+</ul>
+<h3>IO</h3>
+<ul>
+<li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br>
+output: sorted on-exit, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io backtrace<br>
+<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/iotop.stp">io/iotop.stp</a> - Periodically Print I/O Activity by Process Name<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order.</p></li>
+<li><a href="io/traceio.stp">io/traceio.stp</a> - Track Cumulative I/O Activity by Process Name<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Every second print out the top ten executables sorted in descending order based on cumulative I/O traffic observed.</p></li>
+<li><a href="io/traceio2.stp">io/traceio2.stp</a> - Watch I/O Activity on a Particular Device<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: io, keywords: io<br>
+<p>Print out the executable name and process number as reads and writes to the specified device occur.</p></li>
+</ul>
+<h3>KERNEL</h3>
+<ul>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: trace callgraph<br>
+<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br>
+output: sorted-list, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling<br>
+<p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li>
+<li><a href="profiling/functioncallcount.stp">profiling/functioncallcount.stp</a> - Count Times Functions Called<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling functions<br>
+<p>The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function.</p></li>
+<li><a href="profiling/thread-times.stp">profiling/thread-times.stp</a> - Profile kernel functions<br>
+output: sorted-list, exits: user-controlled, status: production<br>
+subsystem: kernel, keywords: profiling<br>
+<p>The thread-times.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top twenty processes with samples broken down into percentage total time spent in user-space and kernel-space.</p></li>
+</ul>
+<h3>LOCKING</h3>
+<ul>
+<li><a href="process/futexes.stp">process/futexes.stp</a> - System-Wide Futex Contention<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: locking, keywords: syscall locking futex<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>
+</ul>
+<h3>NETWORK</h3>
+<ul>
+<li><a href="network/nettop.stp">network/nettop.stp</a> - Periodic Listing of Processes Using Network Interfaces<br>
+output: timed, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network traffic per-process<br>
+<p>Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval.</p></li>
+<li><a href="network/socket-trace.stp">network/socket-trace.stp</a> - Trace Functions called in Network Socket Code<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: network, keywords: network socket<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>
+</ul>
+<h3>NONE</h3>
+<ul>
+<li><a href="general/helloworld.stp">general/helloworld.stp</a> - SystemTap "Hello World" Program<br>
+output: text, exits: fixed, status: production<br>
+subsystem: none, keywords: simple<br>
+<p>A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.</p></li>
+</ul>
+<h3>SCHEDULER</h3>
+<ul>
+<li><a href="process/sleepingBeauties.stp">process/sleepingBeauties.stp</a> - Generating Backtraces of Threads Waiting for IO Operations<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: scheduler, keywords: io scheduler<br>
+<p>The script monitor time threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms wall-clock time waiting, information is printed out describing the thread number and executable name. When slow the wait_for_completion function complete, backtraces for the long duration calls are printed out.</p></li>
+</ul>
+<h3>SIGNALS</h3>
+<ul>
+<li><a href="process/sig_by_pid.stp">process/sig_by_pid.stp</a> - Signal Counts by Process ID<br>
+output: sorted-list on-exit, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<br>
+<p>Print signal counts by process ID in descending order.</p></li>
+<li><a href="process/sig_by_proc.stp">process/sig_by_proc.stp</a> - Signal Counts by Process Name<br>
+output: sorted-list on-exit, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<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>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: signals, keywords: signals<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 desination executable and process ID, the executable name user ID that sent the signal.</p></li>
+<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
+output: trace, exits: user-controlled, status: experimental<br>
+subsystem: signals, keywords: signals<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>
+</ul>
+<h3>SYSCALL</h3>
+<ul>
+<li><a href="io/iotime.stp">io/iotime.stp</a> - Trace Time Spent in Read and Write for Files <br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall read write time io<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 parenthesese. 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/sleeptime.stp">process/sleeptime.stp</a> - Trace Time Spent in nanosleep Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall sleep<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 paretheses, the "nanosleep:" key, and the duration of the sleep in microseconds.</p></li>
+<li><a href="process/syscalls_by_pid.stp">process/syscalls_by_pid.stp</a> - System-Wide Count of Syscalls by PID<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall<br>
+<p>The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each PID ordered from greatest to least number of syscalls.</p></li>
+<li><a href="process/syscalls_by_proc.stp">process/syscalls_by_proc.stp</a> - System-Wide Count of Syscalls by Executable<br>
+output: sorted-list on-exit, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall<br>
+<p>The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each executable ordered from greates to least number of syscalls.</p></li>
+<li><a href="process/wait4time.stp">process/wait4time.stp</a> - Trace Time Spent in wait4 Syscalls<br>
+output: trace, exits: user-controlled, status: production<br>
+subsystem: syscall, keywords: syscall wait4<br>
+<p>The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1".</p></li>
+</ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <table cellspacing="2" cellpadding="2" border="0" width="100%">
+ <tr>
+ <td align="center" class="footer"><a href=
+ "http://sourceware.org/systemtap">SystemTap</a></td>
+ </tr>
+ </table>
+</body>
+</html>
diff --git a/testsuite/systemtap.examples/subsystem-index.txt b/testsuite/systemtap.examples/subsystem-index.txt
new file mode 100644
index 00000000..9f83a544
--- /dev/null
+++ b/testsuite/systemtap.examples/subsystem-index.txt
@@ -0,0 +1,267 @@
+SYSTEMTAP EXAMPLES INDEX BY SUBSYSTEM
+(see also index.txt, keyword-index.txt)
+
+= CPU =
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+= DISK =
+
+general/graphs.stp - Graphing Disk and CPU Utilization
+output: plot data, exits: user-controlled, status: production
+subsystem: disk cpu, keywords: disk cpu use graph
+
+ The script tracks the disk and CPU utilization. The resulting output
+ of the script can be piped into gnuplot to generate a graph of disk
+ and CPU USE.
+
+
+io/disktop.stp - Summarize Disk Read/Write Traffic
+output: timed, exits: user-controlled, status: production
+subsystem: disk, keywords: disk
+
+ Get the status of reading/writing disk every 5 seconds, output top
+ ten entries during that period.
+
+
+= IO =
+
+io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
+output: sorted on-exit, exits: user-controlled, status: production
+subsystem: io, keywords: io backtrace
+
+ 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.
+
+
+io/iotop.stp - Periodically Print I/O Activity by Process Name
+output: timed, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Every five seconds print out the top ten executables generating I/O
+ traffic during that interval sorted in descending order.
+
+
+io/traceio.stp - Track Cumulative I/O Activity by Process Name
+output: timed, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Every second print out the top ten executables sorted in descending
+ order based on cumulative I/O traffic observed.
+
+
+io/traceio2.stp - Watch I/O Activity on a Particular Device
+output: trace, exits: user-controlled, status: production
+subsystem: io, keywords: io
+
+ Print out the executable name and process number as reads and writes
+ to the specified device occur.
+
+
+= KERNEL =
+
+general/para-callgraph.stp - Tracing Calls for Sections of Code
+output: trace, exits: user-controlled, status: production
+subsystem: kernel, keywords: trace callgraph
+
+ The script takes two arguments: the first argument is the function to
+ starts/stops the per thread call graph traces and the second argument
+ is the list of functions to generate trace information on. The script
+ prints out a timestap for the thread, the function name and pid,
+ followed by entry or exit symboly and function name.
+
+
+process/pf2.stp - Profile kernel functions
+output: sorted-list, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling
+
+ The pf2.stp script sets up time-based sampling. Every five seconds it
+ prints out a sorted list with the top ten kernel functions with
+ samples.
+
+
+profiling/functioncallcount.stp - Count Times Functions Called
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling functions
+
+ The functioncallcount.stp script takes one argument, a list of
+ functions to probe. The script will run and count the number of times
+ that each of the functions on the list is called. On exit the script
+ will print a sorted list from most frequently to least frequently
+ called function.
+
+
+profiling/thread-times.stp - Profile kernel functions
+output: sorted-list, exits: user-controlled, status: production
+subsystem: kernel, keywords: profiling
+
+ The thread-times.stp script sets up time-based sampling. Every five
+ seconds it prints out a sorted list with the top twenty processes
+ with samples broken down into percentage total time spent in
+ user-space and kernel-space.
+
+
+= LOCKING =
+
+process/futexes.stp - System-Wide Futex Contention
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: locking, keywords: syscall locking futex
+
+ 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.
+
+
+= NETWORK =
+
+network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
+output: timed, exits: user-controlled, status: production
+subsystem: network, keywords: network traffic per-process
+
+ Every five seconds the nettop.stp script prints out a list of
+ processed (PID and command) with the number of packets sent/received
+ and the amount of data sent/received by the process during that
+ interval.
+
+
+network/socket-trace.stp - Trace Functions called in Network Socket Code
+output: trace, exits: user-controlled, status: production
+subsystem: network, 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.
+
+
+= NONE =
+
+general/helloworld.stp - SystemTap "Hello World" Program
+output: text, exits: fixed, status: production
+subsystem: none, keywords: simple
+
+ A basic "Hello World" program implemented in SystemTap script. It
+ prints out "hello world" message and then immediately exits.
+
+
+= SCHEDULER =
+
+process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
+output: trace, exits: user-controlled, status: production
+subsystem: scheduler, keywords: io scheduler
+
+ The script monitor time threads spend waiting for IO operations (in
+ "D" state) in the wait_for_completion function. If a thread spends
+ over 10ms wall-clock time waiting, information is printed out
+ describing the thread number and executable name. When slow the
+ wait_for_completion function complete, backtraces for the long
+ duration calls are printed out.
+
+
+= SIGNALS =
+
+process/sig_by_pid.stp - Signal Counts by Process ID
+output: sorted-list on-exit, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ Print signal counts by process ID in descending order.
+
+
+process/sig_by_proc.stp - Signal Counts by Process Name
+output: sorted-list on-exit, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ Print signal counts by process name in descending order.
+
+
+process/sigkill.stp - Track SIGKILL Signals
+output: trace, exits: user-controlled, status: production
+subsystem: signals, 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
+ desination executable and process ID, the executable name user ID
+ that sent the signal.
+
+
+process/syscalls_by_pid.stp - System-Wide Count of Syscalls by PID
+output: trace, exits: user-controlled, status: experimental
+subsystem: signals, keywords: signals
+
+ 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.
+
+
+= SYSCALL =
+
+io/iotime.stp - Trace Time Spent in Read and Write for Files
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, 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
+ 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
+ parenthesese. 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.
+
+
+process/sleeptime.stp - Trace Time Spent in nanosleep Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall sleep
+
+ 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
+ paretheses, the "nanosleep:" key, and the duration of the sleep in
+ microseconds.
+
+
+process/syscalls_by_pid.stp - System-Wide Count of Syscalls by PID
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall
+
+ The script watches all syscall on the system. On exit the script
+ prints a list showing the number of systemcalls executed by each PID
+ ordered from greatest to least number of syscalls.
+
+
+process/syscalls_by_proc.stp - System-Wide Count of Syscalls by Executable
+output: sorted-list on-exit, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall
+
+ The script watches all syscall on the system. On exit the script
+ prints a list showing the number of systemcalls executed by each
+ executable ordered from greates to least number of syscalls.
+
+
+process/wait4time.stp - Trace Time Spent in wait4 Syscalls
+output: trace, exits: user-controlled, status: production
+subsystem: syscall, keywords: syscall wait4
+
+ The script watches each wait4 syscall on the system. At the end of
+ each wait4 syscall the script prints out a line with a timestamp in
+ microseconds, the pid, the executable name in paretheses, the
+ "wait4:" key, the duration of the wait and the PID that the wait4 was
+ waiting for. If the waited for PID is not specified , it is "-1".
+
+