SYSTEM DISK MONITOR - SYSDSK_MON OVERVIEW SYSDSK_MONITOR is designed to run as a detached process, submitted at system startup, that monitors the free space on the system disk. Through this monitoring, it will give a warning when the percentage of free space falls below a pre-determined level. The warning is sent to the console device, and pre-determined user(s) (usually the systems manager(s)) if desired. Two things are assumed, that the console device is OPA0:, and that the logical name SYS$SYSDEVICE points to the system disk. If the symbol SYSDSK_THRESHOLD (i.e. SYSDSK_THRESHOLD == 10) is present, it's value is used as the percentage threshold. If not specified, the value of the variable TH_DEFAULT is used. PROCESSING SYSDSK_MON first determines the system disk device by using the translate logical name system routine (SYS$TRNLNM). This logical must point to the system disk. The next step searches for the symbol SYSDSK_THRESHOLD. If the symbol is present, it is converted to an integer and used as the low limit of free space for alarms. If it is not present, then the pre-set limit is used (currently 25%). The nodename for the current node is determined (LIB$GETSYI) for use in the log file. If the logical name SYSDSK_MON_LOG is defined, the nodename is concatenated to the end, and it is used as the log file specification. This log file is written once per hour (presently, this can be altered), and can be used for historical purposes. If not specified, no log file is kept. The log file is created when the program is initially run, and appended to at the determined interval (see above). The file is closed between writes, and opened for append when needed. At this point, an infinite loop is initiated. This loop determines the total blocks and total free-blocks for the system disk. The percentage of free-blocks is determined and a message string is created containing the necessary information (using LIB$SYS_FAO). If it is time to write the log file, if there is one, the file is opened (for append) written to, and closed. The free-block percentage is then checked and if it is below the current threshold, the formated string is sent to the console device (OPA0:) using the system breakthrough routine (SYS$BRKTHRU). Specific users (usually system managers) may also be notified at this time via the breakthrough routine. If the free-block percentage is above the threshold value, no action is taken. A delta time is determined (SYS$BINTIM), a wakeup scheduled (SYS$SCHDWK), and the process hibernates (SYS$HIBER). Upon waking up from the hibernate, the loop repeats. ASSOCIATED FILES SYSDSK_MON.TXT This file. SYSDSK_MON.FOR Source file for SYSDSK_MON.EXE. SYSDSK_MON.EXE Executable image. SYSDSK_MON.COM Command procedure to run SYSDSK_MON.EXE. SYSDSK_MON_START.COM Command procedure submitting SYSDSK_MON.COM as a detached process. Note that SYSDSK_MON.COM may contain the symbol and logical name definitions required. Jay Jenkins