summaryrefslogtreecommitdiffstats
path: root/nfsd/nfsd_cacheio.stp
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-06-10 11:21:37 -0400
committerSteve Dickson <steved@redhat.com>2009-06-10 11:21:37 -0400
commitdfdce363041b4fb72910837174bf40019923c9bc (patch)
tree827cf40c3a311e8314c0e6719cebd7e0c34919ec /nfsd/nfsd_cacheio.stp
parentaaa6513f6db3a54691cfa7022bfbd979db42672e (diff)
downloadsystemtap-dfdce363041b4fb72910837174bf40019923c9bc.tar.gz
systemtap-dfdce363041b4fb72910837174bf40019923c9bc.tar.xz
systemtap-dfdce363041b4fb72910837174bf40019923c9bc.zip
Reorganised scripts into local directories
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'nfsd/nfsd_cacheio.stp')
-rw-r--r--nfsd/nfsd_cacheio.stp147
1 files changed, 147 insertions, 0 deletions
diff --git a/nfsd/nfsd_cacheio.stp b/nfsd/nfsd_cacheio.stp
new file mode 100644
index 0000000..3dc0a8d
--- /dev/null
+++ b/nfsd/nfsd_cacheio.stp
@@ -0,0 +1,147 @@
+#!/usr/bin/env stap
+
+probe module("nfsd").function("exp_pseudoroot")
+{
+ printf("exp_pseudoroot: rqstp %p fhp %p\n", $rqstp, $fhp);
+}
+probe module("nfsd").function("exp_pseudoroot").return
+{
+ printf("exp_pseudoroot: %s\n", nfsderror($return));
+}
+probe module("sunrpc").function("cache_write")
+{
+ if (!isinstr("rpc.idmapd", file2name($filp))) {
+ printf("cache_write(%s): cnt %d %s\n", execname(),
+ $count, file2name($filp));
+ }
+ //printf("cache_write(%s): filp %p cnt %d\n", execname(), $filp, $count);
+ //printf(" : name %s\n", file2name($filp));
+}
+probe module("sunrpc").function("cache_write").return
+{
+ if ($return < 0) {
+ printf("cache_write: error %s\n", errno_str($return));
+ } else {
+ printf("cache_write: cnt %d\n", $return);
+ }
+}
+probe module("nfsd").function("svc_export_lookup")
+{
+ printf(" svc_export_lookup: %p\n", $exp);
+}
+probe module("nfsd").function("svc_export_lookup").return
+{
+ if ($return > 0) {
+ printf(" svc_export_lookup: %s\n", svc_export_dump($return));
+ } else {
+ printf(" svc_export_lookup: return %p\n", $return);
+ }
+}
+probe module("nfsd").function("svc_export_parse")
+{
+ printf(" svc_export_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n",
+ svc_export_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("svc_export_parse").return
+{
+ if ($return < 0)
+ printf(" svc_export_parse: error %s\n", errno_str($return));
+}
+probe module("nfsd").function("exp_get_by_name")
+{
+ printf("exp_get_by_name: clp %p mnt %p dentry %p reqp %p\n",
+ $clp, $mnt, $dentry, $reqp);
+}
+probe module("nfsd").function("exp_get_by_name").return
+{
+ printf("exp_get_by_name: return %p\n", $return);
+}
+probe module("nfsd").function("exp_export")
+{
+ printf("exp_export: %p\n", $nxp);
+}
+probe module("nfsd").function("exp_export").return
+{
+ printf("exp_export: return %p\n", $return);
+}
+/*
+probe module("sunrpc").function("cache_read")
+{
+ printf("cache_read(%s): %s\n", execname(), file2name($filp));
+ //printf("cache_write(%s): filp %p cnt %d\n", execname(), $filp, $count);
+ //printf(" : name %s\n", file2name($filp));
+}
+probe module("sunrpc").function("cache_read").return
+{
+ if ($return < 0)
+ printf("cache_read: error %s\n", errno_str($return));
+}
+*/
+probe module("nfsd").function("svc_export_parse")
+{
+ printf(" svc_export_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n",
+ svc_export_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("svc_export_parse").return
+{
+ if ($return < 0)
+ printf(" svc_export_parse: error %s\n", errno_str($return));
+}
+probe module("sunrpc").function("ip_map_parse")
+{
+ printf(" ip_map_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n", ip_map_data(kernel_string($mesg)));
+}
+probe module("sunrpc").function("ip_map_parse").return
+{
+ if ($return < 0)
+ printf(" ip_map_parse: error %s\n", errno_str($return));
+}
+probe module("nfsd").function("expkey_parse")
+{
+ printf(" expkey_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n", expkey_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("expkey_parse").return
+{
+ if ($return < 0)
+ printf(" expkey_parse: error %s\n", errno_str($return));
+}
+/*
+probe module("nfsd").function("idtoname_parse")
+{
+ printf(" idtoname_parse: cd %p(%s) buflen %d\n",
+ $cd, kernel_string($cd->name), $buflen);
+ printf(" %s\n", idtoname_data(kernel_string($buf)));
+}
+probe module("nfsd").function("idtoname_parse").return
+{
+ if ($return < 0)
+ printf(" idtoname_parse: error %s\n", errno_str($return));
+}
+*/
+probe module("nfsd").function("expkey_request")
+{
+ printf(" expkey_request: cd %p(%s)\n",
+ $cd, kernel_string($cd->name));
+ //print_stack(backtrace());
+ //printf(" %s\n", expkey_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("check_export")
+{
+ printf(" check_export: inode %p flags 0x%x uuid %p\n",
+ $inode, $flags, $uuid);
+}
+probe module("nfsd").function("check_export").return
+{
+ if ($return < 0)
+ printf(" check_export: error %s\n", errno_str($return));
+}
+probe begin { log("starting cachio probe") }
+probe end { log("ending cachio probe") }