summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples/io/nfs_func_users.stp
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-02-04 11:31:47 -0500
committerDave Brolley <brolley@redhat.com>2010-02-04 11:31:47 -0500
commit8155cc835adb286c456f30ebaa961508bc064e90 (patch)
tree3634a392b6e0ef15f9426928bb23f30f58546f29 /testsuite/systemtap.examples/io/nfs_func_users.stp
parentd2334a2233f4efd055dab021c603f7c046730a66 (diff)
parent23b7dbfaf1e9860f77b6bf1aa3da8610bf31b03c (diff)
downloadsystemtap-steved-8155cc835adb286c456f30ebaa961508bc064e90.tar.gz
systemtap-steved-8155cc835adb286c456f30ebaa961508bc064e90.tar.xz
systemtap-steved-8155cc835adb286c456f30ebaa961508bc064e90.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.examples/io/nfs_func_users.stp')
-rwxr-xr-xtestsuite/systemtap.examples/io/nfs_func_users.stp18
1 files changed, 18 insertions, 0 deletions
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])
+}