diff options
author | Steve Dickson <steved@redhat.com> | 2014-02-10 13:05:58 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2014-02-10 13:05:58 -0500 |
commit | 7d1e51313fd00e6146082190746e5988a0d28719 (patch) | |
tree | 5f5df0d6290bf7217f42788872f831e28c92df23 /top-nfstimes.stp | |
parent | 330857f790fe94b38001367a4cf6e376f72d656e (diff) | |
download | systemtap-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-x | top-nfstimes.stp | 34 |
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) +} + |