From 6bba5be0972dae052f8ad7623e21ecc0425350d0 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 8 Aug 2008 15:59:54 +0200 Subject: [PATCH] Add index of subsystem and keywords at top of HTML indexes. --- testsuite/systemtap.examples/ChangeLog | 7 +++ .../systemtap.examples/examples-index-gen.pl | 22 +++++++- .../systemtap.examples/keyword-index.html | 51 ++++++++++--------- .../systemtap.examples/subsystem-index.html | 21 ++++---- 4 files changed, 64 insertions(+), 37 deletions(-) diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog index 8f425995c..a7fcd0694 100644 --- a/testsuite/systemtap.examples/ChangeLog +++ b/testsuite/systemtap.examples/ChangeLog @@ -1,3 +1,10 @@ +2008-08-08 Mark Wielaard + + * examples-index-gen.pl: Add index of subsystem and keywords at top of + HTML indexes. + * *index.html: Regenerated. + * *index.txt: Likewise. + 2008-08-08 Mark Wielaard * examples-index-gen.pl (add_meta_txt): Don't output output, exits, diff --git a/testsuite/systemtap.examples/examples-index-gen.pl b/testsuite/systemtap.examples/examples-index-gen.pl index e105f3fc6..9bdc11742 100644 --- a/testsuite/systemtap.examples/examples-index-gen.pl +++ b/testsuite/systemtap.examples/examples-index-gen.pl @@ -155,9 +155,18 @@ print "Creating $subhtml...\n"; print SUBHTML $HTMLHEADER; print SUBHTML "

Examples by Subsystem

\n"; +# On top link list +print SUBHTML "

"; +foreach $subsystem (sort keys %subsystems) { + print SUBHTML '' + . (uc $subsystem) . " "; +} +print SUBHTML "

\n"; + foreach $subsystem (sort keys %subsystems) { print SUBINDEX "= " . (uc $subsystem) . " =\n\n"; - print SUBHTML "

" . (uc $subsystem) . "

\n"; + print SUBHTML "

" . '' + . (uc $subsystem) . "

