On Sun, Dec 9, 2018 at 11:05 PM Eugene M. Zheganin <eug...@zhegan.in> wrote:
>
> Hello,
>
> On 07.12.2018 20:25, Alan Somers wrote:
> >
> >> I also can see the iotop in the context of network data transferred
> >> using trafshow, but this doesn't scale well to iops, and I would see
> >> reads/writes per second in terms that block devices use.
> >>
> >>
> >> Thanks.
> >>
> >> Eugene.
> > What's wrong with gstat?  Use "gstat -a" to suppress idle devices.
> > -Alan
>
> Everything is wrong with gstat in this case.
>
> First of all, this is what's wrong -
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227465 , and gstat
> required zvols to be volmode=geom to use it this way.
>
> Second, volmode=dev is supposed to be more performing.
>
> Finally, I find hilarious that first answer in the dtrace@ was "don't
> use dtrace".
>
> Eugene.

It's too bad that you can't use volmode=geom.  gstat is really ideal
for this case.  But since you asked nicely, here's a dtrace script to
get you started.

fbt:zfs:zvol_strategy:entry
/args[0]->bio_cmd == 1/
{
    zv = (zvol_state_t*)(args[0]->bio_to->private);
    @reads[stringof(zv->zv_name), "read"] = count();
}
fbt:zfs:zvol_strategy:entry
/args[0]->bio_cmd == 2/
{
    zv = (zvol_state_t*)(args[0]->bio_to->private);
    @writes[stringof(zv->zv_name), "write"] = count();
}

-Alan
_______________________________________________
freebsd-dtrace@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
To unsubscribe, send any mail to "freebsd-dtrace-unsubscr...@freebsd.org"

Reply via email to