summaryrefslogtreecommitdiffstats
path: root/top-nfstimes.stp
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2014-02-10 13:05:58 -0500
committerSteve Dickson <steved@redhat.com>2014-02-10 13:05:58 -0500
commit7d1e51313fd00e6146082190746e5988a0d28719 (patch)
tree5f5df0d6290bf7217f42788872f831e28c92df23 /top-nfstimes.stp
parent330857f790fe94b38001367a4cf6e376f72d656e (diff)
downloadsystemtap-7d1e51313fd00e6146082190746e5988a0d28719.tar.gz
systemtap-7d1e51313fd00e6146082190746e5988a0d28719.tar.xz
systemtap-7d1e51313fd00e6146082190746e5988a0d28719.zip
Update some old code....
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'top-nfstimes.stp')
-rwxr-xr-xtop-nfstimes.stp34
1 files changed, 34 insertions, 0 deletions
diff --git a/top-nfstimes.stp b/top-nfstimes.stp
new file mode 100755
index 0000000..1dbfb61
--- /dev/null
+++ b/top-nfstimes.stp
@@ -0,0 +1,34 @@
+#!/usr/bin/env stap
+
+global nfscalls write_time
+
+probe begin {
+ printf("Collecting top NFS procs...\n")
+}
+
+probe module("nfs").function("*@fs/nfs/*write.c")
+{
+ nfscalls[probefunc()] = gettimeofday_us()
+}
+probe module("nfs").function("*@fs/nfs/*write.c").return
+{
+ write_time = nfscalls[probefunc()]
+ nfscalls[probefunc()] = gettimeofday_us() - write_time
+}
+/*
+probe module("nfs").function("*@fs/nfs/*direct.c")
+{
+ nfscalls[probefunc()]++
+}
+probe kernel.function("*@fs/nfs/*pagelist.c") ?,
+ module("nfs").function("*@fs/nfs/*pagelist.c") ?
+{
+ nfscalls[probefunc()]++
+}
+*/
+probe end {
+ printf("Collating data...\n");
+ foreach (name in nfscalls- limit 50)
+ printf("%10d %s\n", nfscalls[name], name)
+}
+