Subject: Re: statistics gathering for tape drives
To: Brett Lymn <blymn@baesystems.com.au>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 07/27/2005 13:05:11
--JgQwtEuHJzHdouWu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 27, 2005 at 10:07:22PM +0930, Brett Lymn wrote:
>=20
> Folks,
>=20
> I noticed that our tape drives were not instrumented so there was no
> way one could monitor the read/write/utiliation of a tape drive on a
> NetBSD system.  I decided to fix this, now I can do:
>=20
> [blymn@siren] iostat -x st0 5
> device  read KB/t    r/s   time     MB/s write KB/t    w/s   time     MB/s
> st0          0.00      9   0.48     0.27      10.21     53   0.48     0.53
> st0          0.00      0   0.98     0.00      64.00     80   0.98     5.00
> st0          0.00      0   0.98     0.00      64.00     79   0.98     4.94
> st0          0.00      0   0.97     0.00      64.00     79   0.97     4.95
> st0          0.00      0   0.98     0.00      64.00     79   0.98     4.94
>=20
> ... this is a DLT4000 attached to a Adaptec 29160, these figures are
> when I am dd'ing 1Mb blocks of zeros to the tape device.  The
> manufacturer rates the drive at 6Mb/s for compressed data so the above
> numbers are not too shabby.  I have also fixed vmstat and systat to
> show the tape statistics.
>=20
> Below is the patch that modifies all the relevant files, there are
> some new files you need to fetch if you want to play with this, these
> files are on ftp.netbsd.org under /pub/NetBSD/misc/blymn/tape_stats/
> in a file called extra_files.tar.gz.  Unpack the tar file in the root
> of your NetBSD src directory, apply the patch from the same place.
>=20
> Comments and feedback are welcome, if there are no major problems
> noted with the code I shall commit it to the tree for all to enjoy.

I'm not 100% sure on the diff, as I don't know all the code paths=20
involved.

However I like the idea. A lot!

Take care,

Bill

--JgQwtEuHJzHdouWu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFC5+j3Wz+3JHUci9cRAvIKAKCMJAU7hoxHOMk5rBlFqv2P9HimYgCfcaJA
3xUDLptZQDniv2aNj5zEB9o=
=w3Po
-----END PGP SIGNATURE-----

--JgQwtEuHJzHdouWu--