/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ident	"$Header: sa.h 1.3 89/10/10 $"

/*	sa.h contains struct sa and defines variable used 
		in sadc.c and sar.c.
 */

/* $Log:	sa.h,v $
 */
 
/*
 * The interface between sadc and sar has been changed.  This change was
 * required because the original code had a built in assumption that all
 * I/O devices are numbered sequentially with no gaps.  This is not true
 * on Sequent systems (e.g., anchored drives on a ZDC ... a system may have
 * two drives with one achored as zd0 and one as zd5)
 *
 * There is now a structure for each device.  This structure contains fields
 * for each data item that was passed originally via an array.  In addition,
 * a name field has been added so that the device name can be passed to sar.
 * The structure is cleaner and eliminates the tblmap/SINFO kludge.  Now all
 * that * needs to be passed to sar in a header is the number of devices
 * actually * represented in the array.  (sadc only writes enough elements of
 * the devio * array to cover the devices in the system being monitored.  Some
 * day the * array should really be dynamically sized.)
 */

/*
 * NDEVS is the total number of I/O devices possible.
 */

#define NDEVS		512	/* Large enough for now */

struct dev_stats {
	char	d_name[12];
	ulong	d_ops;		/* number of I/O requests since boot */
	ulong	d_blks;		/* number of DEV_BSIZE blocks xferred */
	ulong	d_active;	/* cumulative time device was active */
				/* (milliseconds) */
	ulong	d_resp;		/* cumulative response time (milliseconds) */
};
 
 
/*
 * structure sa defines the data structure of system activity data file
 *
 * The dinfo, rcinfo, minserve, maxserve data are not supported.
 */
 
struct sa {
	struct	sysinfo si;	/* defined in sysinfo.h  */
	struct	minfo	mi;	/* defined in sysinfo.h */
#ifdef	RFS_SUPPORT
	struct	dinfo	di;	/* defined in sysinfo.h */
	struct	rcinfo	rc;	/* defined in sysinfo.h */
	int	minserve;
	int	maxserve;
#endif	/* RFS_SUPPORT */
	int	szinode;	/* current size of inode table  */
	int	szfile;		/* current size of file table  */
	int	szproc;		/* current size of proc table  */
	int	szlckf;		/* current size of file record header table */
	int	szlckr;		/* current size of file record lock table */
	int	mszinode;	/* maximum size of inode table  */
	int	mszfile;	/* maximum size of file table  */
	int	mszproc;	/* maximum size of proc table  */
	int	mszlckf;	/* maximum size of file record header table */
	int	mszlckr;	/* maximum size of file record lock table */
	long	inodeovf;	/* cumulative overflows of inode table
					since boot  */
	long	fileovf;	/* cumulative overflows of file table
					since boot  */
	long	procovf;	/* cumulative overflows of proc table
					since boot  */
	time_t	ts;		/* time stamp  */

	struct dev_stats devio[NDEVS]; /* device I/O information */
};
