How to see threads in biowait using Dtrace
From the Blog at: https://blogs.oracle.com/onur/entry/how_to_see_threads_in
You can use following Dtrace script to see threads in biowait and how much time spent in biowait.
=====
#!/usr/sbin/dtrace -s
io:::wait-start
{
self->ts=timestamp;
}
io:::wait-done
/self->ts/
{
@[pid,execname,stack()] = count();
@time[pid,execname]= avg((timestamp - self->ts));
self->ts = 0;
}
tick-5sec
{
printa(@); clear(@); printa(@time);clear(@time);
}
=====