Page 1¶
NORD SOFTWARE LIBRARY DISKETTE¶
CONTAINING¶
SINTRAN-III ACCOUNTING SYSTEM
DIRECTORY NAME¶
ND-10315R
USER NAME¶
FLOPPY-USER
| FILE | NAME |
|---|---|
| 0 | (ND-10315R:FLOPPY-USER)ACC-SERV-FR-I:BFUN;1 |
| 1 | (ND-10315R:FLOPPY-USER)ACCRT-I:BFUN;1 |
25 SEPTEMBER 1981
Page 2¶
NORSK DATA A/S NORD SOFTWARE LIBRARY¶
PROGRAM DESCRIPTION
PRODUCT NAME¶
| ND-NUMBER: CATEGORY |
|---|
| 10315B : P |
SINTRAN-III ACCOUNTING SYSTEM
| ND-NUMBER FOR SOURCE |
|---|
| 10314B |
ISSUED¶
| DATE 81.09.21 | BY (INITIALS) MJH |
COMPUTERS¶
| X 10 | . 12 | . 50 | X 100! | . 500! | . . . |
INSTR. SET¶
| . 48 BIT FL. | . 32 BIT FL. | . COMMERCIAL |
OP. SYSTEM¶
| X SIN III VS! | . SIN III RT! | . ALONE | . . . . . . . . |
DOCUMENTATION¶
| NUMBER: ........ |
TITLE: See the enclosed sheets.
PURPOSE¶
To produce accounting information.
PROGRAMS¶
| PROG. NUMB. | NAME | TYPE | CONTAINING |
|---|---|---|---|
| 203073B | ACC-SERV-PROG | BIN | Accounts processor. |
| 203074B | ACCRT | BIN | Accounts RT-program. |
LOADING/OPERATING PROCEDURE, USE¶
Under user SYSTEM:
@PLACE-BINARY ACC-SERV-PROG
@DUMP ACC-SERV-PROG 40000 40000
or
@DUMP-REENTRANT ACC-SERV-PROG 40000 40000 (ND:F-U)ACC-SERV-PROG:BPUN
To load the ACCRT real-time program to segment:
@RT-LOADER
*READ-BINARY (ND:F-U)ACCRT:BPUN 32 Y
*END-LOAD
*EX
NOTE¶
!!!!!
This version of the ACCRT RT-program has addresses for the F-version of SINTRAN. To run it under the E-version the following changes should be made after loading ACCRT to segment 32:
@LOOK
100351/ 13473 % OLD 13552
100353/ 13467 % OLD 13553
100557/ 13467 % OLD 13553
100560/ 13503 % OLD 13567
.
Page 3¶
NORSK DATA A/S NORD SOFTWARE LIBRARY¶
REVISION LOG¶
| PRODUCT | NAME | ND-NUMBER |
|---|---|---|
| SINTRAN-III ACCOUNTING SYSTEM | 10315B |
| ISSUED | DATE 81.09.21 | BY (INITIALS) MJH |
|---|---|---|
| REASON | DIFFERENT ENVIRONMENT | |
|---|---|---|
| X ERROR CORRECTION | X CHANGE/ADDITION |
| FILES | PROG.NUMBER: NAME |
|---|---|
| CHANGED | 203073B ACC-SERV-PROG |
| OR NEW | 203074B ACCRT |
| FILES |
CHANGES¶
ACC-SERV-PROG:¶
- The program now works correctly on 32 and 48 bit floating point arithmetic machines.
- SIN-540 no longer applies to this version.
- In the commands DUMP-AND-ACCUMULATE and PRINT-ACCUMULATED-ACCOUNT, the question SHORT-ACCUMULATION has been replaced by the question SHORT-LISTING.
- Minor errors corrected.
ACCRT:¶
- This version is for the F-version of SINTRAN.
- Minor errors corrected.
Page 4¶
ACCOUNTING SECTION OF THE SYSTEM SUPERVISOR MANUAL¶
3.4. THE ACCOUNTING SYSTEM¶
This system provides the facility to account for usage of certain of the computer system’s resources. Options can be chosen when your SINTRAN III is generated to permit accounting of:
- Cpu time used for background users, RT-programs and ND-500 users.
- Connect time for background users accessing a NORD-10, ND-100 or ND-500.
- Block IO transfers through the file system (1K pages written to or read from files on disk).
- Number of pages printed on printers to which output is spooled using the ND Spooling System.
The accounting system consists of:
- Pointers, flags and tables within SINTRAN
- SINTRAN commands
- Files belonging to user SYSTEM
- An RT-program to provide RT-accounting (option)
- A service program to manage the accounting files and to produce reports from the accounting data collected.
It is the system supervisor’s responsibility to supervise the accounting system. (In the following information references to RT-accounting can be ignored if your SINTRAN has not been generated with RT-accounting.) The following files must be created:
| File | Description |
|---|---|
| ACCOUNTS:DATA | This is an indexed file; its structure and contents are given in TABLE III. |
| PROJNAM:DATA | This is an indexed file; its structure and contents are given in table I. |
| RTPROJ:DATA | This is an indexed file; its structure and contents are given in table II. |
Once these files have been created they should be given the access specified in the tables. Using the ACCOUNTS-SERVICE-PROGRAM, desired combinations of PROJECT NAME / PROJECT PASSWORD should be entered into PROJNAM:DATA and desired combinations of RT-PROGRAM NAME / PROJECT NAME should be entered into RTPROJ:DATA. The supervisor should notify users of their PROJECT-NAMES and PROJECT-PASSWORDS.
Accounting should be initialized with the SINTRAN command $INIT-ACCOUNTING. After initialization accounting should be controlled by $START-ACCOUNTING (preferably in the LOAD MODE file) and $STOP-ACCOUNTING.
Page 5¶
ACCOUNTING UNDER SINTRAN III¶
SYSTEM SUPERVISOR MANUAL¶
The accounting data accumulated in ACCOUNTS:DATA should be periodically dumped to the file AACCOUNTS:DATA using the ACCOUNTING-SERVICE-PROGRAM, which will create this file and the file AACCOUNTS:ISAM. The ACCOUNTING-SERVICE-PROGRAM can be used to maintain the accounting file and also to produce accounting reports.
TABLE I: THE FILE PROJNAM:DATA¶
This contains the legal combinations of PROJECT PASSWORD and PROJECT NAME and should have access:
- PUBLIC: NONE
- FRIEND: NONE
- OWNER: READ, WRITE, APPEND, COMMON, DIRECTORY
Format of PROJNAM:DATA file:
- Block size: 16 words (Decimal; all words are 16 bit)
- Block 0: word 1 (first word): index of last block in file. (=0 if file is empty)
- Block n:
- words 1-8 PROJECT-PASSWORD
- words 9-16 PROJECT-NAME
Project password and project name are both ASCII character strings with unfilled character positions containing spaces (ASCII 40 Octal). They are not terminated by apostrophes.
TABLE II: The file RTPROJ:DATA¶
Each user RT-program can be associated with a PROJECT NAME. The RT-PROGRAM NAME / PROJECT NAME pairs are stored in this file. It should have access:
- PUBLIC: NONE
- FRIEND: READ
- OWNER: READ, WRITE, APPEND, COMMON, DIRECTORY
This file is maintained by the ACCOUNTING-SERVICE-PROGRAM.
Format of RTPROJ:DATA file:
- Block size: 12 words (decimal)
- Block 0: word 1 (first word): index of last block in file.
- Block n:
- words 1-4 RT-PROGRAM NAME (Upper case; no parity set)
- words 5-12 PROJECT-NAME
RT-program name and project name are both ASCII character strings with unfilled character positions containing ASCII spaces (ASCII 40 Octal). They are not terminated by apostrophes.
Page 6¶
ACCOUNTING UNDER SINTRAN III¶
SYSTEM SUPERVISOR MANUAL¶
TABLE III: STRUCTURE AND CONTENTS OF ACCOUNTS: DATA¶
Block size : 28 words (decimal)
Block 0 :
word 1 - No. of records on the file.
word 2 - desired No. of accounts.
word 3 - maximum No. of accounts.
Block n : Format of entries¶
| WORD | BACKGROUND | RT | SPOOLING | ND-500 |
|---|---|---|---|---|
| 0 | USER NAME | RT-PROGRAM | USER NAME | USER NAME |
| 1 | NAME | |||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | ||||
| 10 | 0 (BACKGROUND) | 1 (RT) | 2 (SPOOLING) | 3 (ND-500) |
| 11 | LOGOUT TIME | DUMP TIME | PRINT TIME | LOGOUT TIME |
| 12 | ||||
| 13 | TERMINAL TIME | 0 | 0 | TERMINAL |
| 14 | 0 | 0 | TIME | |
| 15 | TERMINAL No. | 0 | SPOOL DEV No. | 0 |
| 16 | TIME USED | TIME USED | No. OF PAGES | ND-500 CPU |
| 17 | PRINTED. | TIME USED | ||
| 20 | PROJECT NAME | PROJECT NAME | PROJECT NAME | PROJECT NAME |
| 21 | ||||
| 22 | ||||
| 23 | ||||
| 24 | ||||
| 25 | ||||
| 26 | ||||
| 27 | ||||
| 30 | BLOCK IO | BLOCK IO | 0 | 0 |
| 31 | TRANSFERS | TRANSFERS | 0 | 0 |
FORMAT OF THESE ENTRIES¶
BLOCK IO TRANS.¶
The number of pages read from or written to disk files in the file system. This is not necessarily the same as the number of pages read and written from a user's program.
DUMP TIME¶
This contains the time and date when the RT system-usage data were dumped to the file by the ACCR program. All times and dates are packed by SINTRAN packs them, i.e. year, month, day, hour, minute and...
Page 7¶
ACCOUNTING UNDER SINTRAN III¶
SYSTEM SUPERVISOR MANUAL¶
| Field | Description |
|---|---|
| LOGOUT TIME | The time and date when the user logged out. |
| No. OF PAGES | Total number of pages printed including header and trailer. |
| PRINT TIME | The time printing of the file started. |
| RT-PROGRAM NAME | The name (in SINTRAN III) of the RT-program. |
| SPOOL. DEV. No. | The number of the device on which the printing took place. |
| TERMINAL NUMBER | The terminal at which the background user was working. |
| TERMINAL TIME | This is a FORTRAN integer (see NORD FORTRAN Ref. manual appendix B for definition of data types), giving the period of time the terminal was logged in. (Usually 20 ms) |
| TIME USED | A FORTRAN integer giving the CPU time used in basic time units. |
| PROJECT NAME | An ASCII character string containing the project name. Unused character positions are filled with spaces (ASCII 40 Octal) and there is no apostrophe at the end. |
| USER NAME | An ASCII character string containing the user name. Unused character positions are filled with spaces and there is no apostrophe after the name. |
3.5. SINTRAN III ACCOUNTING COMMANDS¶
The following commands are the principal accounting commands and are restricted to user system:
$START-ACCOUNTING <Background>[,<RT>,<Clear logged information>,<Logging interval>[,<ND-500>]]
The answer to the first question is YES or NO. If and only if the SINTRAN system on your machine has RT-accounting the next question will be asked. If this is answered YES the following two questions must be answered:
<Reset-accounting-tables> must be answered YES or NO; it refers to an RT-accounting table (ACCTAB) in SINTRAN III in which CPU time used by RT-programs is stored and to that part of the IO accounting table (IOACCTAB) used for accumulating filesystem IO for RT-programs. When these tables are reset, the entries for all user RT-programs are set equal to zero.
Page 8¶
Accounting Under SINTRAN III¶
System Supervisor Manual¶
To start RT-accounting system, the RT-program ACCRT must have been loaded.
$STOP-ACCOUNTING¶
$STOP-ACCOUNTING <Background>[,<RT>][,<ND-500>]
The answers are YES or NO.
$INIT-ACCOUNTING¶
$INIT-ACCOUNTING <desired number of accounts>,
<maximum number of accounts>,
<background>[,<RT>,<clearing logged information>,
<logging interval>],<ND-500>]
This command initializes the file ACCOUNTS:DATA, creating it if it does not exist. The number of accounts before warning and the maximum number of accounts may be specified. Default values are 500 and 600 respectively. The command then continues in the same way as the START-ACCOUNTING command.
INIT-ACCOUNTING resets the ACCOUNTS:DATA file and should only be used the first time the ACCOUNTING is started. If other values for DESIRED... and MAXIMUM... are required later, the command DUMP-AND-ACCUMULATE in the ACCOUNTING-SERVICE-PROGRAM should be used and the ACCOUNTS:DATA file contents will not be lost.
When background accounting is running the command processor will ask for the PROJECT PASSWORD when a user tries to log in. The user answer is read with no-echo and checked against legal values. If the password is correct, the PROJECT NAME is printed on the terminal, if it is incorrect the question is repeated. After three unsuccessful attempts to give a valid PROJECT PASSWORD the LOGOUT command is automatically executed.
If there are no entries in the PROJNAM:DATA file log in will be as if background accounting were not running.
RT accounting is started by the command START-ACCOUNTING and the CPU time used by those programs specified as parameters to the command START-RT-ACCOUNT is accumulated.
$START-RT-ACCOUNTING¶
$START-RT-ACCOUNTING <RT-program-name>
The parameter
RT-description address is used as index in the tables ACCTAB and IOACCTAB and if the RT-program is reloaded using another RT-description it is necessary to STOP-RT-ACCOUNT for this program (before reloading) and START-RT-ACCOUNTING after reloading the program.
Page 9¶
ACCOUNTING UNDER SINTRAN III
SYSTEM SUPERVISOR MANUAL
$STOP-RT-ACCOUNTING \<RT-program-name>
RT-ACCOUNTING is stopped for the specified RT-program.
$LIST-RT-ACCOUNT
The names of all .RT-programs being logged will be listed on the terminal with the PROJECT-NAME and the time used since last dump of the RT-accounting-table
3.6. ACCRT Program¶
This program dumps the RT-program accounting-tables on the file ACCOUNTS:DATA. It is delivered on diskette as ACCRT:BPUN and loaded onto segment 32 using the READ-BINARY command in the RT-LOADER, i.e.
$RT-LOADER
*READ-BINARY ACCRT:BPUN 32
*YES
*END-LOAD
*EXIT
ACCRT is started by commands $START-ACCOUNTING or $INIT-ACCOUNTING and stopped by the command $STOP-ACCOUNTING.
3.7. THE ACCOUNTING-SERVICE-PROGRAM¶
This program should be loaded according to the PD-sheets delivered with the diskettes.
3.7.1. ESSENTIAL PRECAUTION¶
The ACCOUNTING-SERVICE-PROGRAM makes use of ND ISAM to store accounting records. There is always a possibility that an error will leave the ISAM files (in this case AACCOUNTS:DATA and AACCOUNTS:ISAM) in an inconsistent state. It is essential to take adequate back up of these files before using the ACCOUNTING-SERVICE-PROGRAM if any of the following commands are to be used:
- DUMP-AND-ACCUMULATE
- DELETE-ACCUMULATED-USER
- DELETE-ACCUMULATED-PROJECT
3.7.2. COMMANDS¶
These are indicated by a leading asterisk in the body of the text.
- HELP
- EXIT
Page 10¶
Accounting Under SINTRAN III¶
System Supervisor Manual¶
RESET-BACKGROUND-PROJECT-TABLE
CREATE-BACKGROUND-PROJECT
DELETE-BACKGROUND-PROJECT
LIST-BACKGROUND-PROJECTS
RESET-RT-PROJECT-TABLE
CREATE-RT-PROJECT
DELETE-RT-PROJECT
LIST-RT-PROJECTS
DUMP-AND-ACCUMULATE
LOOK-ACCUMULATED
DELETE-ACCUMULATED-PROJECT
DELETE-ACCUMULATED-USER
PRINT-ACCUMULATED-ACCOUNTS
*HELP¶
Lists all available commands on the terminal.
*EXIT¶
Stops the ACCOUNTING-SERVICE program. The time used is printed by the program on the TERMINAL.
*RESET-BACKGROUND-PROJECT-TABLE¶
The word giving the number of records written onto the file PROJNAM:DATA, is set to zero.
*CREATE-BACKGROUND-PROJECT <project-password>,<project-name>¶
Specifies PROJECT-PASSWORDS and their corresponding PROJECT-NAMES. The entries are stored as records in the file PROJNAM:DATA which is read during the LOG IN routine when ACCOUNTING is on. A PROJECT-PASSWORD not in this file will not be accepted during LOG IN. The PROJECT-PASSWORD must be unique. If there are no entries on the file users will be able to LOG IN as if accounting is not running.
*DELETE-BACKGROUND-PROJECT <project-name>¶
Deletes entries from the PROJNAM:DATA file. Background projects should not be deleted whilst background accounting is running.
*LIST-BACKGROUND-PROJECTS <outputfile>¶
Lists PROJECT-PASSWORDS and their corresponding PROJECT-NAMES from entries on the PROJNAM:DATA file.
*RESET-RT-PROJECT-TABLE <rt-program-name>,<rt-project-name>¶
The word giving the number of entries in the file RTPROJ:DATA is set to zero.
*CREATE-RT-PROJECT <rt-program-name>,<rt-project-name>¶
Associates an RT-PROGRAM-NAME with a PROJECT-NAME. Specified entries are stored on the file RTPROJ:DATA and used when START-RT-ACCOUNTING is specified. An RT-program name can only occur once in the file. Only USER RT-programs (not SYSTEM RT-PROGRAMS) can be.
Page 11¶
ACCOUNTING UNDER SINTRAN III¶
SYSTEM SUPERVISOR MANUAL¶
accounted; there is no check in the ACCOUNTING-SERVICE program but there is in SINTRAN.
*DELETE-RT-PROJECT <rt-program-name>¶
Deletes entries from the RTPROJ:DATA file. RT-projects should not be deleted whilst RT-accounting is running.
*LIST-RT-PROJECT¶
Lists the entries in the file RTPROJ:DATA; i.e. RT-program and their corresponding RT-PROJECT-NAMES.
*DUMP-AND-ACCUMULATE¶
This command accumulates the data contained in the file ACCOUNTS:DATA for each project name and each user name (RT-program name) and writes it to the file AACCOUNTS:DATA as the INTERMEDIATE values (see table IV) in each record for each project and each user. These totals are also added to ACCUMULATED totals in these records. Thus the intermediate values contain the resource usage between the last and preceding DUMP-AND-ACCUMULATE command for each project and each user name. The accumulated values contain the total resource utilisation to the last DUMP-AND-ACCUMULATE command. The values in the table of accounts by user name/project name given by this command are those from the intermediate entries. An optional log can be produced from the data in ACCOUNTS:DATA.
The command asks the following questions:
| Question | Response |
|---|---|
| RESET ACCOUNTING FILE | : <yes/no> |
| DO YOU WANT A LOG | : <yes/no> |
| DO YOU WANT ACCOUNTING BY USER NAME | : <yes/no> |
| DO YOU WANT ACCOUNTING BY PROJECT NAME | : <yes/no> |
| DO YOU WANT A SHORT LISTING | : <yes/no> |
| OUTPUT FILE (DEFAULT IS LINE-PRINTER) | : <file name> |
| LINES PER PAGE (DEFAULT IS 55) | : <No. of lines> |
RESET ACCOUNTING FILE¶
If this is answered YES following questions are asked:
1. Required number of accounts before warning: <No. of accounts>
2. Maximum number of accounts: <No. of accounts>
Default values for these parameters are 500 and 600 respectively.
When the ACCOUNTS:DATA file is reset, the first three words are given the values zero and the answers specified in questions 1. & 2. The zero is the number of accounts currently in the file.
When the warning limit is reached the error-message "APPROACHING END OF ACCOUNTING FILE" is given on the terminal on each logout whilst accounting is running. When the maximum number of accounts is reached the message "END OF ACCOUNTING FILE ENCOUNTERED" is written on the terminal at each logout.
Page 12¶
ACCOUNTING UNDER SINTRAN III¶
SYSTEM SUPERVISOR MANUAL¶
With this command the accounting file can be expanded while the accounting is running, even after a warning error-message.
ACCOUNTING LOG¶
This prints number of one line entries derived from the data in ACCOUNTS:DATA on the output file. The USER NAME (or RT-PROGRAM NAME), PROJECT NAME, terminal number (if applicable), connect time, cpu time used, number of spooling pages printed, number of block I/O transfers through the file system, log in time and date, and logout time and date are listed on each line. The order is in increasing logout time and date.
ACCOUNTING BY USER/PROJECT NAME¶
These can be produced for USER (RT-PROGRAM) NAME, PROJECT NAME or both. For each USER NAME a table is produced showing the total usage by this user and sub-totals by project name. The accumulated data are for console time, cpu time, number of pages printed and block IO transfers. The magnitude of the usage and its percentage of the whole are given. Similar tables are produced for the accounts by PROJECT NAME but with sorting on the project name as the primary key and sub-totalling on the user name.
SHORT LISTING¶
This gives accounting by user / project name but with no sub-totalling.
*LOOK-ACCUMULATED <user-name>/<project-name>
To look at a specific entry in the AACCOUNTS:DATA. Ie. accumulated accounts for a given user or project name.
DELETE-ACCUMULATED-PROJECT <project-name> and
DELETE-ACCUMULATED-USER <user-name>
Removes a specific PROJECT or USER from the file AACCOUNTS:DATA.
PRINT-ACCUMULATED-ACCOUNTS¶
This produces a listing of the accounts up to the last dump of the ACCOUNTS:DATA file sorted by the user name or project with or without sub-totalling as in the case of DUMP-AND-ACCUMULATE. The data is from the ACCUMULATED entries in the file ACCOUNTS:DATA and gives system useage up to the last DUMP-AND-ACCUMULATE command.
This asks the following questions:
| Question | Answer |
|---|---|
| DO YOU WANT ACCOUNTING BY USER NAME | :yes/no |
| DO YOU WANT ACCOUNTING BY PROJECT NAME | :yes/no |
| DO YOU WANT A SHORT LISTING | :yes/no |
| OUTPUT FILE (DEFAULT IS LINE-PRINTER) | :\<file name> |
| LINES PER PAGE (DEFAULT IS 55) | :\<No. of lines> |
Page 13¶
ACCOUNTING UNDER SINTRAN III¶
SYSTEM SUPERVISOR MANUAL¶
These parameters have the same meaning as for DUMP-AND-ACCUMULATE.
TABLE IV: FORMAT OF RECORDS IN AACCOUNTS:DATA¶
Format of the ISAM records in the AACCOUNTS:DATA file.
| Word | Type | Explanations |
|---|---|---|
| 1-8 | CHARACTER*16 | User Name or RT-PROGRAM name. |
| 9-16 | CHARACTER*16 | Project Name |
| 17-18 | DOUBLE INTEGER | Accumulated CPU time |
| 19-20 | DOUBLE INTEGER | Accumulated CONSOLE time |
| 21-22 | DOUBLE INTEGER | Accumulated number of page printed |
| 23-24 | DOUBLE INTEGER | Intermediate CPU time |
| 25-26 | DOUBLE INTEGER | Intermediate CONSOLE time |
| 27-28 | DOUBLE INTEGER | Intermediate number of page printed |
| 29-30 | DOUBLE INTEGER | Accumulated No. of block I/O transfers |
| 31-32 | DOUBLE INTEGER | Intermediate No. of block I/O transfers |