.FL SUBSTITUTE
.PS 58,80
.STHL 4
.LM 10
.RM 70
.SP1
.NHY
.FG 20
.C ;AKCOUNT
.C ;-- VAX/VMS V3.x ACCOUNTING SOFTWARE --
.B
.C ;by
.B
.C ;Ken Trumbley
.C ;Martin Serrer
.B
.SDT 1,3,1985
.C ;$$DAY-$$MONTH-$$YEAR
.PS 58,70
.IFNOT CONREQ
.IF CONGET
.LM 10
.RM 70
.PG
.REQUIRE "AKDOC.RNT"
.ENDIF CONGET
.ENDIF CONREQ
.NFL SUBSTITUTE
.LM 10
.RM 70
.CH Introduction
.LM 10
.HL 1 Introduction:
.LM +3
.P
The AKCOUNT software has been designed to provide a VAX
computer installation running V3.x of VMS operating system software
with all the necessary accounting tools to charge users for resources
used. The package includes all the source code plus various
command procedures as well as installation notes.
.P
The software in SYSTEMS LABORATORY of NRC has been set up as a
batch job to execute every Friday night. When the job runs, the
information from the system accounting file, plus listing files
from DISKQUOTA and AUTHORIZE are merged together and written to
a file "SYS$ACCOUNT:AKCOUNT.TOT". A report generator reads this
file and creates detailed or summary type printouts.
.P
The future of this software greatly depends on the differences between
version 3 and version 4 system accounting files. In order to
simplify the upgrade, the code which extracts information
from the system accounting file is incorporated in one subroutine.
If the differences are as drastic as seen back in the version 2/3
upgrade, more subroutines may need some work.
.LM 10
.RM 70
.CH AKCOUNT INSTALLATION
.LM 10
.HL 1 installation
.LM +3
.P
We at Systems Lab. installed the AKCOUNT software in a subdirectory
off the system managers account. Because the AKCOUNT software must
restart accounting as well as run various system images, it was
convenient to use the power of the system managers account with all
its privileges. If in your installation, it is desired to place
the software source code somewhere else, that is no problem because
no logical names point to the source code directory. The only logical
name to be defined is SYS$ACCOUNT and it points to the location of the
executable images for AKCOUNT. The following details the installation
of the AKCOUNT software as we at NRC have placed it.
.LS
.LE;Login to the system managers account which should put you at
SYS$SYSROOT:[SYSMGR]
.LE;Copy the distributed source files to a subdirectory.
We placed the files at SYS$SYSROOT:[SYSMGR.ACCOUNT.SOURCE]
.LE;Define a system wide logical name SYS$ACCOUNT to point to where
you want the executable images and data files to reside.
We chose SYS$SYSROOT:[SYSMGR.ACCOUNT].
.LE;Edit the site specific system startup file "SYS$MANAGER:SYSTARTUP.COM"
and include the file [SYSMGR.ACCOUNT.SOURCE]SYSTARTUP.TXT into it.
This small file contains the system assignment for the logical name
SYS$ACCOUNT plus a few DCL commands which restarts the AKCOUNT
batch job every time the system is rebooted. See appendix B for
a copy of SYSTARTUP.TXT.
.PG
.LE;Copy the batch command files AKCOUNT.COM and AKRUN.COM to SYS$ACCOUNT:
.LE;Edit SYS$ACCOUNT:AKRUN.COM and do the following:
.LM+1
.LS 0,"-"
.LE;Look for the line :
.LIT
"$	AKTIME FRIDAY,23:59:59"
.EL
and if you want the AKCOUNT software to run on a specific day at a
certain time then replace the day and time, for example, to run
on Monday at noon then change the line to:
.LIT
"$	AKTIME MONDAY,12:00:00"
.EL
Note: The form of the day and time string is VERY unforgiving so
be careful to follow the example exactly.
.LE;The next 30 lines of AKRUN.COM are the commands necessary to
produce the desired detailed and summary printouts. A more detailed
explanation of the report generator switches and capabilities are
described in section 3.2 with examples of the various
printouts in appendix C. The four possible printout formats are
 described as
