[comp.os.vms] System files and logical names

rlb@rtpark.rtp.ge.COM (Bob Boyd 8*565-3627 23-Sep-1987 0852) (09/23/87)

Summary:  A pointer and an example.

There was a request for information on where some of these are documented.

I believe that the only place the ACCOUNTNG business is documented is
in the fiche and DECUS symposia notes.

The others may be found on page 1-14 of the Guide to VAX/VMS Performance
Management.

There is a discussion of how to reduce system disk I/O -- all of the
following files/directories are heavily accessed on a busy system and
should be considered for moving off of the system disk.  

SYSUAF         RIGHTSLIST           VMSMAIL        NETUAF   
JBCSYSQUE(via START/QUEUE/MANAGER)  SYS$ERRORLOG   SYS$MONITOR  DECNET(account)

Here at our site we have moved all but JBCSYSQUEUE and SYS$ERRORLOG to
other disks.

We actually maintain 2 copies of the authorization files.  The copies on 
the system disk are there as backups and get updated 2 times per day.

Here is what we do in our system startup-- this is a tiny fragment just to
show a way to do this.  This code is invoked 2 times -- first at the
beginning of the startup.  2nd time is after all the disks have been mounted
(24 in our cluster) If the disk that usually has the authorize files on
it did not get mounted then the fallback is the system disk.  The symbol 
"PASS" is derived from the arguments to the procedure containing this 
fragment.  Our procedure containing this fragment is called 
SYS$COMMON:[SYSMGR.STARTUP]SYLOGNAM.COM.  

(Tabs have been converted to blanks)

$ defsys = "define/system/executive"
$!
$! set up uaf device pointers -- ## this must be filled in ##
$!
$ uaf_device = "** put your physical device name here**"
$!
$ defsys        uaf_device        'uaf_device':/tran=conc
$ uaf_exists = f$getdvi("uaf_device","exists")
$ uaf_mounted = "F"
$ if uaf_exists then $ uaf_mounted = f$getdvi("uaf_device","MNT")
$ defsys        uaf_dir                uaf_device:[security],sys$common:[sysexe]
$ if pass.eq.1 .or. .not.uaf_mounted then $ security = "sys$system:"
$ if pass.eq.2 .and. uaf_mounted then $ security = "uaf_dir:"
$ defsys        sysuaf                'security'sysuaf
$ defsys        netuaf                'security'netuaf
$ defsys        rightslist        'security'rightslist
$ defsys        vmsmail                'security'vmsmail
$ defsys        mail$system_flags        7
$ defsys        mail$edit        callable_tpu
$ defsys        mail$tpusecini        tpusecini:
$ defsys        tpusecini        sys$share:eveplus.gbl
$ defsys        shutdown$minimum_minutes 15

Here is what happens at noon and after midnight:

$! secure_update.com -- update authorization database from working copy
$! p1 -- mode, default is null
$! Author:  R.L.Boyd, GE MEC 1985
$ if p1.eqs."STARTUP" then $ goto UPDATE_SECURITY
$ null = ""
$ comma = ","
$ secondary_dir = "uaf_device:[security]"
$ if .not.f$GETDVI(f$PARSE(secondary_dir,,,"device"),"MNT") then $ goto EXIT
$ if f$SEARCH(secondary_dir+"*.*").eqs."" then $ goto EXIT
$! list of files goes here
$ secure_files = "sysuaf,netuaf,rightslist,vmsmail"
$ sec_i = 0
$! get the next file in the list
$SEC_LOOP:
$ sec_name = f$ELEMENT(sec_i,comma,secure_files)
$ if sec_name.eqs.comma then $ goto EXIT
$ sec_i = sec_i+1
$ if sec_name.eqs.null then $ goto SEC_LOOP
$! 
$! see if the primary file has been revised since the last time
$! the backup copy was last revised.
$!
$ from_file = f$SEARCH(secondary_dir+sec_name+".dat")
$ to_file = "sys$common:[sysexe]"+sec_name+".dat"
$ from_date = f$CVTIME(f$FILE(from_file,"RDT"))
$ to_date = f$CVTIME(f$FILE(to_file,"RDT"))
$ if from_date.les.to_date then $ goto SEC_LOOP
$!
$! the file has been updated, so run a copy back to the fallback location
$UPDATE_SECURITY:
$         backup/buff=5/ignore=interlock/log -
                'from_file' -
                sys$common:[sysexe]/own=orig/overlay
$ goto SEC_LOOP
$EXIT:
$ exit
$!Last Modified:   6-JAN-1987 16:05:41.01

This way there is always a fairly current copy of these critical files
even during system boot before all the disks have been mounted.

-----------------------------------------------------------------
 Bob Boyd                     Usenet:    rlb@rtpark.rtp.ge.com
 GE Microelectronics Ctr.     Voice:     (919)549-3627
 POB 13049, MS 7T3-01         GE DIALCOMM:  8*565-3627
 RTP, NC 27709-3049           GE DECnet: RTPARK::RLB