UWO VAX ACCOUNTING UTILITY COMPUTING AND COMMUNICATIONS SERVICES THE UNIVERSITY OF WESTERN ONTARIO CHRIS LEE & BRENT STERNER - FEBRUARY 1988 Overview r The "master" accounting system at UWO CCS is written in ACCENT ' r on our DECsystem-10, and will be ported to ACCENT ' on the VAX in the next year. The VAX accounting system described herein provides charging records for, and receives update information from, that master system. The VAX/VMS operating system provides an excellent audit trail which can be used in many ways. After significant effort trying to make an interactive product from another site function, and after considering the merits (and cost) of several commercial products, UWO CCS decided to write its own VAX accounting utility from scratch, using VAX C as the programming language. In summary, the UWO accounting utility tracks the VMS audit trail (ACCOUNTNG.DAT) "live", providing users of the VAX with account balances and session cost information. Shift and holiday discounts are implemented, as are special rates for print and batch queues. The Components There are two discrete software components to the system. - DAEMON processor (the heart of the system) - USER interface (communications to the DAEMON) This product is now running on the VAXcluster (8600 and 8550) in CCS at UWO. The latest efforts have been to stabilize the software and to package it suitably for DECUS distribution. The product was designed to fit our shop's unique circumstances, but should be easily extensible by any site having Digital's VAX C compiler. This is our first effort at writing a large package from scratch using "C", and we welcome suggestions and other comments. The User Interface Utility This component provides communication between users and the DAEMON using VMS mailboxes. Several "commands" have been defined to invoke the DAEMON, including LOGIN (so that the DAEMON knows about a new user), COST (so that the DAEMON can report a session cost to a user), and BYE (so that a user can be presented with a charge on his screen which is guaranteed to match the final session bill). Special privileged functions provide control of the system (for example closing of the charging files at midnight and reading in updated account balances when they are determined daily from the master database). The Accounting Daemon This component is the heart of the centralized accounting product for the VAX. It is initiated with system startup files when VMS is booted. Initialization files define necessary rates, holidays, shift discounts, account balances, and the most recent "snapshot" if a restart of the DAEMON is requested. All elements of the system which are likely to change at our site have been defined in these files, so that rebuilding the utility is not a frequent necessity. Periodically, this module reads (beginning where it previously left off) the VMS system accounting file (ACCOUNTNG.DAT) through to its new end of file, and updates the billing file (which is maintained as a parallel file for downstream input to the master accounting system). The period for this processing is defined in the initialization files (one minute works just fine for our system). At specified times, this component closes both the VMS accounting file and the billing file, keeping them in synchronization. At UWO CCS, this occurs daily at midnight. Periodic snapshots are taken of all system users, consolidating charges for the most recent snapshot period. Charging rates may change at any snapshot boundary. At UWO, rate changes occur on the hour, and snapshots occur every 10 minutes. The initialization files define these time frames. On request from any user (through the user interface), a session cost calculation is performed. All information relating to the session cost, are tallied as dollars and cents, and returned to the user via the user interface. On request (again through the user interface), a "preferred" logout process is performed. This first implements the equivalent of the cost request. Then the daemon stops the process and creates the billing record. The charge displayed to the user in this case is remembered, and propagated to the billing file, guaranteeing consistency. All requests from the user interface are processed with a higher priority than timed events. This was done to prevent unacceptable delays during such events as snapshots. Most user interface requests are processed in less than one second elapsed time. The daemon currently runs with elevated priority as a batch job to ensure timely response to user requests. If a user logs off in some other manner, it is his choice. He loses the logoff display of the session cost, but the VMS session termination entry is eventually cut and processed, and the parallel entry still made in the billing file. In this case, the session cost is determined when the daemon "catches" the VMS entry in ACCOUNTNG.DAT. Futures It would be nice to integrate a modified print symbiont with this system, so that the cost of a print task could be displayed on the trailer page. To date, this is still a dream.