.; .; User Monitor Generation Command File .; .; .; This command file has been updated for more automatic generation .; under the new versions of RSX (M V4.0, M-Plus V2.0). As always, .; some of these features are not backward compatible and may cause .; problems on older versions of RSX. The lines which may cause .; problems are flagged with an internal comment line as follows: .; .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .; .SETS VERSN "1.18" .ENABLE SUBSTITUTION .ENABLE GLOBAL .SETS UIC ; ; User terminal monitor program generation procedure ; Version 'VERSN' ; ; This user terminal monitor program is a privileged task which ; continuously runs under RSX-11M to monitor the status of all ; logged-on terminals. It is particularly useful for cleaning up ; otherwise unusable areas of POOL which might be allocated when a ; terminal logs in and would not be released until it logs out. ; ; This monitor program periodically runs through the terminal ; driver data structures looking for logged on terminals. It then ; runs through the active task list looking for the "owning ; terminal" for each task. ; .ASKS NULL Use carriage return to proceed ; ; If a check of the active task list finds no activity on a ; terminal, a counter is bumped to indicate an idle terminal; ; contrariwise, if the terminal is found to have active tasks, the ; counter is reset. ; ; If no activity occurs on the terminal within the first ; monitoring period, a warning is sent to the terminal. ; ; If no activity occurs on the terminal after the first warning ; during the second monitoring period, a second warning is sent to ; the terminal. ; ; If no activity occurs on the terminal after the second warning up ; to one minute before the expiration of the third monitoring ; period, a final warning is sent. If no activity occurs during ; the third monitoring period, the user monitor spawns BYE for that ; terminal. ; .ASKS NULL Use carriage return to proceed ; ; ; Option Generation Phase ; ; ; Specify values in WHOLE MINUTES for these parameters: ; .ASKN [2:33.:10.] MONP1 Enter the length of the first monitoring period ; .ASKN [2:33.:10.] MONP2 Enter the length of the second monitoring period ; .ASKN [2:33.:10.] MONP3 Enter the length of the third monitoring period ; ; Specify a value in WHOLE SECONDS for this parameter: ; .TIME: .ASKN [5.:60.:15.] SECNDS Enter the time between task list checks .; .; Check to see that the number given divides evenly into a minute .; .SETN TEMP 60./SECNDS .SETN TEMP 60.-(TEMP*SECNDS) .IF TEMP EQ 0 .GOTO OK ; ; The number must divide evenly into one minute. ; Valid numbers are: 5, 6, 10, 12, 15, 20, 30, 60 ; .GOTO TIME .OK: .; .; Compute the number of monitoring periods for warning and logout times .; .SETN NO1 (MONP1*60.)/SECNDS .SETS $NO1 "'MONP1'" .SETN TEMP MONP1+MONP2 .SETN NO2 (TEMP*60.)/SECNDS .SETS $NO2 "'TEMP'" .SETN TEMP MONP1+MONP2+MONP3-1 .SETN NO3 (TEMP*60.)/SECNDS .SETS $NO3 "'TEMP'" .INC TEMP .SETN NO4 (TEMP*60.)/SECNDS .SETS $NO4 "'TEMP'" .; .; Create string values for warning time messages .; .SETN WARN2 TEMP-MONP2-MONP1 .SETS $WARN2 "'WARN2'" .SETS $WN2 "0" .TEST $WARN2 .IF EQ 2 .SETS $WN2 "''"+$WARN2[2:2] .SETS $WARN2 "TIME2 = ''"+$WARN2[1:1]+"+<"+$WN2+"*256.>" .SETN WARN1 TEMP-MONP1 .SETS $WARN1 "'WARN1'" .SETS $WN1 "0" .TEST $WARN1 .IF EQ 2 .SETS $WN1 "''"+$WARN1[2:2] .SETS $WARN1 "TIME1 = ''"+$WARN1[1:1]+"+<"+$WN1+"*256.>" ; .ASK DECNET Is DECnet supported on this machine .IFF DECNET .GOTO UICGET ; .ASK NETSUP Do you want idle DECnet HT: terminals logged out .IFF NETSUP .GOTO UICGET .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .PARSE "[," N1 N2 N3 .SETS NETUIC "["+N2+",10]" .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .TESTFILE LB:'NETUIC'RMHPRE.MAC .IF EQ 1 .GOTO UICGET ; ; The user monitor decides how many DECnet HT: terminals are in ; your system by examining RMHPRE.MAC. This file has to be in ; with your DECnet subsystem files somewhere. ; .ASKS NETUIC Enter the UFD on LB: where RMHPRE.MAC can be found [ggg,mmm] .UICGET: .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .PARSE "[," N1 N2 N3 .SETS RSXUIC "["+N2+",10]" .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .TESTFILE LB:'RSXUIC'RSXMC.MAC .IF EQ 1 .GOTO RSUOK ; ; To build the user monitor, it is necessary that a copy RSXMC.MAC ; be present on LB: . If one is not available, you will have to ; define the symbols for your terminal controllers manually in a ; dummy RSXMC.MAC file somewhere on LB: . ; .ASKS RSXUIC Enter the UFD on LB: where RSXMC.MAC can be found [ggg,uuu] .RSUOK: ; ; Idle terminal logouts are printed on the statistic logging device, ; usually CL: or CO: . However, you may direct them anywhere your ; heart desires. ; .ASKS [3:4:"CO:"] CONSOL Enter the device for statistic logging (DDn:) ; ; You can include VT100 cursor control sequences which will do ; some nice things (flash messages, clear screen at logout) if ; the majority of your terminals are VT100 compatible terminals. ; .ASK VT100 Do you want VT100 support in the user monitor ; ; The option exists to build this as a restricted-time task; that ; is, to allow operation only at certain times of day. Typically, ; when built this way, operation is inhibited during the normal ; working day less one hour (8 AM to 4 PM) to make sure that all ; idle terminals are logged out at end of day. ; ; Note that if USERMN is built as a restricted-time task, it will ; enable and disable checkpointing of itself as necessary. ; .SETN $ERHR 0 .SETN $ERMN 0 .SETN $LAHR 0 .SETN $LAMN 0 .ASK TILIM Do you want to build a restricted-time version .IFF TILIM .GOTO NOLIM ; .GETIM: .BEGIN .SETN TMAX (23.*60.)+59. .5: .ASKS [4:5:"08:00"] $ERLY Time to disable operation [00:00 - 23:59] .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .PARSE $ERLY ":" ERHR ERMN .SETN $ERHR 'ERHR'. .SETN $ERMN 'ERMN'. .SETN $ETIM ($ERHR*60.)+$ERMN .IF $ETIM LE TMAX .GOTO 10 ; ; Sorry, that time is not valid. Try again. ; .GOTO 5 .10: .END ; .BEGIN .SETN TMAX (23.*60.)+59. .5: .ASKS [4:5:"16:00"] $LATE Time to enable operation [00:00 - 23:59] .; $$ The following line may cause problems under pre-M V4 / M-Plus V2 systems .PARSE $LATE ":" LAHR LAMN .SETN $LAHR 'LAHR'. .SETN $LAMN 'LAMN'. .SETN $LTIM ($LAHR*60.)+$LAMN .IF $LTIM LE TMAX .GOTO 10 ; ; Sorry, that time is not valid. Try again. ; .GOTO 5 .10: .END .IF $ETIM LT $LTIM .GOTO NOLIM ; ; Your early time - '$ERLY' - is later than your late time, ; '$LATE'. Try again. ; .GOTO GETIM .NOLIM: ; .ASK LIST Do you want a listing of the user monitor ; .ASK MAP Do you want a map of the user monitor ; ; User monitor generation begun at '