WEEKLY SUMMARY, YEAR TO DATE SUMMARY, DETAILED SINGLE USER, and
DETAILED SINGLE USER WITH CHARGE RATE TABLE. Each may be enabled
by uncommenting the appropriate lines. Note that the report
generator can be run at any time, interactively, to produce any of
the printout formats.
.LE;The line which does a PRINT/DELETE of all AKCOUNT.LIS files
should be modified if you want to keep the files or direct them
to another printer queue.
.LE;This completes the editting of the file AKRUN.COM.
.ELS
.LM-1
.LE;Edit the file AKCONFIG.INC and using the description of each
parameter as described in section 2.2, modify all necessary values
to suit your site environment.
.LE;Build the AKCOUNT software with the command "$ @AKBUILD.COM".
.LE;Set default directory to  SYS$ACCOUNT:
.PG
.LE;Start the AKCOUNT batch job running with the command
"$ @SYS$ACCOUNT:AKCOUNT RESTART". Note that the batch job can
be started with the parameter "RESTART", "OLD" and no parameter
which defaults to "NORMAL". The RESTART parameter forces the
procedure to reschedule the job to the next day specified by
the line "AKTIME FRIDAY,23:59:59"  in AKRUN.COM.
The OLD parameter forces the procedure
to assume that the system accounting file has already been renamed
to ACCOUNTNG.OLD and then runs DISKQUOTA, AUTHORIZE and AKCOUNT.EXE.
This places a new set of user records at the end of the file
AKCOUNT.TOT. Normally the OLD parameter is not used unless for
some reason the AKCOUNT batch job did not run successfully. The
last possibility is no parameter, which defaults to NORMAL running
of the complete batch job.
.ELS
.PG
.LM 10
.HL 1 Configuration:
.LM +3
.P
The items which can be easily modified are contained in a file called
"AKCONFIG.INC". Each time the accounting software is compiled, this
file is included. It is advisable to edit AKCONFIG.INC before building
AKCOUNT the first time. Currently the parameters defined, are the
values we at SYSTEMS Laboratory use. Our charging scheme is based
on the charges set by the NRC Computation Center which is run on a
profit basis. We on the other hand do not plan on making a profit as
we do not charge laboratory personnel for computer time, rather, we
only charge some outside companies. Appendix A is a copy of the
AKCONFIG.INC file.
The following table describes each parameter and its significance.
.LS
.LE;TOTAL__REPLACEMENT__COST -- This value is the total cost of
replacing the computer system hardware
plus all peripherals. If your system
was originally purchased as a "system" then DEC do not mind supplying
prices each year. We at SYSTEMS LAB. purchased our VAX as an upgrade
which means "bits and pieces", so every year when we ask DEC for
current replacement costs, we get very slow response. We deduct all
discounts from this value as well. This value is only used in the
calculation of CHG__RATE described below.
.LE;YEARLY__MAINTENANCE -- This parameter is the total cost of
your hardware and software maintenance contracts with DEC for one
year plus any other software or hardware
maintenance costs for non-DEC equipment
and software. We deduct all discounts from this cost. This value
is only used in the calculation of CHG__RATE described below.
.PG
.LE;CHG__RATE -- This is a value calculated as the total replacement
cost of the VAX hardware plus the yearly hardware and software
maintenance costs divided by the number of working hours in a year.
Since our computer tends to be used 99.9% of the time during normal
working hours, we calculate the charge rate accordingly. If your
VAX is used more extensively, then the CHG__RATE equation can be
modified as long as any new variables are defined explicitly
at the beginning of the file "AKCONFIG.INC". The charge rate is used
in the calculation of the following 13 parameters.
.LE;P__CNT__TIM__RATE and N__CNT__TIM__RATE are parameters which
describe the cost per hour during prime time and non-prime time
for each hour a user is logged onto the VAX regardless of what
the user is doing. This is commonly called connect time.
.LE;P__CPU__TIM__RATE and N__CPU__TIM__RATE are parameters which
define the cost per hour during prime time and non-prime time
for each CPU hour a user uses.
.LE;P__BAT__TIM__RATE and N__BAT__TIM__RATE  are parameters which
define the cost per hour for batch CPU prime time and non-prime time.
.LE;PRT__PAG__RATE and PRT__JOB__RATE are parameters which concern
print jobs. PRT__PAG__RATE is the cost per printed page.
PRT__JOB__RATE is the cost per print job where in our lab, each
user removes their own printout from the printer which tends to
waste 3 extra pages per job. If your lab has an operator tend the
line printer it may be necessary to adjust these two values.
.LE;VOL__MNT__RATE is the cost for each volume mounted. In our lab
users load their own magtapes and disks so the cost tends to be lower.
Because they do very little volume mounting, the cost tends to be
higher. The overall effect of charging users for volume mounting
therefore is negligible. In your environment, if you have an operator
mounting tapes or disks, this cost should be higher.
.PG
.LE;BUF__IO__RATE and DIR__IO__RATE is the cost for each buffered
and direct I/O to such devices as terminals, disk drives and magtape
drives. These values impact the most on users of such packages as
CAD stations where large amounts of communications goes on between
the VAX and terminals as well as a lot of file manipulation.
Large CPU bound jobs do not get charged at all from these parameters
except possible in page faulting.
.LE;PAG__FLT__RATE is the cost per page fault. Any program which
has been poorly designed will be affected by this parameter. Users
who become familiar with the costs per page fault often ask how
they can make their programs more efficient.
.LE;DSK__BLK__RATE is the cost per week for each disk block
currently in use. Users with savings in mind should be made
aware of the cost of keeping old unused copies of programs or
even multiple copies of programs around.
.LE;PRIME__START__HOUR, PRIME__START__MINUTE, PRIME__END__HOUR
and PRIME__END__MINUTE define the limits of prime time for the
AKCOUNT software package. In our lab, we work from 8am to 4:15pm
so have set the four parameters accordingly.
.LE;HEADER__STR is a string variable in which a subtitle string
is stored. Each printout from the report generator, AKREPORT.EXE,
has this subtitle included. This variable is defined as:
CHARACTER*80 so limit the string length to 80 characters.
.LE;END__FISCAL__DAY and END__FISCAL__MONTH define the end of a
fiscal year. In the Canadian government, the fiscal year is
April 1 to March 31 so these two parameters are set to March 31.
.ELS
.LM 10
.RM 70
.CH AKCOUNT CODE DESCRIPTION
.LM 10
.HL 1 AKCOUNT.EXE Description:
.LM +3
.P
This image gathers all relevant accounting information from
various files and condenses it into a more compact form which
will then be readable by the report writer AKREPORT.EXE.
Three input and one output files are used by this image.
.LIT

