1			PROGRAM ACL
 			***********
 
 
 	SYSTEM TASK ACCOUNTING PROGRAM
 
 
 	NOTES --
 
      -	ALL .MAC .FTN .TSK ETC. ASSOCIATED FILES RESIDE IN UIC [1,200].
 	THE ACCOUNTING OUTPUT IS ALWAYS DIRECTED TO A DISK FILE...
 
 		SY0:[1,6]ACCLOG.SYS
 
 	THE ACCOUNTING PROCESS AS EXPECTED WILL ACCESS THIS FILE
 	FREQUENTLY IN AN APPEND MODE.  THE PROGRAM IS SET UP TO FIRST
 	OPEN A NEW ACCLOG.SYS FILE,  EACH ENTRY IS FORCED TO THE DISK
 	AT THE TIME OF THE EVENT (TASK TERMINATION, SYSTEM USAGE REPORT).
 	THIS WAY IF THE SYSTEM CRASHES, ONLY THE DATA ASSOCIATED WITH
 	THE TASKS ACTIVE AT THE TIME OF THE CRASH WILL BE LOST.  THE
 	PROGRAM IS SUPPOSED TO BE CLEVER ENOUGH NOT TO HAVE TO RE-READ
 	THE DISK FILE FOR EACH ENTRY, JUST WRITE NEW APPENDED DATA TO
 	THE "DISK" BLOCK HELD IN MEMORY.
 
      - EVERY TASK TERMINATION GENERATES AN ENTRY TO THE ACCLOG.SYS
 	FILE.  THIS INCLUDES ALL SYSTEM TASKS AS WELL AS USER TASKS
 	EG. MCR, SYS, SHF, ETC.  OUR SYSTEM, AN 11/45 WITH..
 
 		2 X RP04, 2 X TU10, DH11, 6 TERMINALS (2-LA36,
 		1-VT52,1-HP2648 GRAPHIC, 1-HAZELTINE 1500 AND
 	 	AN UNKNOWN BRAND OF CRT).
 
 			ALL PROGRAMS ARE FORTRAN-V-PLUS.
 
 	ABOUT  500 TO 1500 BLOCKS OF ACCOUNTING INFORMATION ARE GEN-
 	ERATED DURING A NORMAL 24 HOUR DAY.  MOST OF THIS SPACE IS
 	OCCUPIED BY ENTRIES FOR ...SHF.
 
 	THE ..ACL. PROGRAM GENERATES A SYSTEM USAGE ENTRY INTO THE
 	FILE ACCLOG.SYS EVERY 1/2 HOUR INDICATING BASICALLY THE
 	AMOUNT OF TIME SPENT IN  USER,SYSTEM AND IDLE STATES.
 
 	BECAUSE OF THE BULK OF DATA BEING ACCUMULATED,  WE DECIDED THAT
 	WE WOULD PERIODICALLY DO A "COMPRESS" OF THE ACCLOG.SYS FILE.
 	IN EFFECT, WHAT IS DONE, ON A HALF HOURLY BASIS, UNDER EACH
 	UIC, FOR EACH TASK, WE SUM ALL THE ACTIVITY AND OUTPUT A
 	SINGLE RECORD TO A TASK FILE CALLED...
 	
 			[1,6]MMDDHH.PAC
 
 	MM = 2 DIGIT MONTH,  DD = 2 DIGIT DAY,  HH = 2 DIGIT HOUR.
 
 	THE SYSTEM ACTIVITY DATA IS OUTPUT TO A SEPARATE FILE CALLED...
 
 			[1,6]MMDDHH.KAC   --   KERNAL ACTIVITY.
 
      - PROGRAM ..ACL. "HOOKS" INTO VARIOUS PARTS OF THE OPERATING
 	SYSTEM AND THEREFORE IF ABORTED,  WILL CRASH THE SYSTEM.
  	A VERY SMALL PROGRAM ...ACF CAN BE INVOKED TO SHUT DOWN
 	THE ACL PROGRAM PEACEFULLY,  IT FLAGS ..ACL. THAT IT
 	IS TIME TO GO AND ACL SHUTS ITSELF DOWN.
 
 
 
