COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	Copyright (c) GeoWorks 1990 -- All Rights Reserved

PROJECT:	PC GEOS
MODULE:		
FILE:		sysstats.def

AUTHOR:		Adam de Boor, Sep 11, 1990

REVISION HISTORY:
	Name	Date		Description
	----	----		-----------
	Adam	9/11/90		Initial revision


DESCRIPTION:
	Interface to system-statistics code in the GEOS kernel.
		
	$Id: sysstats.def,v 1.1 97/04/04 14:24:45 newdeal Exp $

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@

SetDef	__SYSSTATS

StartKernel

SysSwapInfo	struct
    SSI_paragraphs	word
    SSI_blocks		word
SysSwapInfo	ends

SysStats	struct
    SS_idleCount	dword		; Number of "idle ticks" in the last
					;  second. When used in combination
					;  with the total idle count returned
					;  by SysInfo, this tells you how busy
					;  the CPU is.
    SS_swapOuts		SysSwapInfo	; Outward-bound swap activity
    SS_swapIns		SysSwapInfo	; Inward-bound swap activity
    SS_contextSwitches	word		; Number of context switches during the
					;  last second.
    SS_interrupts	word		; Number of interrupts during the last
					;  second.
    SS_runQueue		word		; Number of runnable threads at the
					;  end of the last second. MUST BE
					;  LAST FIELD
SysStats	ends

global SysStatistics:far
;	Desc:	Return system performance statistics.
;	Pass:	es:di	= Address of buffer to which SysStats structure
;			  will be copied.
;	Return:	nothing
;

;--------------------------------------------------------------------------
;			Paramters to SysGetInfo
;--------------------------------------------------------------------------

global SysGetInfo:far

SysGetInfoType		etype	word, 0, 2
SGIT_TOTAL_HANDLES		enum	SysGetInfoType
SGIT_HEAP_SIZE			enum	SysGetInfoType
; Returns heap size in paragraphs

SGIT_LARGEST_FREE_BLOCK		enum	SysGetInfoType
SGIT_TOTAL_COUNT		enum	SysGetInfoType
SGIT_NUMBER_OF_VOLUMES		enum	SysGetInfoType
SGIT_TOTAL_GEODES		enum	SysGetInfoType
SGIT_NUMBER_OF_PROCESSES	enum	SysGetInfoType
SGIT_NUMBER_OF_LIBRARIES	enum	SysGetInfoType
SGIT_NUMBER_OF_DRIVERS		enum	SysGetInfoType
SGIT_CPU_SPEED			enum	SysGetInfoType
SGIT_SYSTEM_DISK		enum 	SysGetInfoType
SGIT_UI_PROCESS			enum 	SysGetInfoType
SGIT_COUNTER_AT_LAST_INPUT	enum	SysGetInfoType
SGIT_SCREEN_SAVER_DELAY		enum	SysGetInfoType

;-

global SYSSTATISTICS:far
global SYSGETINFO:far

EndKernel