Input files :

 1) SYS$SYSTEM:SYSUAF.LIS
     -  Created by AKCOUNT.COM, the USERNAME,
        UIC and ACCOUNT are extracted from here
 2) SYS$SYSTEM:DSKUSG.LIS
     -  Created by AKCOUNT.COM, the
        DISKBLOCKS/UIC currently being used
        is extracted from here.
 3) SYS$ACCOUNT:ACCOUNTNG.OLD
     -  Created by the VMS Accounting Manager,
        the extension is changed from .DAT to
        .OLD by AKCOUNT.COM otherwise it is
        untouched. From here all other good
        things like CPU time,Pages printed,etc.
        is extracted.

Output file :

 1) SYS$ACCOUNT:AKCOUNT.TOT
     -  This is the file containing the
        condensed accounting information. It is
        organized as a sequential access file
        with fixed length records of 128 Bytes.
        This file grows each time the
        AKCOUNT.EXE image is run by
        ( # of users x 128 ) bytes.
.EL
.PG
.LM 10
.HL 1 AKREPORT.EXE Description:
.LM +3
.P
The report generator is design to be run interactively. In order to
run it from a command procedure, the logical name SYS$OUTPUT should
be assign to be a file. An example of this can be seen in the procedure
"AKCOUNT.COM". Generally speaking the report generator (depending on
the switches set in the command line) extracts the necessary
information from the file SYS$ACCOUNT:AKCOUNT.TOT and creates the
required listing which is normally displayed on the users terminal.
Examples of the various printouts are shown in appendix C.
The command switches available are:
.LIT

           Command Switches
           ----------------

/SUMMARY         - Printout should be in the form
                   of one line per username.
                   Default = NOSUMMARY, detailed
                   printout where each user record
                   is displayed as one terminal
                   screen full.
/INPUT=filename  - User records will be extracted
                   from this file instead of
                   SYS$ACCOUNT:AKCOUNT.TOT
/OUTPUT=filename - Printout will be inserted
                   in this file instead of going
                   to the user's terminal.
                   Default = User's terminal. If
                   filename not included, default
                   is AKREPORT.LIS
/BEGIN=date      - Start search for user records
                   from this date. Defaults to
                   latest user records in file.
/END=date        - End search of AKCOUNT file as
                   of that date, defaults to latest
                   user records in file.
/PRINT           - Send output file defined by
                   OUTPUT switch to line printer.
                   File is deleted after printing.
/RATE_TABLE      - Append current charges per
                   resource, table at end of listing.
/NOTOTAL         - Disable totalize of all user
                   resources and charges.
                   Default = TOTALIZE.
.EL
.PG
.LIT
           Command Switches
           ----------------


/SORT=USERNAME   - Sort printouts by one of these
      ACCOUNT      fields, (default = USERNAME)
      UIC          ( Sort in ascending order )
      DISK_USAGE
      PRINTED_PAGES
      CHARGES
/DSORT=USERNAME  - Sort printouts by one of these
      ACCOUNT      fields, (default = USERNAME)
      UIC          ( Sort in descending order )
      DISK_USAGE
      PRINTED_PAGES
      CHARGES
/ACCOUNT=account - Printout only those users who
                   are in this account.
/LAST_LOGIN      - Date the user last logged into
                   their account.


NOTES:
      1. The date and filenames described above have
         the following forms, (DO NOT insert spaces
         in strings). The filename is optional and
         defaults to that as described for the
         appropriate command switch.
           date     = 2-JAN-1984
           filename = SYS$ACCOUNT:AKCOUNT.Y83
      2. The command switches are checked for the
         first three characters being correct.
.EL
.PG
.LM 10
.HL 1 AKTIME.EXE Description:
.LM +3
.P
The AKTIME program accepts as input a day of the week and a time
in the format, ie. MONDAY,13:00:00 . It then calculates an absolute
and delta time from current time till requested time. The results
are saved as symbols in the process' local symbol table. These symbols
can then be used by such DCL commands as "SUBMIT/AFTER='ABSOL__DATE'.
Various other symbols are also defined at the same time. The following
list describes each symbol.
.LIT

DELTA_DATE  - This is the number of days,hours,minutes
              and seconds from the current SYSTEM time
              to the time specified in the input.
ABSOL_DATE  - This is the day,month,year and time
              specified in the input.
AK_DATE     - Day,month,year and time for AKCOUNTing, where
              if the fiscal year changes then AK_DATE is
              set to the end of the fiscal year.
AK_FISCAL   - Flag = "YES" when end of fiscal year crossed
              else = "NO".
AK_START    - Day,month,year for start of current fiscal year
CURRENT_DAY - This Symbol contains the current DAY-OF-WEEK
               ( ie. CURRENT_DAY = "WEDNESDAY")
NEXT_DAY    - This Symbol contains the DAY-OF-WEEK for tomorrow
               ( ie. NEXT_DAY = "THURSDAY")
.EL
.PG
.LM 10
.HL 1 AKCONVERT.EXE Description:
.LM +3
.P
The AKCONVERT program converts NRC's old accounting format to
the new AKCOUNT format. The previous accounting package at NRC was taken
from the DECUS Tape -- VAX81A under directory [VAX81A.ACCNTNG]. If your
accounting package is currently the same, (hopefully with few
modifications), as our previous package then this program may save or
possible create some trouble for you.
.P
The old format placed all accounting source and executable files in
a directory [SYSMGR.ACCOUNT]. All accounting data files were in
subdirectories depending on the fiscal year, for example,
[SYSMGR.ACCOUNT.FY83]. The data files should consist of many versions
of each type file, one for each week:
.LIT
    VMS V3.x System accounting file -- ACCOUNTNG.OLD
    VMS V2.x System accounting file -- ACCOUNTNG.DAT
    Accounting charges file         -- CHARGES.DAT
    Disk usage by username file     -- DSKUSG.DAT
.EL
If your current accounting software conforms to that previously
described,
then in order to run AKCONVERT.EXE, set your default directory to
be the location where all the data files are, for example,
[SYSMGR.ACCOUNT.FY83]. After typing RUN AKCONVERT.EXE, the user is
prompted for the version number of the oldest DSKUSG.DAT file.
Normally the response to this question should be "1". From this point
onwards, AKCONVERT opens each weeks data files and creates a
file called SYS$ACCOUNT:AKCOUNT.TOT which is the total of all the
data files. When AKCONVERT finishes with all the data files, it
prints the message "CONVERSION COMPLETED!". It is up to the user, once
the file SYS$ACCOUNT:AKCOUNT.TOT has been verified to be good to
delete the data files which have just been used by AKCONVERT.
.P
Verification of the file SYS$ACCOUNT:AKCOUNT.TOT can be done by running
AKREPORT.EXE and if the information compares with printouts from the
old accounting package, then everything turned out as one mostly hopes
for. If any errors occurred then you may be one of the unlucky majority.
Our only suggestion would be to start collecting the accounting data
from this point on, rather than to try and solve the problems in running
AKCONVERT.EXE.
.LM 10
.RM 70
.CH PROBLEMS, RESTRICTIONS and PATCHES
.LM 10
.HL 1 AKCOUNT problems:
.LM +3
.LS
.LE;Several accounts with the same UIC will cause problems as the first
account alphabetically will be charged with all the disk space while
all the other accounts with this same UIC will be charged with zero
disk blocks. This is an inherent problem of VMS.
.ELS
.LM 10
.HL 1 AKCOUNT restrictions:
.LM +3
.LS
.LE;At the time of generating the AKCOUNT code, we at NRC, set the
parameters END__FISCAL__DAY/MONTH in the file AKCONFIG.INC to be
March 31. These parameters are only used in AKTIME.FOR. Setting these
parameters to be other than the end of a month has not been tested.
Of course the code looks good but thats no substitution for actual
testing.
.ELS
.PG
.LM 10
.HL 1 AKCOUNT patches:
.LM +3
.LS
.LE;25-Jun-1984
.P
Fixed problem where a username has been removed from
the SYSUAF file and the AKCOUNT software finds a valid record for that
account. The software added this username to the list of valid users
but the name itself was padded with nulls rather then spaces as normal
valid usernames were. The same problem was seen in the account field.
The fix comprised two patches, one to AKGETREC.FOR and one to
AKTOTALS.FOR. The patch to AKGETREC was to prevent this problem from
happening again while the patch to AKTOTALS was to fix the problem
in the AKCOUNT.TOT file if it has happened before without notice.
.LE;31-Jul-1984
.P
Added NOTOTAL, PRINT, OUTPUT command switches so user can
request a detailed
printout of all resources used and their total cost for a single account
to be sent to the user's terminal or saved in a file or printed to the
line printer. The default for AKREPORT has been set to TOTALIZE so that
if a user makes an error in a request and the printout is directed to
the line printer, the file printed will be small instead of large.
The patches were made to the AKREPORT.FOR, AKPRINT.FOR, AKSWITCH.FOR, and
AK.INC routines.
.P
Fixed problem with RATE__TABLE command switch. This
switch should have forced a printout of the VAX cost per resource table
for both summary and detailed printouts. Unfortunately, the table was
not printed when the SUMMARY command switch was used. The patch to correct
this problem was made to the AKPRINT.FOR routine.
.P
Modified AKCOUNT.COM by breaking it apart into
site dependent, (AKRUN.COM) and site independent, (AKCOUNT.COM) command
files.
.PG
.LE;2-Nov-1984
.P
Added SORT and ACCOUNT switches to AKREPORT code. Fixed printout so extra
form feed to printer removed. Added ACCOUNT field to summary printout.
.LE;1-Feb-1985
.P
Added new sorting fields PRINTED_PAGES and CHARGES, as well as adding
a descending sort switch /DSORT. Added a new switch /LAST_LOGIN, which
replaces the fields "Log count" and "Log fail" in summary printouts
with the field "Date of last login". This field was added to the
single user printout as well.
.P
Fixed problem where SORT routine wasn't called for default command
switch.
.LE;1-Mar-1985
.P
Fixed problem with form feeds in output going to a file.  The problem
occured in AKPRINT.FOR when using the following command:
.LIT

    $ RUN AKREPORT
     Account name : */SUMMARY/PRINT/BEGIN=1-JAN-1985/NOTOTAL

.EL
.LE;1-Apr-1985
.P
Fixed problem with new AKCOUNT.TOT file being created before it
should be at fiscal year end. The problem was in AKTIME.FOR. The
problem can be repaired if the user users a great deal of caution.
The AKCOUNT.TOT files can be editted with the EDT editor. The user
should attempt the editing on copies of the files only!! The
following describes the format of the AKCOUNT.TOT file.
.P
Each line of the AKCOUNT.TOT file describes either the beginning
of a weeks worth of accounting or the detailed user records for
that particular week. The detailed user record always begins with
the character "^@" , (null character). All weekly header records
begin with the character "<DEL>" except for the last header in the
file which has the character "^A".
.ELS
.LM 10
.RM 70
.AX Configuration file -- AKCONFIG.INC
.LM 10
.LIT
C----------------------------------------------------------------------------
C
C		VAX ACCOUNTING CONFIGURATION FILE
C
C  written by:  K. Trumbley
C  date:        April 1984
C----------------------------------------------------------------------------
C  Included in files :  AKREPORT.FOR
C                       AKTRNTIM.FOR
C                       AKTIME.FOR
C
C  TOTAL_REPLACEMENT_COST	The cost of replacing the VAX computer
C				plus all peripherals as of the beginning
C				of the fiscal year less all discounts.
C
C  YEARLY_MAINTENANCE		The cost of all hardware and software
C				maintenance for the VAX computer plus
C				maintenance for all peripherals as
C				estimated from previous years, less all
C				discounts.
C
	TOTAL_REPLACEMENT_COST = 434067.00
	YEARLY_MAINTENANCE     =  33732.00
C
	CHG_RATE=(TOTAL_REPLACEMENT_COST+YEARLY_MAINTENANCE)/(240.*8.)
C
C----------------------------------------------------------------------------
.EL
.PG
.LIT
C
C  CHARGE RATES PER ITEM
C  ---------------------
C
C	P_CNT_TIM_RATE		PRIME CONNECT TIME	$/hour
C	N_CNT_TIM_RATE		NONPRIME CONNECT TIME	$/hour
C	P_CPU_TIM_RATE		PRIME CPU TIME		$/hour
C	N_CPU_TIM_RATE		NONPRIME CPU TIME	$/hour
C	P_BAT_TIM_RATE		PRIME BATCH TIME	$/hour
C	N_BAT_TIM_RATE		NONPRIME BATCH TIME	$/hour
C	PRT_PAG_RATE		PAGES PRINTED		$/page
C	PRT_JOB_RATE		PAGES/JOB ADJUSTMENT	$/print job
C	VOL_MNT_RATE		VOLUMES MOUNTED		$/mount
C	BUF_IO_RATE		BUFFERED I/O BLOCKS	$/IO
C	DIR_IO_RATE		DIRECT I/O BLOCKS	$/IO
C	PAG_FLT_RATE		PAGE FAULTS		$/fault
C	DSK_BLK_RATE		DISK BLOCK STORAGE	$/block
C
	P_CNT_TIM_RATE = CHG_RATE/100.0
	N_CNT_TIM_RATE = CHG_RATE/1000.0
	P_CPU_TIM_RATE = CHG_RATE/1.0
	N_CPU_TIM_RATE = CHG_RATE/10.0
	P_BAT_TIM_RATE = CHG_RATE/5.0
	N_BAT_TIM_RATE = CHG_RATE/50.0
	PRT_PAG_RATE   = CHG_RATE/5000.0
	PRT_JOB_RATE   = CHG_RATE*3/5000.0
	VOL_MNT_RATE   = CHG_RATE/100.0
	BUF_IO_RATE    = CHG_RATE/1000.0
	DIR_IO_RATE    = CHG_RATE/1000.0
	PAG_FLT_RATE   = CHG_RATE/1000.0
	DSK_BLK_RATE   = CHG_RATE*7/100.0
C
C----------------------------------------------------------------------------
C
C  Prime time and Non-prime time definitions
C
	PRIME_START_HOUR=8
	PRIME_START_MINUTE=0
	PRIME_END_HOUR=16
	PRIME_END_MINUTE=15
C
C----------------------------------------------------------------------------
C
C  Header string definition for the various printouts
C
	HEADER_STR='NRC  Systems Laboratory -- M3'
C
C----------------------------------------------------------------------------
C
C  Define end of fiscal year
C
	END_FISCAL_DAY=31
	END_FISCAL_MONTH=3
C
C----------------------------------------------------------------------------
.EL
.LM 10
.RM 70
.AX SYSTARTUP.TXT File
.LM 10
.LIT
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$!	INCLUDE FILE FOR SYS$MANAGER:SYSTARTUP.COM
$!
$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
$!
$! start accounting in batch queue
$! test SYS$BATCH to see if AKCOUNT job already present,
$! if not, restart accounting.
$!
$	ASSIGN/SYSTEM SYS$SYSROOT:[SYSMGR.ACCOUNT] SYS$ACCOUNT
$	ASSIGN/USER SCRATCH.DAT	SYS$OUTPUT
$	SHOW/QUEUE		SYS$BATCH
$	SET_AKCOUNT=1
$	OPEN	INPUT		SCRATCH.DAT
$BA_LOOP:
$	READ/END=TEST_AKCOUNT	INPUT	TEST_LINE
$	TEST_NAME:='F$EXTRACT(26,7,TEST_LINE)
$	IF TEST_NAME .EQS. "AKCOUNT" THEN SET_AKCOUNT=0
$	GOTO BA_LOOP
$TEST_AKCOUNT:
$	CLOSE			INPUT
$	DELETE			SCRATCH.DAT.*
$	IF SET_AKCOUNT .EQ. 0 THEN GOTO FINISHED_TEST
$	@SYS$ACCOUNT:AKCOUNT.COM RESTART
$FINISHED_TEST:
$!
.EL
.LM 10
.RM 70
.AX Report Generator Printout Examples
.LM 10
.LIT
                      DETAILED SINGLE USER LISTING
                      ----------------------------
----------------------------------------------------------------------
 NRC  Systems Laboratory -- M3
 Username : SYSTEM        Account : SYSTEM       UIC : [  1,  4]
 
             Record for   9-FEB-1985  to  16-FEB-1985 
----------------------------------------------------------------------
      PRIME TIME                              NONPRIME TIME
 
 Connect time (h:m) :     35:08         Connect time (h:m) :    116:29
 CPU time     (sec) :      3080         CPU time     (sec) :       789
 BATCH time   (sec) :       127         BATCH time   (sec) :      9488
 
 Disk usage  (blks) :    747618         Volumes mounted    :        31
 Print jobs         :        14         Pages printed      :       516
 Log count          :        78         Login failures     :         0
 Direct I/O count   :    229457         Buffered I/O count :    504825
 Page fault count   :    832179
 Date of last login : 16-FEB-1985
----------------------------------------------------------------------
 CHARGES            $  13249.70
----------------------------------------------------------------------
.EL
.PG
.LIT
             DETAILED SINGLE USER LISTING WITH RATE TABLE
             --------------------------------------------
----------------------------------------------------------------------
 NRC  Systems Laboratory -- M3
 Username : SYSTEM        Account : SYSTEM       UIC : [  1,  4]
 
             Record for   9-FEB-1985  to  16-FEB-1985 
----------------------------------------------------------------------
      PRIME TIME                              NONPRIME TIME
 
 Connect time (h:m) :     35:08         Connect time (h:m) :    116:29
 CPU time     (sec) :      3080         CPU time     (sec) :       789
 BATCH time   (sec) :       127         BATCH time   (sec) :      9488
 
 Disk usage  (blks) :    747618         Volumes mounted    :        31
 Print jobs         :        14         Pages printed      :       516
 Log count          :        78         Login failures     :         0
 Direct I/O count   :    229457         Buffered I/O count :    504825
 Page fault count   :    832179
 Date of last login : 16-FEB-1985
----------------------------------------------------------------------
 CHARGES            $  13249.70
----------------------------------------------------------------------


 	BREAKDOWN OF VAX ACCOUNTING CHARGES
 	-----------------------------------

      NRC  Systems Laboratory -- M3

 Prime connect time rate    ($ per hour) :      2.44
 Nonprime connect time rate ($ per hour) :      0.24
 Prime CPU time rate        ($ per hour) :    243.65
 Nonprime CPU time rate     ($ per hour) :     24.36
 Prime BATCH time rate      ($ per hour) :     48.73
 Nonprime BATCH time rate   ($ per hour) :      4.87
 Printed pages rate         ($ per page) :      0.05
 Print job adjustment rate   ($ per job) :      0.15
 Volume mount rate         ($ per mount) :      2.44
 Buffered I/O rate        ($ per K blks) :      0.24
 Direct I/O rate          ($ per K blks) :      0.24
 Page fault rate          ($ per K flts) :      0.24
 Disk block storage rate  ($ per K blks) :     17.06
.EL
.PG
.LIT
                      SUMMARY LISTING
                      ---------------




                                                ACCOUNTING SUMMARY
                                                ------------------

                                           NRC  Systems Laboratory -- M3                                                   
                                 For time period from 27-OCT-1984  to  3-NOV-1984 


    Username     Account   Diskusage  Print   Log  Log  |       PRIME TIME               NONPRIME TIME      |       CHARGES
                            (blocks)  Pages  Count Fail |  CONNECT   CPU   BATCH  |  CONNECT   CPU   BATCH  |
   --------------------------------------------------------------------------------------------------------------------------
    COURSE       SYSTEM        5951      0     0     0  |    0:00       0      0  |    0:00       0      0  |        101.50
    DECNET       SYSTEM         175      0     0     0  |    0:00       0      0  |    0:00       0      0  |          2.98
    GAMES        SYSTEM       18642      3    25     5  |    2:25    1383      0  |    4:13     995      0  |        426.48
    OPERATOR     SYSTEM          78      0     0     0  |    0:00       0      0  |    0:00       0      0  |          1.33
    SCRATCH      SYSTEM          40     16     0     0  |    0:04       8      0  |    0:00       0      0  |          2.53
    SYSLAB       SYSTEM       66140      2     4     0  |    0:38      65      0  |    0:00       0      0  |       1133.01
    SYSTEM       SYSTEM     1203095    321    49     4  |   30:52    2690     95  |  292:03     363   7785  |      20931.58
   --------------------------------------------------------------------------------------------------------------------------

          TOTALS =          1294121    342    78     9      34:00    4146     95     296:17    1358   7785         22599.41
.EL