1
 
 
      -	BOTH PROGRAMS ACF AND ACL ARE WRITTEN TO LINK WITH
 	RSX11M V3.1 ONLY.  NEW VERSIONS AND ESPECIALLY NEW LEVELS
 	OF THE OS WILL REQUIRE MODIFICATIONS TO THE ACCOUNTING
 	PROGRAMS.
 
      - A FORTRAN-V-PLUS PROGRAM CALLED ...CPR IS USED TO COMPRESS
 	OUTPUT OF THE PROGRAM ..ACL. OUTPUT.  THIS TASK SHOULD BE
 	INSTALLED AND SCHEDUALED TO RUN EVERY 6 OR 12 HOURS.
 	(MORE FREQUENTLY IF LIMITED DISK SPACE IS AVAILABLE).
 
 	THE PROGRAM ...CPR SEQUENCE OF EVENTS FOLLOW...
 
  		- SHUT OFF PROGRAM ..ACL. BY INVOKING PROGRAM ..ACF
 		- OPEN FILE [1,6]ACCLOG.SYS;(LATEST VERSION)
 		  WITH A DISPOSITION OF DELETE ON EXIT.
 		- RE-INITIATE PROGRAM ..ACL.
 		- READ THROUGH THE ACCLOG.SYS FILE COPYING
 		  THE PROGRAM DATA TO A SCRATCH RANDOM ACCESS
 		  DATA FILE.  ALSO, OUTPUTTING ANY KERNAL
 		  ACTIVITY TO THE MMDDHH.KAC FILE.
 		- ASSEMBLE THE DATA FROM THE SCRATCH FILE
 		  OUTPUTTING TO FILE MMDDHH.PAC IN AN ORDERLY
 		  COMPRESSED FORM.
  		- EXITING (AT WHICH TIME THE ACCLOG.SYS FILE
 		  IS DELETED).
 
      - ANOTHER PROGRAM CALLED ACLSUM (ALSO FORTRAN) WILL SIMPLY
 	PRINT OUT THE DATA CONTAINED IN THE ACCLOG.SYS FILE.
 
      - IN OUR STARTUP COMMAND FILE, WE HAVE --
 
 		>INS [1,200]ACF
 		>INS [1,200]ACL22
 		>INS [1,200]CPR
 		>SET /UIC=[1,6]
 		>RUN ..ACL.
 		>RUN ...CPR 6H/RSI=6H
 
 	THIS INITIATES THE ACCOUNTING PROCESS AT BOOTSTRAP TIME
 	AND SCHEDUALS A COMPRESSION OF THE ACCOUNTING DATA EVERY
 	SIX HOURS.
 
