From fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Thu, 17 Mar 2011 15:16:34 -0400 Subject: Added top reads Signed-off-by: Steve Dickson --- nfs/nfs_topreads.stp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nfs/nfs_topreads.stp 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) +} -- cgit