Date: Tue, 11 Dec 2018 08:34:26 -0700 From: Alan Somers <asomers@freebsd.org> To: "Eugene M. Zheganin" <eugene@zhegan.in> Cc: dtrace@freebsd.org Subject: Re: iotop for iSCSI or zfs datasets Message-ID: <CAOtMX2gk_D%2BdLu4VzCW1ZmzTJ9xLz-F3GZs-t_3HspDY2R-rQA@mail.gmail.com> In-Reply-To: <5b23c43b-a00f-0703-60e1-00920d5dbe79@zhegan.in> References: <67bc8f0a-8702-c6ee-9d37-3a5064709126@zhegan.in> <CAOtMX2gEnzzq9XZQqU2WLLGxAYNhkM7C8GGqM03X=eemK9Wqhw@mail.gmail.com> <5b23c43b-a00f-0703-60e1-00920d5dbe79@zhegan.in>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 9, 2018 at 11:05 PM Eugene M. Zheganin <eugene@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2gk_D%2BdLu4VzCW1ZmzTJ9xLz-F3GZs-t_3HspDY2R-rQA>