From: norm.raphael@jamesbury.com Sent: Thursday, May 18, 2000 12:37 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: Utility to track device errors @dcl_check check_device.com -*- Charlie Hammond's unsupported DCL checker (Version V2.0) -*- Checking file SYS$COMMON:[SYSMGR.COMMAND]CHECK_DEVICE.COM; Starting Pass 1 -- 18-MAY-2000 12:19:17.93 ... Starting Pass 2 -- 18-MAY-2000 12:19:19.17 ... Starting Pass 3 -- 18-MAY-2000 12:19:19.38 ... Procedure contains: 69 total lines 40 code lines (including 4 lines w/ comments) 2 additional continuation lines 0 lines w/i $DECK/$EOD pairs 20 comment only lines 7 blank lines LINE CODE --DIAGNOSTIC MESSAGE-- 49 LNF label "L1000" not found <==============================Oops! -*- END OF LISTING -*- 18-MAY-2000 12:19:19.67 TMcGrath@cendant.com.au on 05/17/2000 11:21:55 PM Please respond to TMcGrath@cendant.com.au To: Info-VAX@mvb.saic.com cc: Subject: Re: Utility to track device errors On Mon, 15 May 2000 08:45:55 -0400, "AndradeJA-A" wrote: >Considering the fact that our cluster doesn't go down and considering the >fact that >device errors can accumulate in such a way as to make their analysis a minor >headache at best and overly time consuming at worst. Does anyone know of a >utility that regularly logs changes in SHOW ERROR and sends resulting data >to >an output file/email account. > >Jay Andrade - VMS System Manager Hi Jay, Here's what I've been using for many years... It sits in a queue, runs every day, just before I get it at 9am. Cheers from Oz, Tony $! CHECK_DEVICE.COM Tony McGrath, 3-MAR-1993 10:03 $ SAVE_VER = 'F$VERIFY( F$TRNLNM( "CHECK_DEVICE_VERIFY"))' $!----------------------------------------------------------------------- $! Issue the "SHOW ERROR" command and send a mail message to me if any $! new errors are detected. $!----------------------------------------------------------------------- $ ON ERROR THEN GOTO EXIT $ ON CONTROL_Y THEN GOTO EXIT $! $ DEBUG = 0 $ SAY := "WRITE SYS$OUTPUT" $ DSAY := "IF DEBUG THEN WRITE SYS$OUTPUT" $ ERR_FILE = "SYS$SCRATCH:SHOW_ERROR_OUTPUT.LIST" $ MAIL_FILE = "SYS$SCRATCH:SHOW_ERROR_OUTPUT.MAIL" $ DIFF_FILE = "SYS$SCRATCH:SHOW_ERROR_OUTPUT.DIFF" $ DIF$_SAMEFILE = %X006C8009 ! from SYS$MESSAGE:PRGDEVMSG.EXE $ DIF$_FILAREDIF = %X006C8013 $ SHOW$_NOERRORS = %X107880A1 ! from SYS$MESSAGE:CLIUTLMSG.EXE $ THIS_FILE = F$ENVIRONMENT("PROCEDURE") $ WHERE = F$ELEMENT(0,"]",F$PARSE(F$ENVIRONMENT("PROCEDURE"))) + "]" $ SAVE_LOCATION = F$ENVIRONMENT("DEFAULT") $! $! IF F$MODE() .EQS. "BATCH" THEN SET VERIFY $ SET DEFAULT 'WHERE' $!----------------------------------------------------------------------- $! Check for new errors that weren't reported last time. $! Do an initial check to see if there really is an error to report $! If there is do it again sending the output to a file. Then compare $! this file with a previous version to see if $! (a) the is a new device in the list $! (a) one of the counters for a device already reported has incremented $!----------------------------------------------------------------------- $ FOUND_ERROR = 0 $ SHOW ERROR $ IF $STATUS .NE. SHOW$_NOERRORS $ THEN $ SHOW ERROR /OUTPUT='ERR_FILE' $ PURGE 'ERR_FILE' /KEEP=2 $ DIFFERENCES 'ERR_FILE' /OUTPUT='DIFF_FILE' ! /PARALLEL $ FOUND_ERROR = ($STATUS .NE. DIF$_SAMEFILE) $ ENDIF $!----------------------------------------------------------------------- $! $!----------------------------------------------------------------------- $ IF .NOT. FOUND_ERROR THEN GOTO L1000 $! $ CREATE 'MAIL_FILE' ! For user-friendly file/record attributes $ OPEN /APPEND TMP_FILE 'MAIL_FILE' $ WRITE TMP_FILE "ERROR Report from ", THIS_FILE $ WRITE TMP_FILE "The system has detected a new device error" $ WRITE TMP_FILE "" $ CLOSE TMP_FILE $! $ APPEND /LOG 'DIFF_FILE' 'MAIL_FILE' $ APPEND /LOG 'ERR_FILE' 'MAIL_FILE' $! $ MAIL 'MAIL_FILE' TONY - /SUBJECT="There is a device reporting errors !!" - /PERSONAL_NAME="CHECK_DEVICE.COM" $! $EXIT: $ SET DEFAULT 'SAVE_LOCATION' $ IF F$SEARCH(MAIL_FILE) .NES. "" THEN DELETE 'MAIL_FILE';* $ IF F$SEARCH(DIFF_FILE) .NES. "" THEN DELETE 'DIFF_FILE';* $ EXIT $STATUS+0*F$VERIFY(SAVE_VER) Tony McGrath, Systems Administrator, British Airways Executive Club Cendant Membership Services, 596 North Road, Ormond, Victoria, 3204, Australia Phone : 61 3 9578 8233 Fax : 61 3 9578 6326