diff options
| author | Steve Dickson <steved@redhat.com> | 2010-03-18 17:32:14 -0400 |
|---|---|---|
| committer | Steve Dickson <steved@redhat.com> | 2010-03-18 17:32:14 -0400 |
| commit | 226be5a31b0240657fa7c5cb57e84f876d697d2c (patch) | |
| tree | 764ceb666ddc5e7e0b612202366bbac8026b310f | |
| parent | a6bd8abec6f7344f402766d8528ed135b3be5185 (diff) | |
| download | systemtap-226be5a31b0240657fa7c5cb57e84f876d697d2c.tar.gz systemtap-226be5a31b0240657fa7c5cb57e84f876d697d2c.tar.xz systemtap-226be5a31b0240657fa7c5cb57e84f876d697d2c.zip | |
Added nfs/nfs-slowness.stp
Signed-off-by: Steve Dickson <steved@redhat.com>
| -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") } |
