Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50437/bosswk.mac
There are no other files named bosswk.mac in the archive.
	TITLE	BOSSWK	- GET SYSTEM STATISTICS

	ENTRY	GET401,GET402,GET403,GET501,GET601,GET000
	SEARCH	C
	SALL

	A=0
	B=1
	C=2
	D=3
	P=17

	;CACHE DATA

	CACHE==75,,56

	;UNIT DATA BLOCK ITEMS

	UNISYS==3
	UNIHCT==10
	UNISCT=11
	UNIBRC==16
	UNIBWC==17
	UNIDRC==20
	UNIDWC==21
	UNIMRC==22
	UNIMWC==23
	UNIMSC==26
	UNIUSC==27

	DEFINE ISPY(X1) <
	XLIST
	MOVEI	A,X1(C)
	PEEK	A,
	LIST
	>

	DEFINE	PLACE(X1,X2) <
	XLIST
	MOVE	A,LOC+X1
	MOVEM	A,X2(B)
	LIST>

	DEFINE	XX(X1) <
	XLIST
	MOVE	A,[X1]
	GETTAB	A,
	JRST	ERROR
	MOVE	C,IDX
	ADDI	C,1
	MOVEM	C,IDX
	MOVEM	A,@IDX
	LIST
	>

GET401:	MOVEM	C,SAVACC		;SAVE AC C
	MOVEI	B,@(16)			;GET ARRAY ADDRESS
	MOVEM	B,IDX

	XX	.GTRCT		;BLOCKS SWAPPED IN
	XX	.GTWCT		;BLOCKS SWAPPED OUT
	XX	%CNLMX		;LOGMAX
	XX	%CNBMX		;BATMAX
	XX	%CNLNM		;LOGNUM
	XX	%CNBNM		;BATNUM
	XX	%NSCLW		;TOTAL WORDS CLEARED
	XX	%SYERR		;SYSTEM WIDE ERROR COUNT
	XX	%SYCCO		;NUMBER TIMES COMCNT WAS OFF
	XX	%SYNCP		;NUMBER COMMANDS PROCESSED
	XX	%NSCMX		;CORMAX

	MOVE	A,[XWD ^D401,^D20]	;MOVE IN HEADER
	MOVEM	A,(B)			;PUT IN RIGHT PLACE
	MOVE	C,SAVACC		;RESTORE AC C
	POPJ	P,			;GO HOME
GET402:	MOVEM	C,SAVACC		;SAVE AC C
	MOVEI	B,@(16)			;GET ARRAY ADDRESS
	MOVEM	B,IDX

	XX	%SCNRI		;RCV INTERRUPTS
	XX	%SCNXI		;XMT INTERRUPTS
	XX	%SCNEI		;ECHO INTERRUPTS
	XX	%SCNAL		;ACTIVE LINES

	MOVE	A,[XWD ^D402,^D20]	;MOVE IN HEADER
	MOVEM	A,(B)			;PUT IN RIGHT PLACE
	MOVE	C,SAVACC		;RESTORE AC C
	POPJ	P,			;GO HOME
GET403:	MOVEM	C,SAVACC			;SAVE AC C
	MOVEI	B,@(16)				;GET ARRAY ADDRESS
	MOVEM	B,IDX

	XX	%SSORJ				;JOBS RUN OUT OF ORDER
	XX	%SSNUL				;SWAPPER NULL TIME
	XX	%SSLOS				;SWAPPER LOST TIME
	XX	%SSRQC				;TOTAL NUMBER OF REQ'S
	XX	%SSAJS				;AVERAGE JPB SIZE
	XX	.GTEBT				;EBOX TIME
	XX	.GTMBT				;MBOX TIME
	XX	CACHE				;CACHE SWEEPS

	MOVE	A,[XWD ^D403,^D10]		;MOVE IN HEADER
	MOVEM	A,(B)				;PUT IN ARRAY(1)
	MOVE	C,SAVACC			;RESTORE AC C
	POPJ	P,				;GO HOME
