From 7d1e51313fd00e6146082190746e5988a0d28719 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Mon, 10 Feb 2014 13:05:58 -0500 Subject: Update some old code.... Signed-off-by: Steve Dickson --- top-nfstimes.stp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 top-nfstimes.stp (limited to 'top-nfstimes.stp') 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) +} + -- cgit