diff options
-rw-r--r-- | testsuite/systemtap.examples/index.html | 9 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.txt | 31 | ||||
-rw-r--r-- | testsuite/systemtap.examples/io/iodevstats.meta | 13 | ||||
-rwxr-xr-x | testsuite/systemtap.examples/io/iodevstats.stp | 39 | ||||
-rw-r--r-- | testsuite/systemtap.examples/io/nfs_func_users.meta | 13 | ||||
-rwxr-xr-x | testsuite/systemtap.examples/io/nfs_func_users.stp | 18 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.html | 15 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.txt | 53 |
8 files changed, 191 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index 294c6991..eaf21135 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -73,6 +73,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC <li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li> +<li><a href="io/iodevstats.stp">io/iodevstats.stp</a> - List Executables Reading and Writing the Most Data by Device<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The iodevstats.stp script measures the amount of data successfully read and written by all the executables for each io device on the system. The output is sorted from greatest sum of bytes read and written to a device by an executable to the least. The output contains device major/minor number, the count of operations (reads and writes), the totals and averages for the number of bytes read and written.</p></li> <li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> <p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> @@ -88,6 +91,12 @@ keywords: <a href="keyword-index.html#IO">IO</a> <br> <li><a href="io/mbrwatch.stp">io/mbrwatch.stp</a> - Monitor read/write of MBR (boot sector) area of block devices<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#MONITORING">MONITORING</a> <br> <p> The mbrwatch.stp script reports any attempted reads/writes of the first few sectors of a raw block device.</p></li> +<li><a href="io/nfs_func_log.stp">io/nfs_func_log.stp</a> - Print Log of NFS Functions Used<br> +keywords: <a href="keyword-index.html#IO">IO</a> <br> +<p>The nfs_func_log.stp script logs the uses of NFS functions in the kernel. The output is a trace. Each line contains the time stamp, the process name, and the process number followed by the function name.</p></li> +<li><a href="io/nfs_func_users.stp">io/nfs_func_users.stp</a> - Tally the Number of NFS Functions Used by Each Process<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p>The nfs_func_users.stp script counts the uses of NFS functions in the kernel on a per process bases. The output is sorted from the process with the greatest number of NFS functions called to the least. The output contains the executable name, the process number, and the total number of NFS functions called by the process.</p></li> <li><a href="io/traceio.stp">io/traceio.stp</a> - Track Cumulative I/O Activity by Process Name<br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>Every second print out the top ten executables sorted in descending order based on cumulative I/O traffic observed.</p></li> diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt index ebcd17a3..9a3637ae 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -95,6 +95,18 @@ keywords: io line. +io/iodevstats.stp - List Executables Reading and Writing the Most Data by Device +keywords: io profiling + + The iodevstats.stp script measures the amount of data successfully + read and written by all the executables for each io device on the + system. The output is sorted from greatest sum of bytes read and + written to a device by an executable to the least. The output + contains device major/minor number, the count of operations (reads + and writes), the totals and averages for the number of bytes read and + written. + + io/iostat-scsi.stp - iostat for SCSI Devices keywords: io profiling scsi @@ -144,6 +156,25 @@ keywords: io monitoring first few sectors of a raw block device. +io/nfs_func_log.stp - Print Log of NFS Functions Used +keywords: io + + The nfs_func_log.stp script logs the uses of NFS functions in the + kernel. The output is a trace. Each line contains the time stamp, + the process name, and the process number followed by the function + name. + + +io/nfs_func_users.stp - Tally the Number of NFS Functions Used by Each Process +keywords: io profiling + + The nfs_func_users.stp script counts the uses of NFS functions in the + kernel on a per process bases. The output is sorted from the process + with the greatest number of NFS functions called to the least. The + output contains the executable name, the process number, and the + total number of NFS functions called by the process. + + io/traceio.stp - Track Cumulative I/O Activity by Process Name keywords: io diff --git a/testsuite/systemtap.examples/io/iodevstats.meta b/testsuite/systemtap.examples/io/iodevstats.meta new file mode 100644 index 00000000..89277d2f --- /dev/null +++ b/testsuite/systemtap.examples/io/iodevstats.meta @@ -0,0 +1,13 @@ +title: List Executables Reading and Writing the Most Data by Device +name: iodevstats.stp +version: 1.0 +author: anonymous +keywords: io profiling +subsystem: io +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The iodevstats.stp script measures the amount of data successfully read and written by all the executables for each io device on the system. The output is sorted from greatest sum of bytes read and written to a device by an executable to the least. The output contains device major/minor number, the count of operations (reads and writes), the totals and averages for the number of bytes read and written. +test_check: stap -p4 iodevstats.stp +test_installcheck: stap iodevstats.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/iodevstats.stp b/testsuite/systemtap.examples/io/iodevstats.stp new file mode 100755 index 00000000..8925945f --- /dev/null +++ b/testsuite/systemtap.examples/io/iodevstats.stp @@ -0,0 +1,39 @@ +#! /usr/bin/env stap +global reads, writes, totals + +probe begin { printf("starting probe\n") } + +probe vfs.read.return { + count = $return + if ( count >= 0 ) { + e=execname(); + reads[e,dev] <<< count # statistics array + totals[e,dev] += count + } +} + +probe vfs.write.return { + count = $return + if (count >= 0 ) { + e=execname(); + writes[e,dev] <<< count # statistics array + totals[e,dev] += count + } +} + +probe end { + printf("\n%16s %8s %8s %8s %8s %8s %8s %8s\n", + "", "", "", "read", "read", "", "write", "write") + printf("%16s %8s %8s %8s %8s %8s %8s %8s\n", + "name", "device", "read", "KB tot", "B avg", "write", "KB tot", "B avg") + foreach ([name,dev] in totals- limit 20) { # sort by total io + printf("%16s %3d, %4d %8d %8d %8d %8d %8d %8d\n", + name, _dev_major(dev), _dev_minor(dev), + @count(reads[name,dev]), + (@count(reads[name,dev]) ? @sum(reads[name,dev])>>10 : 0 ), + (@count(reads[name,dev]) ? @avg(reads[name,dev]) : 0 ), + @count(writes[name,dev]), + (@count(writes[name,dev]) ? @sum(writes[name,dev])>>10 : 0 ), + (@count(writes[name,dev]) ? @avg(writes[name,dev]) : 0 )) + } +} diff --git a/testsuite/systemtap.examples/io/nfs_func_users.meta b/testsuite/systemtap.examples/io/nfs_func_users.meta new file mode 100644 index 00000000..e37d401a --- /dev/null +++ b/testsuite/systemtap.examples/io/nfs_func_users.meta @@ -0,0 +1,13 @@ +title: Tally the Number of NFS Functions Used by Each Process +name: nfs_func_users.stp +version: 1.0 +author: William Cohen +keywords: io profiling +subsystem: io +status: production +exit: user-controlled +output: sorted-list +scope: system-wide +description: The nfs_func_users.stp script counts the uses of NFS functions in the kernel on a per process bases. The output is sorted from the process with the greatest number of NFS functions called to the least. The output contains the executable name, the process number, and the total number of NFS functions called by the process. +test_check: stap -p4 nfs_func_users.stp +test_installcheck: stap nfs_func_users.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/nfs_func_users.stp b/testsuite/systemtap.examples/io/nfs_func_users.stp new file mode 100755 index 00000000..010db420 --- /dev/null +++ b/testsuite/systemtap.examples/io/nfs_func_users.stp @@ -0,0 +1,18 @@ +#!/usr/bin/env stap + +global nfsdcalls + +probe begin { + printf("Collecting top NFSD procs...\n") +} + +probe kernel.function("*@fs/nfs/*proc.c") ?, + module("nfs").function("*@fs/nfs/*proc.c") ? { + nfsdcalls[execname(), pid()]++ +} + +probe end { + printf("\nname(pid) nfs ops\n"); + foreach ([name,p] in nfsdcalls- limit 20) + printf("%s(%d) %d\n", name, p, nfsdcalls[name, p]) +} diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index 39d29031..ef1a801f 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -165,6 +165,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC <li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many outstanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li> +<li><a href="io/iodevstats.stp">io/iodevstats.stp</a> - List Executables Reading and Writing the Most Data by Device<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The iodevstats.stp script measures the amount of data successfully read and written by all the executables for each io device on the system. The output is sorted from greatest sum of bytes read and written to a device by an executable to the least. The output contains device major/minor number, the count of operations (reads and writes), the totals and averages for the number of bytes read and written.</p></li> <li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> <p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> @@ -180,6 +183,12 @@ keywords: <a href="keyword-index.html#IO">IO</a> <br> <li><a href="io/mbrwatch.stp">io/mbrwatch.stp</a> - Monitor read/write of MBR (boot sector) area of block devices<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#MONITORING">MONITORING</a> <br> <p> The mbrwatch.stp script reports any attempted reads/writes of the first few sectors of a raw block device.</p></li> +<li><a href="io/nfs_func_log.stp">io/nfs_func_log.stp</a> - Print Log of NFS Functions Used<br> +keywords: <a href="keyword-index.html#IO">IO</a> <br> +<p>The nfs_func_log.stp script logs the uses of NFS functions in the kernel. The output is a trace. Each line contains the time stamp, the process name, and the process number followed by the function name.</p></li> +<li><a href="io/nfs_func_users.stp">io/nfs_func_users.stp</a> - Tally the Number of NFS Functions Used by Each Process<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p>The nfs_func_users.stp script counts the uses of NFS functions in the kernel on a per process bases. The output is sorted from the process with the greatest number of NFS functions called to the least. The output contains the executable name, the process number, and the total number of NFS functions called by the process.</p></li> <li><a href="io/traceio.stp">io/traceio.stp</a> - Track Cumulative I/O Activity by Process Name<br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>Every second print out the top ten executables sorted in descending order based on cumulative I/O traffic observed.</p></li> @@ -324,12 +333,18 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde </ul> <h3><a name="PROFILING">PROFILING</a></h3> <ul> +<li><a href="io/iodevstats.stp">io/iodevstats.stp</a> - List Executables Reading and Writing the Most Data by Device<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p> The iodevstats.stp script measures the amount of data successfully read and written by all the executables for each io device on the system. The output is sorted from greatest sum of bytes read and written to a device by an executable to the least. The output contains device major/minor number, the count of operations (reads and writes), the totals and averages for the number of bytes read and written.</p></li> <li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> <p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the machine's various SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> <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> +<li><a href="io/nfs_func_users.stp">io/nfs_func_users.stp</a> - Tally the Number of NFS Functions Used by Each Process<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> +<p>The nfs_func_users.stp script counts the uses of NFS functions in the kernel on a per process bases. The output is sorted from the process with the greatest number of NFS functions called to the least. The output contains the executable name, the process number, and the total number of NFS functions called by the process.</p></li> <li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br> keywords: <a href="keyword-index.html#PROFILING">PROFILING</a> <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> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index 96ad06bd..0f1c5885 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -250,6 +250,18 @@ keywords: io line. +io/iodevstats.stp - List Executables Reading and Writing the Most Data by Device +keywords: io profiling + + The iodevstats.stp script measures the amount of data successfully + read and written by all the executables for each io device on the + system. The output is sorted from greatest sum of bytes read and + written to a device by an executable to the least. The output + contains device major/minor number, the count of operations (reads + and writes), the totals and averages for the number of bytes read and + written. + + io/iostat-scsi.stp - iostat for SCSI Devices keywords: io profiling scsi @@ -299,6 +311,25 @@ keywords: io monitoring first few sectors of a raw block device. +io/nfs_func_log.stp - Print Log of NFS Functions Used +keywords: io + + The nfs_func_log.stp script logs the uses of NFS functions in the + kernel. The output is a trace. Each line contains the time stamp, + the process name, and the process number followed by the function + name. + + +io/nfs_func_users.stp - Tally the Number of NFS Functions Used by Each Process +keywords: io profiling + + The nfs_func_users.stp script counts the uses of NFS functions in the + kernel on a per process bases. The output is sorted from the process + with the greatest number of NFS functions called to the least. The + output contains the executable name, the process number, and the + total number of NFS functions called by the process. + + io/traceio.stp - Track Cumulative I/O Activity by Process Name keywords: io @@ -670,6 +701,18 @@ keywords: process scheduler time tracepoint = PROFILING = +io/iodevstats.stp - List Executables Reading and Writing the Most Data by Device +keywords: io profiling + + The iodevstats.stp script measures the amount of data successfully + read and written by all the executables for each io device on the + system. The output is sorted from greatest sum of bytes read and + written to a device by an executable to the least. The output + contains device major/minor number, the count of operations (reads + and writes), the totals and averages for the number of bytes read and + written. + + io/iostat-scsi.stp - iostat for SCSI Devices keywords: io profiling scsi @@ -689,6 +732,16 @@ keywords: io profiling bytes read and written. +io/nfs_func_users.stp - Tally the Number of NFS Functions Used by Each Process +keywords: io profiling + + The nfs_func_users.stp script counts the uses of NFS functions in the + kernel on a per process bases. The output is sorted from the process + with the greatest number of NFS functions called to the least. The + output contains the executable name, the process number, and the + total number of NFS functions called by the process. + + process/pf2.stp - Profile kernel functions keywords: profiling |