Subject: nore on disk stats
To: None <thorpej@nas.nasa.gov, perry@piermont.com, jonb@bullbox.jbl.com>
From: Gordon W. Ross <gwr@mc.com>
List: tech-kern
Date: 11/14/1995 11:15:19
> From: Jason Thorpe <thorpej@nas.nasa.gov>
> Date: Mon, 13 Nov 1995 22:32:29 -0800

> On Tue, 14 Nov 1995 00:30:52 -0500 
>  "Perry E. Metzger" <perry@piermont.com> wrote:
> 
>  > Actually, Jason Thorpe has given me a program that walks the kernel
>  > tables and gets all of the information very cleanly -- even
>  > automatically tells you whats a disk, whats a network interface,
[ etc. ...]

> Well, like I've mentioned before, this is Really Easy with SCSI.  
> However, having an hp300, I do indeed realize that All The World's Not 
> SCSI.  What I'd duggest is a new ioctl (DIOCGGEOM maybe?) that would be 
> implemented in the individual drivers, like the disklabel-related ones 
> are, which fills in a structure like the following:

Or do it like SunOS: <sun/dkio.h>

/*
 * Disk io control commands
 */
#define	DKIOCGGEOM _IOR(d, 2, struct dk_geom)	/* Get geometry */
#define	DKIOCSGEOM _IOW(d, 3, struct dk_geom)	/* Set geometry */
#define	DKIOCGPART _IOR(d, 4, struct dk_map)	/* Get partition info */
#define	DKIOCSPART _IOW(d, 5, struct dk_map)	/* Set partition info */
#define	DKIOCINFO  _IOR(d, 8, struct dk_info)	/* Get info */