1
 
 
 
      - PROGRAM ...CPR MAY BE ACTIVATED 3 WAYS...
 
  		1) >CPR
 			THIS IS THE NORMAL RUN WHERE ACF IS INITIATED
 			ACL DIES, THE ACCOUNTING FILE IS OPENED,
 			ACL IS RE-STARTED AND THE COMPRESSION TAKES
 			PLACE.
 
 		2) >CPR END
 			THIS COMMAND IS IN OUR SHUTUP.CMD FILE AS FOLLOWS,
 
 				>SET /UIC=[1,6]
 				>CPR END
 
 			THIS IS THE SAME AS 1) EXCEPT THAT ..ACL. IS
 			NOT RE-STARTED.
 
 		3) >CPR ACCLOG.SYS;4
  			THIS WILL COMPRESS FILE ACCLOG.SYS;4.
 			IT WILL NOT AFFECT THE CURRENT OPERATION
 			OF PROGRAM ..ACL. IN ANY WAY.  ITS NORMAL
 			USAGE IS FOR COMPRESSING ACLLOG.SYS FILES
 			THAT WERE OPEN DURING A SYSTEM CRASH (AFTER
 			UNLOCKING THEM).
 
      - PERIODICALLY AND ESPECIALLY AT THE END OF EACH MONTH, THE ".KAC"
 	AND ".PAC" FILES SHOULD BE APPENDED TO A MONTHLY ACCUMULATION
 	FILE USING PIP.
 
  		>PIP KERN##.ACL/AP=MMDDHH.KAC
 		>PIP PROG##.ACL/AP=MMDDHH.PAC
 
 	** THIS MUST BE DONE IN CRONALOGICAL ORDER,  ##  IS A 2 DIGIT
 	   NUMBER REPRESENTING THE MONTH.  IT IS PROBABLY A GOOD IDEA
 	   TO INCLUDE ANOTHER 2 DIGITS TO REPRESENT THE YEAR.  FUTURE
 	   MODIFICATIONS OF ...CPR MAY ENABLE DAILY, MONTHLY OR
 	   YEARLY COMPRESSIONS AS WELL.
 
      - NO TERMINAL USAGE IE LOGON AND LOGOFF IS ACCOUNTED FOR.  THE
 	PLAN IS TO INCLUDE THIS IN THE FUTURE.  AS WELL AS
 	SET /UIC=[?,?] SO THAT ACTUAL TERMINAL OR LINK TIME MAY ALSO
 	BE ACCOUNTED.  THIS WILL INCLUDE THE PHYSICAL TERMINAL UNIT
 	NUMBER AS WELL AS THE UIC NUMBER.  IN OUR CASE, WE HAVE
 	TERMINALS THAT RANGE FROM $1500 THROUGH $8000 IN VALUE AND
 	EXPECT TO PURCHASE AN INTERACTIVE GRAPHICS TERMINAL THAT
 	WILL BE VERY EXPENSIVE.  LOGON TIME ASSOCIATED WITH THE
 	ACTUAL TERMINAL USED WILL HELP IN JOB COSTING.
 
      - ANOTHER QUICKIE PROGRAM CALLED ...SRP WILL GENERATED A
 	PRINTER GRAPH FROM THE KERN##.ACL FILE.  SEE THE ATTACHED
 	XEROX.
1
 
 
 
      - PROGRAM ..ACL. CURRENTLY WILL CHEW UP 32 WORDS (I THINK)
 	OF DSR FOR EACH TASK THAT IS ACTIVE UP TO A MAXIMUM OF
 	24 TASKS.
 
      - ALL TIMES IN THE ACCOUNTING FILE DATA ARE IN TICKS EXCEPT
 	FOR THE HHMMSS IN THE 1/2 HOUR KERNAL DATA.  ALL DEVICE
 	ACTIVITY IS IN TERMS OF COUNT OF QIO CALLS.
 
      - THE COMPRESSION PROGRAM REDUCES THE TASK NAMES TO 3
 	CHARACTERS.  THE ONLY EXCEPTION TO THIS IS WHEN A
 	TASK IS NOT INSTALLED AND INVOKED USING >RUN PROG.
 	THIS WILL BE INTERCEPTED BY ..ACL. AS PROGRAM
 	TT##,  IN THIS CASE, THE TASK NAME IS SIMPLY CHANGED
 	TO TT .
 
      - LOOK AT PROGRAL ACCLOG TO DERIVE THE FORMAT OF THE
 	ACLLOG.SYS DATA STRUCTURE.
 
      - NO GENERAL REPORTING PROGRAM HAS YET BEEN WRITTEN.  THERE
 	SEEMS TO BE A VERY DEVIOUS BUG IN THE ACCOUNTING PAROGRAM
 	THAT WILL CRASH THE SYSTEM ABOUT ONCE A DAY (NON-PREDICTABLE).
 	CURRENTLY ONE OF DEC'S SOFTWARE PERSONS IS HAVING A LOOK
 	AT ..ACL., HOPEFULLY IT WILL BE CORRECTED SOON.
 
      - FOR THE FORTRAN AND MACRO PROGRAMS,  ALL TKB, F4P AND
 	MAC ".CMD" FILES HAVE BEEN INCLUDED.
 
 
   				GOOD LUCK
