Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Dec 2011 10:05:51 -0500
From:      Jason Hellenthal <jhell@DataIX.net>
To:        Matt Burke <mattblists@icritical.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Monitoring ZFS IO
Message-ID:  <20111202150551.GA26344@DataIX.net>
In-Reply-To: <4ED8D7A5.7090700@icritical.com>
References:  <4ED8D7A5.7090700@icritical.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--dTy3Mrz/UPE2dbVg
Content-Type: multipart/mixed; boundary="IS0zKkzwUGydFO0o"
Content-Disposition: inline


--IS0zKkzwUGydFO0o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


You will need to add this patch to your kernel and recompile. Things like t=
op -m io and iostat will start working properly after.


On Fri, Dec 02, 2011 at 01:50:29PM +0000, Matt Burke wrote:
> Can someone enlighten me as to how to get 'iostat -Id' or 'iostat -Idx'
> style counters for zpools?
>=20
> I've read through the man pages, but all I can see is 'zpool iostat' which
> gives values which appear to be averaged over an unspecified time period.
>=20
>=20
> With a 30-disk zpool, I can't fathom out how to get any meaningful data
> from the individual disk stats, and keeping a daemon running 'zpool iostat
> N' just to parse its output seems hugely inefficient and hacky...
>=20
>=20
>=20
> Thanks.
>=20
> --=20
>=20
> =20
> The information contained in this message is confidential and is intended=
 for the addressee only. If you have received this message in error or ther=
e are any problems please notify the originator immediately. The unauthoris=
ed use, disclosure, copying or alteration of this message is strictly forbi=
dden.=20
>=20
> Critical Software Ltd. reserves the right to monitor and record e-mail me=
ssages sent to and from this address for the purposes of investigating or d=
etecting any unauthorised use of its system and ensuring its effective oper=
ation.
>=20
> Critical Software Ltd. registered in England, 04909220. Registered Office=
: IC2, Keele Science Park, Keele, Staffordshire, ST5 5NH.
>=20
> ------------------------------------------------------------
> This message has been scanned for security threats by iCritical.
>     For further information, please visit www.icritical.com
> ------------------------------------------------------------
>=20
>=20
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"

--IS0zKkzwUGydFO0o
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="td_ru.ru_inblock+oublock.patch"
Content-Transfer-Encoding: quoted-printable

# HG changeset patch
# Parent 34d97359838e3296c9a2f2070c8a4f731daefc58
Add the capability to use top -m io to ZFS

diff -r 34d97359838e sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
@@ -625,6 +625,9 @@
 			rw_exit(&dn->dn_struct_rwlock);
 		DB_DNODE_EXIT(db);
 	} else if (db->db_state =3D=3D DB_UNCACHED) {
+#ifdef _KERNEL
+		curthread->td_ru.ru_inblock++;
+#endif
 		spa_t *spa =3D dn->dn_objset->os_spa;
=20
 		if (zio =3D=3D NULL)
diff -r 34d97359838e sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
@@ -400,6 +400,10 @@
 		if (read) {
 			(void) dbuf_read(db, zio, dbuf_flags);
 		}
+#ifdef _KERNEL
+		else
+			curthread->td_ru.ru_oublock++;
+#endif
 		dbp[i] =3D &db->db;
 	}
 	rw_exit(&dn->dn_struct_rwlock);

--IS0zKkzwUGydFO0o--

--dTy3Mrz/UPE2dbVg
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJO2OlPAAoJEJBXh4mJ2FR+8aQIAJtNnlTEdcToDlzHjw2x70UL
CAS2wF8Beo6BhiV2WTYjVp1d0TJ0+7NY/R46tA9KkWuDcfKfg9d/IB5t3m+PEVj7
hCKTdnIDccNnv6C9HQZxYozx/0P+5rdnOS6lhi4i5DRzbHydKeGsM5LdbfXLZ5P4
Pc3Z59i5ft9KYVJRcTTR135wzzc5zlJBTfCfC449BqotR6YeQu1H3P7GQN3xc5Qc
CVEFdL98SVOxNyxyucRJB7CrHxoVupiFkydFYAvSkmEzKAJaKe5z29HbPdjp8oUj
71X9FX2D93K6WZl+rqF4g7bMGJ/K45sMf6I12N8gjIsnfugLzKu/M6a0Wf6SlwM=
=kUH3
-----END PGP SIGNATURE-----

--dTy3Mrz/UPE2dbVg--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111202150551.GA26344>