GET501:	MOVEM	C,SAVACC		;SAVE AC C
	MOVEI	B,@(16)			;GET ARRAY ADDRESS
	MOVEM	B,IDX

	XX	%NSACR		;ACCUMULATED CPU RESPONSES
	XX	%NSNCR		;NUMBER OF CPU RESPONSES
	XX	%CVUPT		;UPTIME (JIFFIES)
	XX	%CVLST		;LOST TIME (JIFFIES)
	XX	%CVNUL		;NULL TIME (JIFFIES)
	XX	%CVOHT		;OVERHEAD TIME (JIFFIES)
	XX	%CVTUC		;TOTAL UUO'S EXECUTED
	XX	%CVTJC		;TOTAL JOB CONTEXT SWITCHES

	MOVE	A,[XWD ^D501,^D18]	;MOVE IN HEADER
	MOVEM	A,(B)			;PUT AWAY
	MOVE	C,SAVACC		;RESTORE AC C
	POPJ	P,			;GO HOME
GET601:	MOVEM	C,SAVACC
	MOVEM	D,SAVACD
	MOVE	A,@(16)			;WET DISK NAME
	MOVEM	A,LOC			;STORE FOR CALL
	MOVE	A,[XWD 20,LOC]		;GET READY
	DSKCHR	A,			;DO IT
	JRST	ERROR			;ERROR RETURN
	MOVE	B,1(16)			;GET ARRAY ADDRESS
	MOVEM	A,10(B)		;SAVE DSKCHR AC

	PLACE	3,1			;.DCUNT
	PLACE	6,2			;.DCUSZ
	PLACE	7,3			;.DCSMT
	PLACE	12,4			;.DCK4S
	PLACE	14,5			;.DCULN
	PLACE	15,6			;.DCUPN
	PLACE	16,7			;.DCUID

	MOVE	C,@2(16)		;GET ADDRESS
	ISPY	UNIMSC			;MONITOR SEEKS
	MOVEM	A,11(B)
	ISPY	UNIUSC			;USER SEEKS
	MOVEM	A,12(B)
	ISPY	UNIBRC			;BUFFERED READ COUNT
	MOVE	D,A
	ISPY	UNIBWC			;BUFFERED WRITE COUNT
	ADD	D,A
	ISPY	UNIDRC			;DUMP READS
	ADD	D,A
	ISPY	UNIDWC			;DUMP WRITES
	ADD	D,A
	MOVEM	D,13(B)
	ISPY	UNIMRC			;MONITOR READS
	MOVE	D,A
	ISPY	UNIMWC			;MONITOR WRITES
	ADD	D,A
	MOVEM	D,14(B)
	ISPY	UNIHCT			;HARD DISK ERRORS
	MOVEM	A,15(B)
	ISPY	UNISCT			;SOFT DISK ERRORS
	MOVEM	A,16(B)
	ISPY	UNISYS			;GET NEXT ADDR
	HLRZ	A,A
	MOVEM	A,@2(16)		;STORE IT

	MOVE	A,[XWD ^D601,^D18]	;MOVE IN HEADER
	MOVEM	A,(B)			;PUT IN RIGHT PLACE
	MOVE	C,SAVACC
	MOVE	D,SAVACD
	POPJ	P,			;GO HOME
GET000:	MOVEM	C,SAVACC		;SAVE AC C
	MOVEI	B,@(16)			;GET ARRAY ADDRESS
	MOVEM	B,IDX

	XX	%CNFG0		;SYSTEM NAME (ASCIZ)
	XX	%CNFG1
	XX	%CNFG2
	XX	%CNFG3
	XX	%CNYER		;YEAR
	XX	%CNMON		;MONTH
	XX	%CNDAY		;DAY
	XX	%CNHOR		;HOUR
	XX	%CNMIN		;MINUTE
	XX	%CNSEC		;SECOND
	XX	%CNFG4		;GET ALL OF SYSTEM NAME

	MOVE	A,[XWD 0,^D18]	;MOVE IN HEADER
	MOVEM	A,(B)			;PUT AWAY
	MOVE	C,SAVACC		;RESTORE AC C
	POPJ	P,			;GO HOME
ERROR:	HALT	.

IDX:	BLOCK	1			;PLACE FOR INDEX
SAVACC:	BLOCK	1			;AC C GOES HERE
SAVACD:	BLOCK	1			;AC D GOES HERE
LOC:	BLOCK	20			;SPACE FOR DSKCHR

	END