summaryrefslogtreecommitdiffstats
path: root/nfs
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2011-03-17 15:16:34 -0400
committerSteve Dickson <steved@redhat.com>2011-03-17 15:16:34 -0400
commitfcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43 (patch)
tree21c199757b2120ceda2917abb4411efee3badab4 /nfs
parented1bd250c4143f25b4f9913f4da7b88e46913bb9 (diff)
downloadsystemtap-fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43.tar.gz
systemtap-fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43.tar.xz
systemtap-fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43.zip
Added top reads
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'nfs')
-rw-r--r--nfs/nfs_topreads.stp22
1 files changed, 22 insertions, 0 deletions
diff --git a/nfs/nfs_topreads.stp b/nfs/nfs_topreads.stp
new file mode 100644
index 0000000..8e8fff2
--- /dev/null
+++ b/nfs/nfs_topreads.stp
@@ -0,0 +1,22 @@
+#!/usr/bin/env stap
+
+global starts, reads
+
+probe begin {
+ printf("Collecting top NFS reads...\n")
+}
+
+probe module("nfs").function("*@fs/nfs/read.c")
+{
+ starts[probefunc()] = gettimeofday_us()
+}
+probe module("nfs").function("*@fs/nfs/read.c").return
+{
+ reads[probefunc()] = gettimeofday_us() - starts[probefunc()]
+}
+
+probe end {
+ printf("Collating data...\n");
+ foreach (name in reads- limit 20)
+ printf("%10d %s\n", reads[name], name)
+}