summaryrefslogtreecommitdiffstats
path: root/sunrpc
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2009-04-02 13:19:32 -0400
committerSteve Dickson <steved@redhat.com>2009-04-02 13:19:32 -0400
commit235cb51e8781d9ec0ec3c45ffdf5bc7bf77c5fd2 (patch)
tree772c8fbc5c80e831e1633e7980fbb6fdb08c9bcd /sunrpc
parent2350cdc2065d991fd8722de4ae91f62914c75556 (diff)
Updates to be a bit less verbose
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/force_rebind.stp76
-rw-r--r--sunrpc/sunrpc-svc.stp14
2 files changed, 84 insertions, 6 deletions
diff --git a/sunrpc/force_rebind.stp b/sunrpc/force_rebind.stp
index 30eda72..42f44ec 100644
--- a/sunrpc/force_rebind.stp
+++ b/sunrpc/force_rebind.stp
@@ -1,3 +1,79 @@
+%{
+#include <linux/sunrpc/svc.h>
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/clnt.h>
+%}
+
+function cl_prog:string(_task:long)
+%{
+ struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task));
+ struct rpc_clnt *clnt = (struct rpc_clnt *)(long) kread(&(task->tk_client));
+ struct rpc_procinfo *proc =
+ (struct rpc_procinfo *)(long) kread(&(clnt->cl_procinfo));
+ static struct {
+ int prog;
+ char *string;
+ } prog_progtbl[] = {
+ {100000, "rpcbind"},
+ {100024, "statd"},
+ {100011, "rquotad"},
+ {100003, "nfsd"},
+ {100021, "nlockmgr"},
+ {100005, "mountd"},
+ {100227, "nfs_acl"},
+ };
+ int i;
+ int tabsz = (sizeof(prog_progtbl)/sizeof(prog_progtbl[0]));
+
+ for (i = 0; i < tabsz; i++) {
+ if (prog_progtbl[i].prog == clnt->cl_prog) {
+ break;
+ }
+ }
+ if (i == tabsz)
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "0x%x[%d]:%s",
+ clnt->cl_prog, clnt->cl_vers, proc->p_name);
+ else
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s[%d]:%s",
+ prog_progtbl[i].string, clnt->cl_vers, proc->p_name);
+
+ CATCH_DEREF_FAULT();
+%}
+function cl_server:string(_task:long)
+%{
+ struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task));
+ struct rpc_clnt *clnt = (struct rpc_clnt *)(long) kread(&(task->tk_client));
+ char *cl_server = kread(&(clnt->cl_server));
+
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s",
+ cl_server ? cl_server : "NULL");
+
+ CATCH_DEREF_FAULT();
+%}
+
+function task_status:long(_task:long)
+%{
+ struct rpc_task *task = (struct rpc_task *)(long) kread(&(THIS->_task));
+
+ THIS->__retvalue = task->tk_status;
+
+ CATCH_DEREF_FAULT();
+%}
+
+probe module("sunrpc").function("call_connect_status")
+{
+ terror = task_status($task);
+ if (terror)
+ printf("call_connect_status:%s:%s: error %d (%s)\n",
+ cl_server($task), cl_prog($task), terror, errno_str(terror));
+}
+probe module("sunrpc").function("call_status")
+{
+ terror = task_status($task);
+ if (terror)
+ printf("call_status:%s:%s: error %d (%s)\n",
+ cl_server($task), cl_prog($task), terror, errno_str(terror));
+}
probe module("sunrpc").function("rpc_force_rebind")
{
printf("rpc_force_rebind: clnt %p\n", $clnt);
diff --git a/sunrpc/sunrpc-svc.stp b/sunrpc/sunrpc-svc.stp
index 0fb2a06..b566ae1 100644
--- a/sunrpc/sunrpc-svc.stp
+++ b/sunrpc/sunrpc-svc.stp
@@ -70,14 +70,16 @@ probe module("sunrpc").function("svc_process")
probe module("sunrpc").function("svc_process").return
{
if ($return == 0) {
- printf("%s(%d): svc_process: return %d (%s)\n",
- execname(), pid(), $return, errno_str($return));
- } else if ($return != 0) {
+ printf("%s(%d): %s[%d]:%d: return %d (%s)\n",
+ execname(), pid(), svcprog(rq_prog), rq_vers, rq_proc,
+ $return, errno_str($return));
+ } else if (show_all && $return != 0) {
if (rq_vers == 4) {
- printf("%s(%d): svc_process:%s(%d): bytes %d\n",
- execname(), pid(), svcprog(rq_prog), rq_vers, $return);
+ printf("%s(%d): %s[%d]:%d: bytes %d\n",
+ execname(), pid(), svcprog(rq_prog), rq_vers,
+ rq_proc, $return);
} else {
- printf("%s(%d): svc_process:%s(%d):%d: bytes %d\n",
+ printf("%s(%d): %s[%d]:%d: bytes %d\n",
execname(), pid(), svcprog(rq_prog), rq_vers,
rq_proc, $return);
}