.TITLE GET_RMI .IDENT /V01-001/ ;++ ;1 GET_RMI ; Program to monitor resource usage on the node it is executed on. In a ; cycle, $GETRMI is executed gathering resource related items for the system. ; The returns are processed through CNTRPRC (which see) ;2 Inputs ; Logical name PFM_CYCLE (System table) is translated. If present ; (and correct) it is the number of seconds to wait between cycles. ; If not present or not correct (not a number) default = 3600 ; Logical name PFM_ALERT_THRESH (System table). If present ; (and correct) it is the number compared to any alert priority ; and if the alert priority is lower than this number, an opcom ; is not generated. ; If not present or not correct (not a number) default = 10 Range is 1-255 ; Logical name GET_RMI_MIN_THRESH (System table). If present ; (and correct) it is the number compared to any value calculated ; and if the value is lower than this number, an opcom is generated. ; If not present or not correct (not a number) default = 10 Range is 1-255 ; ; The translation is performed at the end of each cycle so is dynamic. ;2 Outputs ; Each result is validated and passed to CNTRPR. See this file ; for detail. ;2 Modifications ; 001 PB Oct 2001 CREATION ;-- ; Definitions .library /CNTPRC.MLB/ CNTRPRCDEF $ACCDEF $RMIDEF $JPIDEF $LcKDEF $LNMDEF ; Local symbols ; Array offsets ; Following are the RMI items collected. as each is a .long, the data ; is collected into an array with the following offsets. ; The first 2 .longs of the array are used for timestamp. COLLTIME = 0 ;Binary time stamp RMI_BLKAST = 8 ;Returns the number of blocking ast's. RMI_BUFIO = 12 ;Returns the number of buffered I/O's RMI_DEQ = 16 ;Returns the number of DEQ operations. RMI_DIRIO = 20 ;Returns the number of direct I/O's RMI_DLCKSRCH = 24 ;Returns the number of deadlock searches. RMI_DLCKFND = 28 ;Returns the number of deadlocks found. RMI_DZROFLTS = 32 ;Returns the number of demand zero page faults. RMI_ENQCVT = 36 ;Returns the number of ENQ conversion operations. RMI_ENQNEW = 40 ;Returns the number of new ENQ operations. RMI_ENQNOTQD = 44 ;Returns the number of ENQ operations not queued. RMI_ENQWAIT = 48 ;Returns the number of ENQ operations forced to wait. RMI_FAULTS = 52 ;Returns the number of page faults since last system initialization. RMI_FCPCALLS = 56 ;Returns the total number of calls to the FCP. RMI_FCPCACHE = 60 ;Returns the total number of cache hits by the FCP. RMI_FCPCPU = 64 ;Returns the total number of CPU tics used by the FCP. RMI_FCPFAULT = 68 ;Returns the number of FCP page faults. RMI_FCPHIT = 72 ;Returns the total number of window hits tics used by the FCP. RMI_FCPREAD = 76 ;Returns the total number of disk reads by the FCP. RMI_FCPSPLIT = 80 ;Returns the number of split transfers performed by the FCP. RMI_FCPWRITE = 84 ;Returns the total number of disk writes by the FCP. RMI_FREFLTS = 88 ;Returns the number of page faults from the free list. RMI_FRLIST = 92 ;Returns the number of pages on the freelist. RMI_GVALFLTS = 96 ;Returns the number of global valid page faults. RMI_ISWPCNT = 100 ;Returns the number of process inswaps. RMI_LOGNAM = 104 ;Returns the number of logical name translations RMI_MBREADS = 108 ;Returns the number of mailbox reads RMI_MBWRITES = 112 ;Returns the number of mailbox writes RMI_MODLIST = 116 ;Returns the number of pages on the modified page list. RMI_MFYFLTS = 120 ;Returns the number of page faults from the modified list. RMI_NUMLOCKS = 124 ;Returns the total number of locks. RMI_NUMRES = 128 ;Returns the total number of resources. RMI_PREADIO = 132 ;Returns physical page read I/O's. RMI_PREADS = 136 ;Returns the number of pages read. RMI_PWRITES = 140 ;Returns the number of pages written. RMI_PWRITIO = 144 ;Returns physical page write I/O's. RMI_SYSFAULTS = 148 ;Returns the number of system page faults. RMI_WRTINPROG = 152 ;Returns the number of page faults from a write in progress. ; Results array ; The data is collected and processed such that the counts since last ; collection is produced. On each iteration: ; Get new counts in NEWRESULTS ; Calc seconds since last collection ; Result = new_count - old_count /seconds (count/sec since last) ; proc/disp recults BLKAST = 4 ;Returns the number of blocking ast's. BUFIO = 12 ;Returns the number of buffered I/O's DEQ = 20 ;Returns the number of DEQ operations. DIRIO = 28 ;Returns the number of direct I/O's DLCKSRCH = 36 ;Returns the number of deadlock searches. DLCKFND = 44 ;Returns the number of deadlocks found. DZROFLTS = 52 ;Returns the number of demand zero page faults. ENQCVT = 60 ;Returns the number of ENQ conversion operations. ENQNEW = 68 ;Returns the number of new ENQ operations. ENQNOTQD = 76 ;Returns the number of ENQ operations not queued. ENQWAIT = 84 ;Returns the number of ENQ operations forced to wait. FAULTS = 92 ;Returns the number of page faults since last system initialization. FCPCALLS = 100 ;Returns the total number of calls to the FCP. FCPCACHE = 108 ;Returns the total number of cache hits by the FCP. FCPCPU = 116 ;Returns the total number of CPU tics used by the FCP. FCPFAULT = 124 ;Returns the number of FCP page faults. FCPHIT = 132 ;Returns the total number of window hits tics used by the FCP. FCPREAD = 140 ;Returns the total number of disk reads by the FCP. FCPSPLIT = 148 ;Returns the number of split transfers performed by the FCP. FCPWRITE = 156 ;Returns the total number of disk writes by the FCP. FREFLTS = 164 ;Returns the number of page faults from the free list. FRLIST = 172 ;Returns the number of pages on the freelist. GVALFLTS = 180 ;Returns the number of global valid page faults. ISWPCNT = 188 ;Returns the number of process inswaps. LOGNAM = 196 ;Returns the number of logical name translations MBREADS = 204 ;Returns the number of mailbox reads MBWRITES = 212 ;Returns the number of mailbox writes MODLIST = 220 ;Returns the number of pages on the modified page list. MFYFLTS = 228 ;Returns the number of page faults from the modified list. NUMLOCKS = 236 ;Returns the total number of locks. NUMRES = 244 ;Returns the total number of resources. PREADIO = 252 ;Returns physical page read I/O's. PREADS = 260 ;Returns the number of pages read. PWRITES = 268 ;Returns the number of pages written. PWRITIO = 276 ;Returns physical page write I/O's. SYSFAULTS = 284 ;Returns the number of system page faults. WRTINPROG = 292 ;Returns the number of page faults from a write in progress. ; Function codes, may take on the following values: CTP_V_FNCR = 1 ; Create counter record CTP_V_FNCM = 2 ; Command CTP_V_FNPR = 3 ; Process counter CTP_V_FNDL = 4 ; Delete Record .PSECT RW_DATA, NOEXE, RD, WRT, QUAD, PIC, NOSHR CNTRES: .QUAD JPILST: .WORD 8 .WORD JPI$_NODENAME .ADDRESS NODENAME .ADDRESS NODENAME_DESC .LONG 0 NODENAME: .BLKB 8 NODENAME_DESC: .LONG .-NODENAME .ADDRESS NODENAME .LONG 0 RMIITMLST: ; Array containing items required for the GETRMI call and the subsequent ; processing through CNTRPRC. Combining these avoids problems in processing ; two seperate arrays when they get out of sync. ; Each entry is composed of: ; .word len of rec buffer ; .word RMI code ; .long address of rec buffer ; .long address where GETRMI writes the return length ; .long DataType (CTP processing flags) ; The call to GETRMI is constructed from this list as is the subsequent call ; to CNTRPRC. RMIITMLEN = 16 .WORD 4 .WORD RMI$_BLKAST ;Returns the number of blocking ast's. .LONG NEWRESULTS+RMI_BLKAST .LONG ADDRLEN+RMI_BLKAST .LONG .WORD 4 .WORD RMI$_BUFIO ;Returns the number of buffered I/O's .LONG NEWRESULTS+RMI_BUFIO .LONG ADDRLEN+RMI_BUFIO .LONG .WORD 4 .WORD RMI$_DEQ ;Returns the number of DEQ operations. .LONG NEWRESULTS+RMI_DEQ .LONG ADDRLEN+RMI_DEQ .LONG .WORD 4 .WORD RMI$_DIRIO ;Returns the number of direct I/O's .LONG NEWRESULTS+RMI_DIRIO .LONG ADDRLEN+RMI_DIRIO .LONG .WORD 4 .WORD RMI$_DLCKSRCH ;Returns the number of deadlock searches. .LONG NEWRESULTS+RMI_DLCKSRCH .LONG ADDRLEN+RMI_DLCKSRCH .LONG .WORD 4 .WORD RMI$_DLCKFND ;Returns the number of deadlocks found. .LONG NEWRESULTS+RMI_DLCKFND .LONG ADDRLEN+RMI_DLCKFND .LONG .WORD 4 .WORD RMI$_DZROFLTS ;Returns the number of demand zero page faults. .LONG NEWRESULTS+RMI_DZROFLTS .LONG ADDRLEN+RMI_DZROFLTS .LONG .WORD 4 .WORD RMI$_ENQCVT ;Returns the number of ENQ conversion operations. .LONG NEWRESULTS+RMI_ENQCVT .LONG ADDRLEN+RMI_ENQCVT .LONG .WORD 4 .WORD RMI$_ENQNEW ;Returns the number of new ENQ operations. .LONG NEWRESULTS+RMI_ENQNEW .LONG ADDRLEN+RMI_ENQNEW .LONG .WORD 4 .WORD RMI$_ENQNOTQD ;Returns the number of ENQ operations not queued. .LONG NEWRESULTS+RMI_ENQNOTQD .LONG ADDRLEN+RMI_ENQNOTQD .LONG .WORD 4 .WORD RMI$_ENQWAIT ;Returns the number of ENQ operations forced to wait. .LONG NEWRESULTS+RMI_ENQWAIT .LONG ADDRLEN+RMI_ENQWAIT .LONG .WORD 4 .WORD RMI$_FAULTS ;Returns the number of page faults since last system initialization. .LONG NEWRESULTS+RMI_FAULTS .LONG ADDRLEN+RMI_FAULTS .LONG .WORD 4 .WORD RMI$_FCPCALLS ;Returns the total number of calls to the FCP. .LONG NEWRESULTS+RMI_FCPCALLS .LONG ADDRLEN+RMI_FCPCALLS .LONG .WORD 4 .WORD RMI$_FCPCACHE ;Returns the total number of cache hits by the FCP. .LONG NEWRESULTS+RMI_FCPCACHE .LONG ADDRLEN+RMI_FCPCACHE .LONG .WORD 4 .WORD RMI$_FCPCPU ;Returns the total number of CPU tics used by the FCP. .LONG NEWRESULTS+RMI_FCPCPU .LONG ADDRLEN+RMI_FCPCPU .LONG .WORD 4 .WORD RMI$_FCPFAULT ;Returns the number of FCP page faults. .LONG NEWRESULTS+RMI_FCPFAULT .LONG ADDRLEN+RMI_FCPFAULT .LONG .WORD 4 .WORD RMI$_FCPHIT ;Returns the total number of window hits tics used by the FCP. .LONG NEWRESULTS+RMI_FCPHIT .LONG ADDRLEN+RMI_FCPHIT .LONG .WORD 4 .WORD RMI$_FCPREAD ;Returns the total number of disk reads by the FCP. .LONG NEWRESULTS+RMI_FCPREAD .LONG ADDRLEN+RMI_FCPREAD .LONG .WORD 4 .WORD RMI$_FCPSPLIT ;Returns the number of split transfers performed by the FCP. .LONG NEWRESULTS+RMI_FCPSPLIT .LONG ADDRLEN+RMI_FCPSPLIT .LONG .WORD 4 .WORD RMI$_FCPWRITE ;Returns the total number of disk writes by the FCP. .LONG NEWRESULTS+RMI_FCPWRITE .LONG ADDRLEN+RMI_FCPWRITE .LONG .WORD 4 .WORD RMI$_FREFLTS ;Returns the number of page faults from the free list. .LONG NEWRESULTS+RMI_FREFLTS .LONG ADDRLEN+RMI_FREFLTS .LONG .WORD 4 .WORD RMI$_FRLIST ;Returns the number of pages on the freelist. .LONG NEWRESULTS+RMI_FRLIST .LONG ADDRLEN+RMI_FRLIST .LONG .WORD 4 .WORD RMI$_GVALFLTS ;Returns the number of global valid page faults. .LONG NEWRESULTS+RMI_GVALFLTS .LONG ADDRLEN+RMI_GVALFLTS .LONG .WORD 4 .WORD RMI$_ISWPCNT ;Returns the number of process inswaps. .LONG NEWRESULTS+RMI_ISWPCNT .LONG ADDRLEN+RMI_ISWPCNT .LONG .WORD 4 .WORD RMI$_LOGNAM ;Returns the number of logical name translations .LONG NEWRESULTS+RMI_LOGNAM .LONG ADDRLEN+RMI_LOGNAM .LONG .WORD 4 .WORD RMI$_MBREADS ;Returns the number of mailbox reads .LONG NEWRESULTS+RMI_MBREADS .LONG ADDRLEN+RMI_MBREADS .LONG .WORD 4 .WORD RMI$_MBWRITES ;Returns the number of mailbox writes .LONG NEWRESULTS+RMI_MBWRITES .LONG ADDRLEN+RMI_MBWRITES .LONG .WORD 4 .WORD RMI$_MODLIST ;Returns the number of pages on the modified page list. .LONG NEWRESULTS+RMI_MODLIST .LONG ADDRLEN+RMI_MODLIST .LONG .WORD 4 .WORD RMI$_MFYFLTS ;Returns the number of page faults from the modified list. .LONG NEWRESULTS+RMI_MFYFLTS .LONG ADDRLEN+RMI_MFYFLTS .LONG .WORD 4 .WORD RMI$_NUMLOCKS ;Returns the total number of locks. .LONG NEWRESULTS+RMI_NUMLOCKS .LONG ADDRLEN+RMI_NUMLOCKS .LONG .WORD 4 .WORD RMI$_NUMRES ;Returns the total number of resources. .LONG NEWRESULTS+RMI_NUMRES .LONG ADDRLEN+RMI_NUMRES .LONG .WORD 4 .WORD RMI$_PREADIO ;Returns physical page read I/O's. .LONG NEWRESULTS+RMI_PREADIO .LONG ADDRLEN+RMI_PREADIO .LONG .WORD 4 .WORD RMI$_PREADS ;Returns the number of pages read. .LONG NEWRESULTS+RMI_PREADS .LONG ADDRLEN+RMI_PREADS .LONG .WORD 4 .WORD RMI$_PWRITES ;Returns the number of pages written. .LONG NEWRESULTS+RMI_PWRITES .LONG ADDRLEN+RMI_PWRITES .LONG .WORD 4 .WORD RMI$_PWRITIO ;Returns physical page write I/O's. .LONG NEWRESULTS+RMI_PWRITIO .LONG ADDRLEN+RMI_PWRITIO .LONG .WORD 4 .WORD RMI$_SYSFAULTS ;Returns the number of system page faults. .LONG NEWRESULTS+RMI_SYSFAULTS .LONG ADDRLEN+RMI_SYSFAULTS .LONG .WORD 4 .WORD RMI$_WRTINPROG ;Returns the number of page faults from a write in progress. .LONG NEWRESULTS+RMI_WRTINPROG .LONG ADDRLEN+RMI_WRTINPROG .LONG ITMCNT = .- RMIITMLST/16 RMIITM: .BLKB ITMCNT*12 NEWRESULTS: .BLKL 160 PRERESULTS: .BLKL 160 ADDRLEN: .BLKB 256 RESARRAY: .LONG RMI$_BLKAST ;Returns the number of blocking ast's. .LONG 0 .LONG RMI$_BUFIO ;Returns the number of buffered I/O's .LONG 0 .LONG RMI$_DEQ ;Returns the number of DEQ operations. .LONG 0 .LONG RMI$_DIRIO ;Returns the number of direct I/O's .LONG 0 .LONG RMI$_DLCKSRCH ;Returns the number of deadlock searches. .LONG 0 .LONG RMI$_DLCKFND ;Returns the number of deadlocks found. .LONG 0 .LONG RMI$_DZROFLTS ;Returns the number of demand zero page faults. .LONG 0 .LONG RMI$_ENQCVT ;Returns the number of ENQ conversion operations. .LONG 0 .LONG RMI$_ENQNEW ;Returns the number of new ENQ operations. .LONG 0 .LONG RMI$_ENQNOTQD ;Returns the number of ENQ operations not queued. .LONG 0 .LONG RMI$_ENQWAIT ;Returns the number of ENQ operations forced to wait. .LONG 0 .LONG RMI$_FAULTS ;Returns the number of page faults since last system initialization. .LONG 0 .LONG RMI$_FCPCALLS ;Returns the total number of calls to the FCP. .LONG 0 .LONG RMI$_FCPCACHE ;Returns the total number of cache hits by the FCP. .LONG 0 .LONG RMI$_FCPCPU ;Returns the total number of CPU tics used by the FCP. .LONG 0 .LONG RMI$_FCPFAULT ;Returns the number of FCP page faults. .LONG 0 .LONG RMI$_FCPHIT ;Returns the total number of window hits tics used by the FCP. .LONG 0 .LONG RMI$_FCPREAD ;Returns the total number of disk reads by the FCP. .LONG 0 .LONG RMI$_FCPSPLIT ;Returns the number of split transfers performed by the FCP. .LONG 0 .LONG RMI$_FCPWRITE ;Returns the total number of disk writes by the FCP. .LONG 0 .LONG RMI$_FREFLTS ;Returns the number of page faults from the free list. .LONG 0 .LONG RMI$_FRLIST ;Returns the number of pages on the freelist. .LONG 0 .LONG RMI$_GVALFLTS ;Returns the number of global valid page faults. .LONG 0 .LONG RMI$_ISWPCNT ;Returns the number of process inswaps. .LONG 0 .LONG RMI$_LOGNAM ;Returns the number of logical name translations .LONG 0 .LONG RMI$_MBREADS ;Returns the number of mailbox reads .LONG 0 .LONG RMI$_MBWRITES ;Returns the number of mailbox writes .LONG 0 .LONG RMI$_MODLIST ;Returns the number of pages on the modified page list. .LONG 0 .LONG RMI$_MFYFLTS ;Returns the number of page faults from the modified list. .LONG 0 .LONG RMI$_NUMLOCKS ;Returns the total number of locks. .LONG 0 .LONG RMI$_NUMRES ;Returns the total number of resources. .LONG 0 .LONG RMI$_PREADIO ;Returns physical page read I/O's. .LONG 0 .LONG RMI$_PREADS ;Returns the number of pages read. .LONG 0 .LONG RMI$_PWRITES ;Returns the number of pages written. .LONG 0 .LONG RMI$_PWRITIO ;Returns physical page write I/O's. .LONG 0 .LONG RMI$_SYSFAULTS ;Returns the number of system page faults. .LONG 0 .LONG RMI$_WRTINPROG ;Returns the number of page faults from a write in progress. .LONG 0 .LONG 0 ; Terminator RMIIOSB: .QUAD 0 OUTP: .QUAD 0 FAOBUF: .BLKB 256 FAODESC: .LONG .-FAOBUF .ADDRESS FAOBUF PRMSTR: .ASCID /!36,!UL/ OPCSTR: .ASCID ?PFM: !AC !AC Exceeded. Priority = !UL. !/Please inform MTS (During the day)? ; ; Logical names .ALIGN LONG OUTINT: .LONG RMILOGSTR: .BLKB 255 LNM_LIST: .WORD .-RMILOGSTR .WORD LNM$_STRING .ADDRESS RMILOGSTR .ADDRESS RMILOGBUF_D .LONG 0 RMILOGBUF_D: .LONG .ADDRESS RMILOGSTR LNMTBL: .ASCID /LNM$SYSTEM_TABLE/ RMICYCLOG: .ASCID /PFM_CYCLE/ RMIALTLOG: .ASCID /PFM_ALERT_THRESH/ .align long CDXLT: .LONG WAIT_INTERVAL: .FLOAT 3600.0 ; Default ALTTHRSH: .LONG 10 ; Default REC_KEY: .QUAD ; Nodename here (spc pad) .LONG CTP_FAC_RMI ; Facility reccode: .LONG 0 ; Code .BLKB 96 ; Rest of key THRESHTBL: .ASCIC /Short Term Mimimum / .ASCIC /Short Term Maximum / .ASCIC /Long Term Minimum / .ASCIC /Long Term Maximum / .ASCIC /Minimum Value / .ASCIC /Maximum Value / THRESHTBL_SIZ = 20 .PSECT PROG_CODE, RD, NOWRT, EXE, PIC, SHR, LONG .CALL_ENTRY MAX_ARGS=12, HOME_ARGS=TRUE, - INPUT=, - PRESERVE=, - LABEL=GET_RMI ; CALLS #0,G^XLATE_LOGICALS ; Set controls ; ; Get node we are running on ... $GETJPIW_S ITMLST=JPILST BLBS R0,5$ RET 5$: MOVC5 NODENAME_DESC,NODENAME,#^A/ /,#8,REC_KEY ; Build Item list for RMI call MOVAL RMIITMLST,R6 MOVAL RMIITM,R7 MOVL #ITMCNT,R8 7$: MOVQ (R6),(R7)+ MOVL 8(R6),(R7)+ ADDL #RMIITMLEN,R6 SOBGTR R8,7$ CLRL (R7) ; Terminator 10$: CLRL -(SP) ; AST Prm CLRL -(SP) ; AST PUSHAL RMIIOSB ; IOSB PUSHAL RMIITM ; Itm list CLRL -(SP) ; NULLARG CLRL -(SP) ; NULLARG CLRL -(SP) ; EFN CALLS #7,G^SYS$GETRMI BLBS R0,20$ RET 20$: PUSHAL WAIT_INTERVAL CALLS #1,G^LIB$WAIT ; Pass to cntrprc... MOVAL RMIITMLST,R6 MOVL #ITMCNT,R8 ; Ensure item was returned. ; TSTL @8(R6) ; If zero ... ; BEQL 110$ ; .... Skip Item 100$: MOVZWL 2(R6),RECCODE ; Complete key PUSHAL OUTP PUSHAL REC_KEY PUSHL 12(R6) ; Processing options PUSHL 4(R6) PUSHL #CTP_C_FNPR CALLS #5,G^CNTRPRC BLBS R0,110$ ; RET 110$: CMPW OUTP,#SS$_DATACHECK BNEQU 120$ PUSHAL OUTP PUSHL R6 CALLS #2,G^SEND_ALERT 120$: ADDL #RMIITMLEN,R6 SOBGTR R8,100$ CALLS #0,G^XLATE_LOGICALS ; Reset controls BRW 10$ .CALL_ENTRY MAX_ARGS=12, HOME_ARGS=TRUE, - INPUT=, - PRESERVE=, - LABEL=SEND_ALERT ;++ ;2 SEND_ALERT ; Routine called when CNTRPRC returns SS$_DATACHECK - it has found this ; counter to be outside normal value. ; If alert priority is .lt. logical PFM_ALERT_THRESH alert is suppressed. ;3 Inputs ; .address of RMI structure: ; .word length of buffer where RMI returned current value ; .word RMI code ; .address where RMI wrote the current value ; .address where RMI wrote the length it returned (doesnt work) ; .long datatype and processing options ; .address of status block written by CNTRPRC ; CTP_W_OSTS 0 ; Additional status return ; CTP_W_TRSH 4 ; Threashold that was exceeded ; CTP_W_ESTS 6 ; Final error status ;3 Outputs ; If alert is not suppressed, an OPCOM message is generated and sent. ; Format: ; ;-- MOVL 8(AP),R7 ; Status return CMPW ALTTHRSH,CTP_W_ESTS(R7) ; BLEQU 10$ ; Br if Min set <= RETURN MOVL #SS$_NORMAL,R0 RET 10$: MOVL 4(AP),R6 ; Xlate code PUSHAL CDXLT ; Addr here MOVZWL 2(R6),-(SP) ; (TEMP) CALLS #2,G^XLATE_RMI ; Xlate value exceeded MOVAL THRESHTBL,R8 MOVZWL 4(R7),R9 DECL R9 MULL #THRESHTBL_SIZ,R9 ADDL R9,R8 MOVL #256,FAODESC MOVZWL 6(R7),-(SP) ; Prio PUSHL R8 ; Threshold PUSHL CDXLT ; Counter name PUSHAL FAODESC PUSHAL FAODESC PUSHAL OPCSTR CALLS #6,G^SYS$FAO BLBC R0,100$ ; Skip send on error PUSHAL FAODESC CALLS #1,G^INFORM_OPER 100$: RET .CALL_ENTRY MAX_ARGS=12, HOME_ARGS=TRUE, - INPUT=, - PRESERVE=, - LABEL=XLATE_LOGICALS ;++ ;2 XLATE_LOGICALS ; Routine called once at the beginning and then at the end of each processing ; cycle to translate and set the control logicals. The logicals that may be ; set are: ; Logical Name Default if not present or incorrect ; PFM_CYCLE 3600 ; PFM_ALERT_THRESH 10 ; PFM_CYCLE. Time in seconds to wait between cycles. ; PFM_MIN_THRESH Value below which will cause an alert to be ignored. ; ALerts are generated whenever a current sample is ; found to be outside normal range (as calculated by ; CNTRPRC). They are in range 1-255 where 1 is minor ; and 255 is catostrophic. ; (To be entirely accurate, you can set any logical you like but these ; are the only 2 that will have any effect in this program) ;-- PUSHAL LNM_LIST CLRL -(SP) ; Access mode PUSHAL RMICYCLOG ; Logical PUSHAL LNMTBL ; Table CLRL -(SP) ; No attribute CALLS #5,G^SYS$TRNLNM BLBC R0,5100$ ; Skip on error ; Logical is present ; Convert to FLOAT PUSHAL OUTINT ; Outp PUSHAL RMILOGSTR ; Input PUSHL RMILOGBUF_D ; Num char CALLS #3,G^LIB$CVT_DTB BLBC R0,5100$ ; Skip on error CVTLF OUTINT,WAIT_INTERVAL 5100$: ; Alert threshhold PUSHAL LNM_LIST CLRL -(SP) ; Access mode PUSHAL RMIALTLOG ; Logical PUSHAL LNMTBL ; Table CLRL -(SP) ; No attribute CALLS #5,G^SYS$TRNLNM BLBC R0,5200$ ; Skip on error ; Logical is present ; Convert to INT PUSHAL OUTINT ; Outp PUSHAL RMILOGSTR ; Input PUSHL RMILOGBUF_D ; Num char CALLS #3,G^LIB$CVT_DTB BLBC R0,5200$ ; Skip on error MOVL OUTINT,ALTTHRSH 5200$: RET .END GET_RMI