diff options
| -rw-r--r-- | nfs/nfs-slowness.stp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nfs/nfs-slowness.stp b/nfs/nfs-slowness.stp new file mode 100644 index 0000000..e113268 --- /dev/null +++ b/nfs/nfs-slowness.stp @@ -0,0 +1,25 @@ +global time +global threshold=2 /* milliseconds */ +global nesting +probe nfs.fop.entries { + tid=tid() + n=nesting[tid]++ + time[tid,n] = gettimeofday_ms() +} +probe nfs.fop.return { + tid=tid() + n = (nesting[tid] = nesting[tid]-1) + if (n < 0) { + nesting[tid]=0; next + } // missed entry event + if (! ([tid,n] in time)) next // missed entry event + dt = gettimeofday_ms()-time[tid,n] + delete time[tid,n] + if (dt>threshold) { + printf("%s(%d) %s took too long (%d > %d)\n", + execname(), tid, name, dt, threshold) + } +} + +probe begin { log("starting nfs-slowness probe") } +probe end { log("ending nfs-slowness probe") } |