\n"; print SUBHTML "
    \n"; foreach $meta (sort @{$subsystems{$subsystem}}) { @@ -187,9 +196,18 @@ print "Creating $keyhtml...\n"; print KEYHTML $HTMLHEADER; print KEYHTML "

    Examples by Keyword

    \n"; +# On top link list +print KEYHTML "

    "; +foreach $keyword (sort keys %keywords) { + print KEYHTML '' + . (uc $keyword) . " "; +} +print KEYHTML "

    \n"; + foreach $keyword (sort keys %keywords) { print KEYINDEX "= " . (uc $keyword) . " =\n\n"; - print KEYHTML "

    " . (uc $keyword) . "

    \n"; + print KEYHTML "

    " . '' + . (uc $keyword) . "

    \n"; print KEYHTML "
      \n"; foreach $meta (sort @{$keywords{$keyword}}) { diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index c48465cc3..5d1c79e03 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -40,25 +40,26 @@

    Examples by Keyword

    -

    BACKTRACE

    +

    BACKTRACE CALLGRAPH CPU DISK FUNCTIONS FUTEX GRAPH IO LOCKING NETWORK PER-PROCESS PROFILING READ SCHEDULER SIGNALS SIMPLE SLEEP SOCKET SYSCALL TIME TRACE TRAFFIC USE WAIT4 WRITE

    +

    BACKTRACE

    • io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
      subsystems: 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

    +

    CALLGRAPH

    • general/para-callgraph.stp - Tracing Calls for Sections of Code
      subsystems: 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

    +

    CPU

    • general/graphs.stp - Graphing Disk and CPU Utilization
      subsystems: 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

    +

    DISK

    • general/graphs.stp - Graphing Disk and CPU Utilization
      subsystems: disk cpu, keywords: disk cpu use graph
      @@ -67,25 +68,25 @@ subsystems: disk cpu, keywords: disk cpu use graph
      subsystems: disk, keywords: disk

      Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.

    -

    FUNCTIONS

    +

    FUNCTIONS

    • profiling/functioncallcount.stp - Count Times Functions Called
      subsystems: 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

    +

    FUTEX

    • process/futexes.stp - System-Wide Futex Contention
      subsystems: 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

    +

    GRAPH

    • general/graphs.stp - Graphing Disk and CPU Utilization
      subsystems: 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/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
      subsystems: io, keywords: io backtrace
      @@ -106,13 +107,13 @@ subsystems: io, keywords: io
      subsystems: 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

    +

    LOCKING

    • process/futexes.stp - System-Wide Futex Contention
      subsystems: 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

    • network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
      subsystems: network, keywords: network traffic per-process
      @@ -121,13 +122,13 @@ subsystems: network, keywords: network traffic per-process
      subsystems: 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

    +

    PER-PROCESS

    • network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
      subsystems: 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

    +

    PROFILING

    • process/pf2.stp - Profile kernel functions
      subsystems: kernel, keywords: profiling
      @@ -139,19 +140,19 @@ subsystems: kernel, keywords: profiling functions
      subsystems: 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

    +

    READ

    • io/iotime.stp - Trace Time Spent in Read and Write for Files
      subsystems: 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

    +

    SCHEDULER

    • process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
      subsystems: 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

    +

    SIGNALS

    • process/sig_by_pid.stp - Signal Counts by Process ID
      subsystems: signals, keywords: signals
      @@ -166,25 +167,25 @@ subsystems: signals, keywords: signals
      subsystems: 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

    +

    SIMPLE

    • general/helloworld.stp - SystemTap "Hello World" Program
      subsystems: none, keywords: simple

      A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.

    -

    SLEEP

    +

    SLEEP

    • process/sleeptime.stp - Trace Time Spent in nanosleep Syscalls
      subsystems: 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

    +

    SOCKET

    • network/socket-trace.stp - Trace Functions called in Network Socket Code
      subsystems: 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

    +

    SYSCALL

    • io/iotime.stp - Trace Time Spent in Read and Write for Files
      subsystems: syscall, keywords: syscall read write time io
      @@ -205,37 +206,37 @@ subsystems: syscall, keywords: syscall
      subsystems: 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

    +

    TIME

    • io/iotime.stp - Trace Time Spent in Read and Write for Files
      subsystems: 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

    +

    TRACE

    • general/para-callgraph.stp - Tracing Calls for Sections of Code
      subsystems: 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

    +

    TRAFFIC

    • network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
      subsystems: 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

    +

    USE

    • general/graphs.stp - Graphing Disk and CPU Utilization
      subsystems: 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

    +

    WAIT4

    • process/wait4time.stp - Trace Time Spent in wait4 Syscalls
      subsystems: 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

    +

    WRITE

    • io/iotime.stp - Trace Time Spent in Read and Write for Files
      subsystems: syscall, keywords: syscall read write time io
      diff --git a/testsuite/systemtap.examples/subsystem-index.html b/testsuite/systemtap.examples/subsystem-index.html index f2767f31e..9bdec0c81 100644 --- a/testsuite/systemtap.examples/subsystem-index.html +++ b/testsuite/systemtap.examples/subsystem-index.html @@ -40,13 +40,14 @@

    Examples by Subsystem

    -

    CPU

    +

    CPU DISK IO KERNEL LOCKING NETWORK NONE SCHEDULER SIGNALS SYSCALL

    +

    CPU

    • general/graphs.stp - Graphing Disk and CPU Utilization
      subsystems: 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

    +

    DISK

    • general/graphs.stp - Graphing Disk and CPU Utilization
      subsystems: disk cpu, keywords: disk cpu use graph
      @@ -55,7 +56,7 @@ subsystems: disk cpu, keywords: disk cpu use graph
      subsystems: disk, keywords: disk

      Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.

    -

    IO

    +

    IO

    • io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
      subsystems: io, keywords: io backtrace
      @@ -70,7 +71,7 @@ subsystems: io, keywords: io
      subsystems: io, keywords: io

      Print out the executable name and process number as reads and writes to the specified device occur.

    -

    KERNEL

    +

    KERNEL

    • general/para-callgraph.stp - Tracing Calls for Sections of Code
      subsystems: kernel, keywords: trace callgraph
      @@ -85,13 +86,13 @@ subsystems: kernel, keywords: profiling functions
      subsystems: 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

    +

    LOCKING

    • process/futexes.stp - System-Wide Futex Contention
      subsystems: 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

    • network/nettop.stp - Periodic Listing of Processes Using Network Interfaces
      subsystems: network, keywords: network traffic per-process
      @@ -100,19 +101,19 @@ subsystems: network, keywords: network traffic per-process
      subsystems: 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

    +

    NONE

    • general/helloworld.stp - SystemTap "Hello World" Program
      subsystems: none, keywords: simple

      A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.

    -

    SCHEDULER

    +

    SCHEDULER

    • process/sleepingBeauties.stp - Generating Backtraces of Threads Waiting for IO Operations
      subsystems: 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

    +

    SIGNALS

    • process/sig_by_pid.stp - Signal Counts by Process ID
      subsystems: signals, keywords: signals
      @@ -127,7 +128,7 @@ subsystems: signals, keywords: signals
      subsystems: 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

    +

    SYSCALL

    • io/iotime.stp - Trace Time Spent in Read and Write for Files
      subsystems: syscall, keywords: syscall read write time io
      -- 2.43.5