diff options
author | William Cohen <wcohen@redhat.com> | 2010-02-02 14:32:38 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2010-02-02 14:32:38 -0500 |
commit | 111dd9ac1d5e127b80c89be484be37ea326b449d (patch) | |
tree | 1b4f85890d811d8c4260eefe529ce34bf68985bb /testsuite/systemtap.examples | |
parent | a4f3198f0b774528ef17dfb1ce5b3e70b6eb82fb (diff) | |
download | systemtap-steved-111dd9ac1d5e127b80c89be484be37ea326b449d.tar.gz systemtap-steved-111dd9ac1d5e127b80c89be484be37ea326b449d.tar.xz systemtap-steved-111dd9ac1d5e127b80c89be484be37ea326b449d.zip |
Add nfs_func_users example.
Diffstat (limited to 'testsuite/systemtap.examples')
-rw-r--r-- | testsuite/systemtap.examples/index.html | 3 | ||||
-rw-r--r-- | testsuite/systemtap.examples/index.txt | 10 | ||||
-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 | 6 | ||||
-rw-r--r-- | testsuite/systemtap.examples/keyword-index.txt | 20 |
6 files changed, 70 insertions, 0 deletions
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index 83c82d29..f7190eab 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -91,6 +91,9 @@ 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_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 c435612c..68741ffd 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -156,6 +156,16 @@ keywords: io monitoring first few sectors of a raw block device. +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/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 7dcd05ce..b49f48c3 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -183,6 +183,9 @@ 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_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> @@ -336,6 +339,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PRO <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 1066d277..92370c83 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -311,6 +311,16 @@ keywords: io monitoring first few sectors of a raw block device. +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 @@ -713,6 +723,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 |