diff options
author | William Cohen <wcohen@redhat.com> | 2009-03-17 16:45:30 -0400 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-03-17 16:45:30 -0400 |
commit | 67f8611b9ed9e40a7be946601293ac5b42c52686 (patch) | |
tree | 578b39c3d6df730e4c8f89e5d10a2be8b507a58e | |
parent | 67aada05e69728327de1c7b8aeeaa0193668bed8 (diff) | |
download | systemtap-steved-67f8611b9ed9e40a7be946601293ac5b42c52686.tar.gz systemtap-steved-67f8611b9ed9e40a7be946601293ac5b42c52686.tar.xz systemtap-steved-67f8611b9ed9e40a7be946601293ac5b42c52686.zip |
Replace systemtap.samples/ioblocktest.stp with ioblktime.stp.
-rw-r--r-- | testsuite/systemtap.examples/index.html | 3 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.txt | 13 | ||||
-rw-r--r-- | testsuite/systemtap.examples/io/ioblktime.meta | 13 | ||||
-rwxr-xr-x | testsuite/systemtap.examples/io/ioblktime.stp | 29 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.html | 3 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.txt | 13 | ||||
-rw-r--r-- | testsuite/systemtap.samples/ioblocktest.exp | 11 | ||||
-rw-r--r-- | testsuite/systemtap.samples/ioblocktest.stp | 12 |
8 files changed, 74 insertions, 23 deletions
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index 7b76baa1..0f4b2572 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -58,6 +58,9 @@ keywords: <a href="keyword-index.html#DISK">DISK</a> <br> <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <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/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br> +keywords: <a href="keyword-index.html#IO">IO</a> <br> +<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script compute the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li> <li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt index fdcd3b31..e31baf4f 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -52,6 +52,19 @@ keywords: io backtrace list from most common to least common backtrace. +io/ioblktime.stp - Average Time Block IO Requests Spend in Queue +keywords: io + + The ioblktime.stp script tracks the amount of time that each block IO + requests spend waiting for completion. The script compute the average + time waiting time for block IO per device and prints list every 10 + seconds. In some cases there can be too many oustanding block IO + operations and the script may exceed the default number of + MAXMAPENTRIES allowed. In this case the allowed number can be + increased with "-DMAXMAPENTRIES=10000" option on the stap command + line. + + io/iostats.stp - List Executables Reading and Writing the Most Data keywords: io profiling diff --git a/testsuite/systemtap.examples/io/ioblktime.meta b/testsuite/systemtap.examples/io/ioblktime.meta new file mode 100644 index 00000000..18a8b168 --- /dev/null +++ b/testsuite/systemtap.examples/io/ioblktime.meta @@ -0,0 +1,13 @@ +title: Average Time Block IO Requests Spend in Queue +name: ioblktime.stp +version: 1.0 +author: William Cohen +keywords: io +subsystem: kernel +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line. +test_check: stap -p4 ioblktime.stp +test_installcheck: stap ioblktime.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/io/ioblktime.stp b/testsuite/systemtap.examples/io/ioblktime.stp new file mode 100755 index 00000000..5ff59cf7 --- /dev/null +++ b/testsuite/systemtap.examples/io/ioblktime.stp @@ -0,0 +1,29 @@ +#! /usr/bin/env stap + +global req_time, etimes + +probe ioblock.request +{ + req_time[$bio] = gettimeofday_us() +} + +probe ioblock.end +{ + t = gettimeofday_us() + s = req_time[$bio] + delete req_time[$bio] + if (s) { + etimes[devname, bio_rw_str(rw)] <<< t - s + } +} + +probe timer.s(10), end { + printf("\033[2J\033[1;1H") /* clear screen */ + printf("%10s %3s %10s %10s %10s\n", + "device", "rw", "total (us)", "count", "avg (us)") + foreach ([dev,rw] in etimes - limit 20) { + printf("%10s %3s %10d %10d %10d\n", dev, rw, + @sum(etimes[dev,rw]), @count(etimes[dev,rw]), @avg(etimes[dev,rw])) + } + delete etimes +} diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index b3ea0943..75768709 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -102,6 +102,9 @@ keywords: <a href="keyword-index.html#INTERRUPT">INTERRUPT</a> <a href="keyword- <li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <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/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br> +keywords: <a href="keyword-index.html#IO">IO</a> <br> +<p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script compute the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li> <li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index 5f382e75..d3a9617f 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -125,6 +125,19 @@ keywords: io backtrace list from most common to least common backtrace. +io/ioblktime.stp - Average Time Block IO Requests Spend in Queue +keywords: io + + The ioblktime.stp script tracks the amount of time that each block IO + requests spend waiting for completion. The script compute the average + time waiting time for block IO per device and prints list every 10 + seconds. In some cases there can be too many oustanding block IO + operations and the script may exceed the default number of + MAXMAPENTRIES allowed. In this case the allowed number can be + increased with "-DMAXMAPENTRIES=10000" option on the stap command + line. + + io/iostats.stp - List Executables Reading and Writing the Most Data keywords: io profiling diff --git a/testsuite/systemtap.samples/ioblocktest.exp b/testsuite/systemtap.samples/ioblocktest.exp deleted file mode 100644 index b5ab54c7..00000000 --- a/testsuite/systemtap.samples/ioblocktest.exp +++ /dev/null @@ -1,11 +0,0 @@ -# Test the functionality of the various ioblock probes. - -set test "ioblocktest" - -proc sleep_ten_secs {} { - after 10000; - return 0; -} - -set output_string "ioblock: \\S+\t\\d+\t\[RW]\t\[01]\r\n" -stap_run $srcdir/$subdir/$test.stp sleep_ten_secs $output_string diff --git a/testsuite/systemtap.samples/ioblocktest.stp b/testsuite/systemtap.samples/ioblocktest.stp deleted file mode 100644 index f8a1c568..00000000 --- a/testsuite/systemtap.samples/ioblocktest.stp +++ /dev/null @@ -1,12 +0,0 @@ -#! stap -global teststr -probe begin { println("systemtap starting probe") } - -probe ioblock.request, ioblock.end { - teststr = sprintf("ioblock: %s\t%d\t%s\t%d\n", devname, sector, - bio_rw_str(rw), bio_rw_num(rw)) -} -probe end { - println("systemtap ending probe") - printf("%s", teststr) -} |