Subject: Re: tape drive instrumentation round 2
To: Brett Lymn <blymn@baesystems.com.au>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 03/05/2006 08:36:54
On Mar 5, 2006, at 4:12 AM, Brett Lymn wrote:

> On Fri, Feb 17, 2006 at 12:16:16PM +0900, YAMAMOTO Takashi wrote:
>>
>> i vote for "iostat" and use it for network i/o as well, eventually.
>>
>
> If there are no objections I will commit this to the -current tree in
> about a weeks time.  Below is a copy of the diff that is included in
> the abovementioned tar file (please note that some of the diffs are
> longer than they should be due to stray white-space being stripped
> from some lines)
>
> Index: sys/sys/disk.h
> ===================================================================
> RCS file: /cvsroot/src/sys/sys/disk.h,v
> retrieving revision 1.33
> diff -u -r1.33 disk.h
> --- sys/sys/disk.h	26 Dec 2005 18:41:36 -0000	1.33
> +++ sys/sys/disk.h	5 Mar 2006 11:43:38 -0000
> @@ -90,6 +90,7 @@
>  #include <sys/time.h>
>  #include <sys/queue.h>
>  #include <sys/lock.h>
> +#include <sys/iostat.h>
>
>  struct buf;
>  struct disk;
> @@ -209,15 +210,7 @@
>  	 * Metrics data; note that some metrics may have no meaning
>  	 * on certain types of disks.
>  	 */
> -	int		dk_busy;	/* busy counter */
> -	uint64_t	dk_rxfer;	/* total number of read transfers */
> -	uint64_t	dk_wxfer;	/* total number of write transfers */
> -	uint64_t	dk_seek;	/* total independent seek operations */
> -	uint64_t	dk_rbytes;	/* total bytes read */
> -	uint64_t	dk_wbytes;	/* total bytes written */
> -	struct timeval	dk_attachtime;	/* time disk was attached */
> -	struct timeval	dk_timestamp;	/* timestamp of last unbusy */
> -	struct timeval	dk_time;	/* total time spent busy */
> +	struct io_stats	*stats;

This should be call dk_iostats;

>  	struct	dkdriver *dk_driver;	/* pointer to driver */
>
> @@ -243,29 +236,6 @@
>  	struct cpu_disklabel *dk_cpulabel;
>  };

Alas, I didn't see <sys/iostats.h>

--  
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this  
message.