Digital Press is an imprint of Butterworth-Heinemann A member of the Reed Elsevier Group Copyright 1995 Lawrence L. Baldwin, Jr. All rights reserved. No part of this publication may be reproduced*, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher *The supplied disk is intended for personal use only. Reproduction for or distribution to any other party is strictly prohibited. The accompanying disk is sold as is, without warranty of any kind except that the magnetic media on which the code is recorded is free from defects under normal use and the service for a period of ninety (90) days from the date the product is delivered. Any request for replacement of a defective CD-ROM must be postage prepaid and must be accompanied by the original defective CD-ROM, your mailing address and your telephone number. Please send such requests to: Butterworth-Heinemann, 225 Wildwood Ave., Woburn, MA 01801-2041 All trademarks and registered trademarks are the property of their respective holders and are acknowledged. Library of Congress Cataloging-in-Publication Data Baldwin, Lawrence, 1965- OpenVMS system management guide / by Lawrence L. Baldwin, Jr. p. cm. Includes bibliographical references and index. ISBN 1-55558-143-9 1. VAX computers 2. VAX/VMS. I. Title QA76.8.V32B35 1995 005.4'449-dc20 95-14965 CIP The publisher offers discounts on bulk orders of this book. For information, please contact: Manager of Special Sales Digital Press 225 Wildwood Avenue Woburn, MA 01801-2041 Tel: 781-904-2500 Fax: 781-904-2620 Email: orders@bhusa.com Printed and manufactured in the United States of America OpenVMS System Management Guide by Lawrene L. Baldwin, Jr. Appendix E - Diskette Contents The following sections describe the procedures for installing the sample command files located on the diskette included with this book. The 1.2MB, 3.5-inch disk is MSDOS formatted and contains approximately 50 ASCII text files. Because of MSDOS file naming restrictions, the files on the disk are named using the format "FILEnny.TXT" (where "nn" represents the number of the chapter in which the example is discussed and "y" is a sequential letter between A and Z). Collectively, these sample files are referred to as Tools for Automated System Management (TASM). The procedures for installing TASM are as follows: (1) Create the following directory on the disk of your choice: $ CREATE/DIR device:[TASM.COM] (2) Copy the files from the diskette to the [TASM.COM] directory using your favorite terminal emulator, Kermit, or networking product (e.g. Digital Pathworks). Using Kermit, for example: $ SET DEFAULT device:[TASM.COM] $ KERMIT KERMIT> SERVER ! Put Kermit in Server Mode [then issue switch sequence to attach to PC] KERMIT> SEND B:*.* ! Send all files (3) On your Digital system execute RENAME.COM to rename the files from their DOS names to their full OpenVMS names. $ @RENAME %RENAME-I-RENAMED, TASM$ROOT:[COM]FILE05A.TXT;1 renamed to TASM$ROOT:[COM]SYCONFIG.COM;1 %RENAME-I-RENAMED, TASM$ROOT:[COM]FILE05B.TXT;1 renamed to TASM$ROOT:[COM]SYLOGICALS.COM;1 %RENAME-I-RENAMED, TASM$ROOT:[COM]FILE05C.TXT;1 renamed to TASM$ROOT:[COM]SYPAGSWPFILES.COM;1 %RENAME-I-RENAMED, TASM$ROOT:[COM]FILE05D.TXT;1 renamed to TASM$ROOT:[COM]SYSECURITY.COM;1 ... $ (4) Edit TASM$STARTUP.COM and configure the TASM$DSK logical to reflect the device you've selected to contain TASM: $ EDIT TASM$STARTUP.COM $! TASM$STARTUP.COM $! $ DEFINE TASM$DSK DISK$USER2: .. [Save the changes and exit to DCL] (5) Execute TASM$STARTUP with the SETUP parameter. This forces the remaining TASM directories and logical names to be created, as follows: $ @TASM$STARTUP SETUP ... %CREATE-I-EXISTS, TASM$COM already exists %CREATE-I-CREATED, TASM$ROOT:[BACKUPS] created %CREATE-I-CREATED, TASM$ROOT:[DOC] created %CREATE-I-CREATED, TASM$ROOT:[SCRATCH] created After you execute TASM$STARTUP you can refer to all TASM directories by their respective logical names. For example, TASM$COM refers to the [TASM.COM] directory. (6) Edit your system startup files (e.g. STARTUP_PRODUCTS.COM) so that TASM$STARTUP is executed every time the system boots, as follows: $ EDIT SYS$MANAGER:STARTUP_PRODUCTS.COM ... ... $! Start TASM $! $ @device:[TASM.COM]TASM$STARTUP .. [Save the changes and exit to DCL] (7) Execute TASM_SYMBOLS to define TASM symbols, as follows: $ @TASM$COM:TASM_SYMBOLS Defining TASM symbols. Enter "TASM" for HELP. Also, add the foregoing commands to the login command procedures of users who are to access TASM (See Chapter 11). After you define the symbols, issue the TASM command to see the symbols that have been defined, as follows: $ TASM The following TASM symbols are defined: ACCT - Manage User Accounts BCK - Perform Backup Functions MAIL_COMPRESS - Compress VMS Mail Files SHUT - Display Shutdown Menu SYSDOC - Access On-line Site Guide SYSGEN - Run SYSGEN Utility SYSMAN - Run SYSMAN Utility TASM - Display this help screen UAF - Run AUTHORIZE Utility Once you've installed TASM, refer to the following sections for the procedures on using each TASM component. Chapter 5 The files referenced in Chapter 5 are listed in the following table: Procedure Name Diskette File Name Function SYCONFIG.COM FILE05A.TXT Configure devices SYLOGICALS.COM FILE05B.TXT Define logical names SYPAGSWPFILES.COM FILE05C.TXT Install page/swap files SYSECURITY.COM FILE05D.TXT Configure security SYSTARTUP_VMS.COM FILE05E.TXT Main startup file STARTUP_MOUNT.COM FILE05F.TXT Mount disks STARTUP_NETWORK.COM FILE05G.TXT Startup network components STARTUP_SETTERM.COM FILE05H.TXT Configure terminal devices STARTUP_QUEUES.COM FILE05I.TXT Setup queues STARTUP_SHARE.COM FILE05J.TXT Install images STARTUP_SDA.COM FILE05K.TXT Analyze crash dump STARTUP_PRODUCTS.COM FILE05L.TXT Start vendor products STARTUP_APPLICATIONS.COM FILE05M.TXT Start in-house applications The following files are sample system startup procedures that you can use as a guide for designing your startup procedures. Chapter 6 The files referenced in Chapter 6 are listed in the following table: Procedure Name Diskette File Name Function SHUTDOWN_MENU.COM FILE06A.TXT Shutdown system SHUTDOWN_MENU allows you to execute several commonly used shutdown sequences from a menu. With minor modifications you can customize menu options to reflect the needs of your site. The most important benefit of using this technique is that you can ensure that the procedures you define in the menu are used to shut down the systems. For example, the technique allows you to esnure that certain shutdown options are always selected (e.g., REMOVE_NODE). The symbol SHUT is defined in TASM_SYMBOLS. It facilitates access to the SHUTDOWN_MENU. For example: $ SHUT S H U T D O W N M E N U 1 - RETURN - Return to previous menu 2 - REBOOT - Shutdown now with immediate reboot 3 - REBOOT5 - Shutdown in 5 minutes, with immediate reboot 4 - NORMAL - Shutdown now without reboot 5 - NORMAL5 - Shutdown in 5 minutes, without reboot 6 - POWEROFF - Shutdown, prepare for shut off power Enter a number: Chapter 9 The files referenced in Chapter 9 are listed in the following table: Procedure Name Diskette File Name Function ACCT_ADDUSER.COM FILE09A.TXT Add new user account ACCT_REMUSER.COM FILE09B.TXT Remove user account ACCT_UAFRPT.COM FILE09C.TXT Produce UAF report ACCT_MENU.COM FILE09D.TXT Menu to access ACCT functions The examples presented in Chapter 9 allow you to add and remove user accounts and produce an account listing. The symbol ACCT is defined in TASM_SYMBOLS, which allows easy access to the ACCT menu. For example: $ ACCT M A N A G E U S E R S M E N U 1 - RETURN - Return to previous menu 2 - ADDUSER - Add a new user 3 - REMUSER - Remove an existing user 4 - UAFRPT - Produce a report of all existing users Enter a number: • ADDUSER First add template accounts using Authorize and specify all the defaults you want to use for that group of users. For example, to create an template for all executive accounts, issue the following command: $ UAF UAF> ADD TMPL_EXEC/UIC=[100,1]/ACCOUNT="EXECUTIV"/DEVICE=DSK$EXECUTIVE- _UAF> /FLAGS=DISUSER/PRIV=(TMPMBX,NETMBX)/DEFPRIV=(TMPMBX,NETMBX)- _UAF> /PWDLIFETIME="60-0"/OWNER="TEMPLATE ACCOUNT" Next, modify ACCT_ADDUSER.COM to reflect the templates that you've added. You must specify the template name, description, default login device, and user identification code (UIC) group for each template, as follows: $! ACCT_ADDUSER.COM $! ... $! Add you template names below (leave first entry blank) $ tmpl_name = "//TMPL_EXEC/TMPL_BILL/TMPL_HR/TMPL_SHIP/TMPL_SYST/" $! Define default login device, UIC group, and description $ tmpl_dev = "//DSK$EXECUTIVE/DSK$BILLING/DSK$HR/DSK$SHIPPING/DSK$SYSTEMS/" $ tmpl_grp = "//100/200/400/600/700/" $ tmpl_desc = "//Executive/Billing/Human Resources/Shipping/Systems/" Then invoke ACCT and select ADDUSER from menu. You will then get the following menu listing all the defined templates: A D D U S E R A C C O U N T 1 - RETURN Return to previous menu 2 - TMPL_EXEC Executive 3 - TMPL_BILL Billing 4 - TMPL_HR Human Resources 5 - TMPL_SHIP Shipping 6 - TMPL_SYST Systems Select a template that you want to use and enter the username, as follows: Enter account template to use: 2 Last name: Simpson First name: Howard Middle initial: A Owner Username UIC Account Privs Pri Directory TMPL_EXEC [100,1] EXECUTIV Normal 4 Disuser Chose a UIC Member number, excluding the ones listed above. A list of existing users in the group you selected is displayed. Use this information to locate an available member number and enter it, as follows: Account's UIC Member number: 2 The account and its default login directory are then automatically created, as follows: %CREATE-I-CREATED, DSK$EXECUTIVE:[SIMPSONH] created %UAF-I-COPMSG, user record copied %UAF-I-RDBADDMSGU, identifier SIMPSONH value: [000100,000002] added to rights data base Username: SIMPSONH Owner: HOWARD A. SIMPSON Account: EXECUTIV UIC: [100,2] ([EXECUTIV,SIMPSONH]) CLI: DCL Tables: DCLTABLES Default: DSK$EXECUTIVE:[SIMPSONH] LGICMD: LOGIN Flags: DisUser Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun No access restrictions Expiration: (none) Pwdminimum: 6 Login Fails: 0 Pwdlifetime: 60 00:00 Pwdchange: (pre-expired) Last Login: (none) (interactive), (none) (non-interactive) Maxjobs: 0 Fillm: 100 Bytlm: 8192 Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0 Maxdetach: 0 BIOlm: 18 JTquota: 1024 Prclm: 2 DIOlm: 18 WSdef: 150 Prio: 4 ASTlm: 24 WSquo: 256 Queprio: 0 TQElm: 10 WSextent: 512 CPU: (none) Enqlm: 100 Pgflquo: 10240 Authorized Privileges: NETMBX TMPMBX Default Privileges: NETMBX TMPMBX Account added. Press [return] for main menu • REMUSER REMUSER prompts you for the name of an account to delete. It archives the user's default directory (and all subdirectories) to a save set in the TASM$ARCHIVE directory. The save set is named username.SAV. Then the user's entire directory tree and user authorization file (UAF) record is deleted. To delete a user, select REMUSER from the ACCT menu. When you are prompted for a username, enter the name of the account you want to delete, as follows: Username to delete: SIMPSONH Are you Sure you want to archive DSK$EXECUTIVE:[SIMPSONH...]*.*;* (Y/N): Y %BACKUP-S-COPIED, copied DSK$EXECUTIVE:[SIMPSONH]LOGIN.COM;1 %BACKUP-S-COPIED, copied DSK$EXECUTIVE:[SIMPSONH]MAIL.MAI;1 %BACKUP-I-STARTDELETE, starting file deletion pass Home directory for SIMPSONH has been deleted. Are you Sure you want to remove the account SIMPSONH (Y/N): Y %UAF-I-REMMSG, record removed from system authorization file %UAF-I-RDBREMMSGU, identifier SIMPSONH value: [000100,000002] removed from right s data base The account, SIMPSONH, has been completely removed. • UAFRPT The UAFRPT option allows you to generate and optionally print a list of all user accounts. By default, the listing file is named SYSUAF.LIS and is located in the TASM$SCRATCH directory. For example: Print Report (Y/N): N %UAF-I-LSTMSG1, writing listing file %UAF-I-LSTMSG2, listing file SYSUAF.LIS complete $ TYPE TASM$SCRATCH:SYSUAF.LIS Owner Username UIC Account Privs Pri Directory SYSTEM MANAGER SYSTEM [1,4] SYSTEM All 4 SYS$SYSROOT:[SYSMGR] FIELD SERVICE FIELD [1,10] FIELD All 4 SYS$SYSROOT:[SYSMAINT] TMPL_EXEC [100,1] EXECUTIV Normal 4 Disuser TMPL_BILL [200,1] BILLING Normal 4 Disuser DEFAULT [200,200] Normal 4 Disuser NML$SERVER DEFAULT NML$SERVER [376,371] DECNET Normal 4 SYS$SPECIFIC:[NML$SERVER] PHONE$SERVER DEFAULT PHONE$SERVER [376,372] DECNET Normal 4 SYS$SPECIFIC:[PHONE$SERVER] MAIL$SERVER DEFAULT MAIL$SERVER [376,374] DECNET Normal 4 SYS$SPECIFIC:[MAIL$SERVER] DECNET DEFAULT DECNET [376,376] DECNET Normal 4 SYS$SPECIFIC:[DECNET] TMPL_HR [400,1] HR Normal 4 Disuser DSN$NETWORK DSN$SERVER [500,1] Normal 4 SYS$COMMON:[DSN.LOGS] TMPL_SHIP [600,1] SHIPPING Normal 4 Disuser TMPL_SYST [700,1] SYSTEMS Normal 4 Disuser Press [return] for main menu Chapter 10 The files referenced in Chapter 10 are listed in the following table. Procedure Name Diskette File Name Function CUTTER.COM FILE10A.TXT Archive system log files The purpose of CUTTER is to periodically close system log files (e.g. ACCOUNTNG.DAT, OPERATOR.LOG) and archive them to a temporary directory. To make it easier to identify archived files, the file names include a month and date time stamp. By default files are archived to the directory defined by the TASM$ARCHIVE login name (defined in TASM$STARTUP). $ @CUTTER %COPY-S-COPIED, DISK$USER1:[SYSFILES]ACCOUNTNG_BIRCH.DAT;11 copied to TASM$ROOT:[ARCHIVE]ACC_JUN_1995.DAT;11 (1 block) %COPY-S-COPIED, SYS$COMMON:[SYSMGR]SECURITY.AUDIT$JOURNAL;5 copied to TASM$ROOT:[ARCHIVE]SEC_JUN_1995.DAT;5 (1 block) %COPY-S-COPIED, SYS$SYSROOT:[SYSERR]ERRLOG.SYS;1 copied to TASM$ROOT:[ARCHIVE]ERR_JUN_1995.DAT;1 (1 block) %COPY-S-COPIED, DISK$USER1:[SYSFILES]OPERATOR_BIRCH.LOG;75 copied to TASM$ROOT:[ARCHIVE]OPER_JUN_1995.DAT;75 (2 blocks) The command procedure MONTHLY_PROCESSING (see Chapter 12) invokes CUTTER to force this process to occur each month. Chapter 11 The files referenced in Chapter 11 are listed in the following table. Procedure Name Diskette File Name Function DEFINE_SYMB.MAR FILE11A.TXT Macro code to define DCL symbols This file is a VAX Macro example that demonstrates how to define DCL symbols from a compiled language. Procedures for using this file are presented in Chapter 11. Chapter 12 The files referenced in Chapter 12 are listed in the following table. Procedure Name Diskette File Name Function SCHEDULER.COM FILE12A.TXT Main scheduler DAILY_PROCESSING.COM FILE12B.TXT Daily tasks WEEKLY_PROCESSING.COM FILE12C.TXT Weekly tasks MONTHLY_PROCESSING.COM FILE12D.TXT Monthly tasks These files comprise an sample automated batch scheduling system. Procedures for using these files are presented in Chapter 12. Chapter 13 The files referenced in Chapter 13 are listed in the following table. Procedure Name Diskette File Name Function BCK_SETS.COM FILE13A.TXT Defines Backups sets and attributes BCK_NIGHTLY.COM FILE13B.TXT Main backup program BCK_CALC_LABEL.COM FILE13C.TXT Calculate tape label to use BCK_SELECT_FILE.COM FILE13D.TXT Select file to restore BCK_RESTORE_FILE.COM FILE13E.TXT Perform file restore BCK_MENU.COM FILE13F.TXT Main Backup menu BCK_ERRORS.COM FILE13G.TXT Backup error codes Together these example procedures implement the basic backup, tape labeling, and retention strategies discussed in Chapter 13. To use these procedures you first have to organize your disks into backup sets. Sets are designed to allow you to backup several disks to a single, high-capacity medium (e.g. 4mm or 8mm tapes). If you want to perform unattended backups, assign only as many disks per set as will fit on a single tape. For example, consider a system with the following devices: DISK$USER1 0.5GB (disk drive) DISK$USER2 0.5GB " " DISK$SCR1 1.0GB " " MUA0: 1.0GB (tape drive) Since the capacity of the tape drive is limited to 1GB, you have to create at least two backup sets as follows: Set S01: DISK$USER1, DISK$USER2 Set S02: DISK$SCR1 Next, edit TASM$COM:BCK_SETS to reflect the backup sets that you've selected. Configure the symbols as follows: BCK_NUMSETS - The number of backup sets you have defined BCK_SETS - List of backup set names separated by slashes Set names must have exactly 3 characters each BCK_TAPE - Tape drive to use for this backup set BCK_OUTQUAL - Any special backup qualifiers you need BCK_COUNT - Number of devices in the backup set BCK_DEVICES - List of devices separated by slashes ("/") BCK_SAVESETS - Names of savesets to use for each device The values you establish for the BCK_DAILY, BCK_WEEKLY, BCK_MONTHLY and BCK_YEARLY symbols determine the backup schedule and the retention period. The retention period for each backup type is as follows: DAILY - 1 month WEEKLY - 1 month MONTHLY - 1 year YEARLY - 2 years Configure the following symbols to establish what type of backup to perform on each day of the month: BCK_DAILY - The days of the week to perform daily backups Select one or more days (Mon - Sun) BCK_WEEKLY - Day of the week to perform weekly backup Select one day of week (Mon - Sun) BCK_MONTHLY - Week within month to perform monthly backup Select one week number (1-6) BCK_YEARLY - Month within year to perform yearly backup Select one month of year (1 - 12) For example: $! BCK_SETS.COM $! ... $ bck_numsets == 2 $ bck_sets == "/S01/S02/" $ bckset = p1 $ goto SET_'bckset' $! ------------------------------------------- $! Backup Disk Set "S01" $! ------------------------------------------- $SET_S01: $ BCK_TAPE == "MUA0:" $ BCK_OUTQUAL == "/BLOCK=40000/GROUP=10" $ BCK_COUNT == 2 $ BCK_DEVICES == "/DISK$USER1/DISK$USER2/" $ BCK_SAVESETS == "/IMAGEU1/IMAGEU2/" $ BCK_DAILY == "MonTueWedThu" ! Daily backups on these days $ BCK_WEEKLY == "Fri" ! Weekly backup on this day $ BCK_MONTHLY == "2" ! Monthly on this week number $ BCK_YEARLY == "2" ! Yearly during 2nd month of year $ EXIT $! $! ------------------------------------------- $! Backup Disk Set "S02" $! ------------------------------------------- $SET_S02: $ BCK_TAPE == "MUA0:" $ BCK_OUTQUAL == "/BLOCK=40000/GROUP=10" $ BCK_COUNT == 1 $ BCK_DEVICES == "/DISK$SCR1/" $ BCK_SAVESETS == "/IMAGES1/" $ BCK_DAILY == "Mon" ! Daily backups on these days $ BCK_WEEKLY == "Tue" ! Weekly backup on this day $ BCK_MONTHLY == "2" ! Monthly on this week number $ BCK_YEARLY == "" ! No Yearly backup $ EXIT If you need more backup sets, add additional entries using the same format. The resulting backup schedule for backup set S01 is daily backups Monday through Thursday, weekly backups on Fridays, monthly backups on the second week of the month (on Friday), and a yearly backup each February. Once you have specified this information and given a specific date, the backup procedures can always calculate exactly what type of backup should be performed and the tape label that should be used. This process is automated by the procedure BCK_CALC_LABEL.COM. Before a backup begins, the main backup program (BCK_NIGHTLY) invokes CALC_LABEL to determine if a backup is scheduled for that day and if so what label should be used. CALC_LABEL checks the symbols that define the schedule (e.g. BCK_DAILY). If there is no backup scheduled, it does not return a label. If there is a backup scheduled, CALC_LABEL generates one by concatenating the backup set name, the type of backup, and a sequential number. The first three characters of the label contain the backup set name. The next character is the backup type abbreviated as D, W, M, and Y. The sequential number is set depending on the backup type. For yearly backups it is set to 1 for odd years and 2 for even years. For monthly backups it is set to the month number (e.g. Jan. = "1", Feb. = "2", etc.) For weekly and daily backups it is set to the week or day number, as follows: S M T W R F S Week # -- -- -- -- -- -- -- ------ 1 2 3 4 5 6 7 1 8 9 10 11 12 13 14 2 Day # 15 16 17 18 19 20 21 3 22 23 24 25 26 27 28 4 29 30 31 32 33 34 35 5 36 37 6 For example, May 1, 1993 is day number 1, week number 1. May 31 is day number 37, week number 6. May 1993 S M T W R F S -- -- -- -- -- -- -- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 28 19 20 21 22 23 24 25 26 27 28 29 30 31 Given the following dates and the schedule for backup set S01 presented earlier, BCK_CALC_LABEL would generate labels as follows: May 1, 1993 No Backup May 7, 1993 S01M5 May 14, 1993 S01W3 May 25, 1993 S01D31 May 31, 1993 S01D37 Once you have configured BCK_SETS, you should organize all the backup media that you will need, initialize each tape with the required label, and attach a written label to each tape. You can generate a backup schedule to see exactly which tapes will be requested for each day of the month (see the next section). After you have all your tapes prepared you're ready to initiate a backup. To start a backup, you have to submit BCK_NIGHTLY as a batch job and pass it several parameters, including: P1 - The backup set to process P2 - The scheduled backup date, or "" for the current date P3 - "PRE" if you just want to verify that the proper tape is loaded in the tape drive To simplify this process you can create a command procedure such as BCK_NIGHTLY_SUB.COM, as follows: $ TYPE BCK_NIGHTLY_SUB.COM $! BCK_NIGHTLY_SUB.COM $! $! P1 - Backup set $! P2 - Scheduled backup date $! P3 - If TOMORROW then submit for next day $! $ submit/noprint/keep/log=TASM$BACKUPS:BCK_NIGHTLY_PRE.LOG- /NAME="BCK_NIGHTLY_PRE"/notify/user=system - /param=("''p1'","''p2'","PRE")- /after="''P3'15:30" TASM$COM:BCK_NIGHTLY $ submit/noprint/keep/log=TASM$BACKUPS:/notify/user=system - /param=("''p1'","''p2'")/after="''P2'23:00" TASM$COM:BCK_NIGHTLY $ exit Then to submit the backup, issue the following DCL command: $ @BCK_NIGHTLY_SUB S01 "" The foregoing procedure submits BCK_NIGHTLY with the "PRE" option for 3:30pm and without the "PRE" option for 11:00pm. When the PRE job runs it checks the tape drive to see if the proper tape is loaded. If no tape or the wrong tape is loaded, all terminals enabled to receive tape requests (REPLY/ENABLE=TAPES) receive a request message such as the following: %%%%%%%%%%% OPCOM 11-JUN-1993 13:29:44.32 %%%%%%%%%%% Request 1, from user SYSTEM on BIRCH BATCH_18, Wrong volume mounted (S01D13), mount S01W2 in MUA0: and use REPLY/TO. This alerts you to put the correct tape in before you leave for the day. Once the correct tape is in the drive, issue the following command to respond to the request: $ REPLY/TO = 1 $ 13:31:18.24, request 1 was completed by operator _BIRCH$OPA0: The PRE job then checks the tape again, and will send the following message if the correct tape is loaded: %%%%%%%%%%% OPCOM 11-JUN-1993 13:53:05.76 %%%%%%%%%%% Message from user SYSTEM on BIRCH BATCH_25, Tape: S01W2 is loaded and ready for tonight's backup. Job BCK_NIGHTLY_PRE (queue BIRCH_GENERAL, entry 25) completed Finally, at 11:00pm the actual backup job begins and performs the backup. During the backup BCK_NIGHTHLY create a backup listing file in the TASM$BACKUPS directory that lists every file that is copied to backup media. Additionally, a log file is also written in the TASM$BACKUPS directory. To force backups to be submitted automatically, you should invoke BCK_NIGHTLY_SUB from an automated scheduling system such as DAILY_PROCESSING.COM (see Chapter 12). The following sections discuss the other components of the backup examples. • BCK_MENU The symbol BCK is defined by TASM_SYMBOLS to invoke BCK_MENU.COM, which allows you to select a number of backup options from a menu, as follows: $ BCK B A C K U P / R E S T O R E M E N U 1 - RETURN - Return to previous menu 2 - RESUBMIT - Resubmit BCK_NIGHTLY 3 - RESTORE - Restore a file from Backups 4 - SCHED - Print a backup schedule Enter a number: • RESUBMIT Invokes BCK_NIGHTLY_SUB to manually resubmit a backup for the current day. • RESTORE Use the RESTORE option from the backup menu to restore a file from backups. The RESTORE option executes the command procedure BCK_SELECT_FILE. You are then prompted for various information to locate the backup from which you want to restore. BCK_SELECT_FILE then submits BCK_FILE_RESTORE as a batch job passing it the file name and tape label you selected. The restore procedure copies the restored file to TASM$RESTORE:[*] and notifies you when the restore has completed. The following is an example restore of [SYS0.SYSCOMMON.SYSEXE]SYSUAF.DAT from DISK$USER1: [select RESTORE from Backup Menu] 1 - S01 2 - S02 Select a backup set (1 - 2): 1 First choose the backup set that contains DISK$USER1. 1 - DISK$USER1- VAXVMSV055 (BIRCH$DUA0:) 2 - DISK$USER2- VAXVMST060 (BIRCH$DUA1:) Select disk by number (1 - 2): 1 Then select the proper disk. BCK_SELECT_FILE then lists all listing files that exist for that disk. Searching all DISK$USER1 listing files... The following is a list of backup listing files that exist. They are sorted by date of backup (latest backups listed first). Press "N" for the next page Press "P" for the previous page Press to return to the previous menu 1 - S01W2_IMAGEU1.LIS;1 1993-06-11 13:57:46.4 Enter choice # (1-10), P or : 1 If there were many from which to choose you could use N and P to see the next or previous page of listing files. In this case there is only one to choose from (S01W2_IMAGEU1). Listfile = TASM$BACKUPS:S01W2_IMAGEU1.LIS;1 Enter the filename you wish to restore. Enter the filename in the following format: [directory.subdir.]filename.type e.g. [USER.SMITH]LOGIN.COM You may leave out any part of the filename, but the less specific you are the more choices you will have to select from. e.g. LOGIN.COM Enter filename: SYSUAF.DAT Now, enter the file name that you want to restore. In this case "SYSUAF.DAT". BCK_SELECT_FILE then scans the listing file you selected for all occurrences of that file name. Again, use N or P to scroll from one page to another if there are many entries. 1 - [SYS0.SYSCOMMON.SYSEXE]SYSUAF.DAT;1 32 17-OCT-1991 2 - [SYSFILES]SYSUAF.DAT;1 42 17-OCT-1991 13:36 Enter choice # (1-10), N, P or : 1 In this case choose selection number one since it corresponds exactly to the file you want to restore. BCK_SELECT_FILE summarizes the parameters it will use to restore the file and submits BCK_RESTORE_FILE as a batch job, as follows: Tape drive to use [MUA0:]: label = S01W2 saveset = IMAGE file = [SYS0.SYSCOMMON.SYSEXE]SYSUAF.DAT;1 Job BCK_RESTORE_FILE (queue BIRCH_GENERAL, entry 15) started on BIRCH_GENERAL When BCK_RESTORE_FILE completes it sends a broadcast message indicating that the restore was successful: Reply received on BIRCH from user SYSTEM at _BIRCH$OPA0: 11:27:30 File: [SYS0.SYSCOMMON.SYSEXE]SYSUAF.DAT;1 restored to TASM$RESTORE:[SYS0.SYSCOMMON.SYSEXE] $ DIR TASM$RESTORE:[SYS0.SYSCOMMON.SYSEXE]/SIZE=ALL/DATE Directory TASM$RESTORE:[SYS0.SYSCOMMON.SYSEXE] SYSUAF.DAT;1 32/33 17-OCT-1991 13:36:51.96 Total of 1 file, 32/33 blocks. Once you believe that you have restored the correct file, copy it to its production directory. • SCHED Use the SCHED option to generate a backup schedule for a specific backup set and month. For example: [select SCHED from backup menu] Enter a date (DD-MM-YYYY) which is in the month that you want a backup schedule for [CURRENT MONTH]: 01-May-1993 Enter Backup Set [S01]: Print it (Y/N)? [N]: $ TYPE TASM$SCRATCH:BCK_SCHED_S01.RPT Schedule for MAY 1993 Backup Set: S01 Sat , 1-MAY-1993 : Sun , 2-MAY-1993 : Mon , 3-MAY-1993 : S01D9 Tue , 4-MAY-1993 : S01D10 Wed , 5-MAY-1993 : S01D11 Thu , 6-MAY-1993 : S01D12 Fri , 7-MAY-1993 : S01M5 Sat , 8-MAY-1993 : Sun , 9-MAY-1993 : Mon , 10-MAY-1993: S01D16 Tue , 11-MAY-1993: S01D17 Wed , 12-MAY-1993: S01D18 Thu , 13-MAY-1993: S01D19 Fri , 14-MAY-1993: S01W3 Sat , 15-MAY-1993: Sun , 16-MAY-1993: Mon , 17-MAY-1993: S01D23 Tue , 18-MAY-1993: S01D24 Wed , 19-MAY-1993: S01D25 Thu , 20-MAY-1993: S01D26 Fri , 21-MAY-1993: S01W4 Sat , 22-MAY-1993: Sun , 23-MAY-1993: Mon , 24-MAY-1993: S01D30 Tue , 25-MAY-1993: S01D31 Wed , 26-MAY-1993: S01D32 Thu , 27-MAY-1993: S01D33 Fri , 28-MAY-1993: S01W5 Sat , 29-MAY-1993: Sun , 30-MAY-1993: Mon , 31-MAY-1993: S01D37 You should generate the schedules several months in advance so that you know exactly when you need each tape. Chapter 14 The files referenced in Chapter 14 are listed in the following table: Procedure Name Diskette File Name Function SYSDOC.COM FILE14A.TXT On-line site guide SYSDOC is a tool for creating and accessing on-line site documentation (e.g. policies, procedures, contact names, configuration information, etc.). Before you can use SYSDOC you must create directories that contain documentation text files. When you invoke SYSDOC it presents the directory and file names as menu options and allows you to traverse up and down directories and view documents. SYSDOC expects all directories to be created under the directory defined by the logical name TASM$DOC. For example, you might want to store documentation relating to contacts names, applications, and emergency procedures. First create a directory for each of subject, as follows: $ SET DEFAULT TASM$DOC $ DIR %DIRECT-W-NOFILES, no files found $ CREATE [.CONTACTS]/DIR/PROT=(W:RE) $ CREATE [.APPLICATIONS]/DIR/PROT=(W:RE) $ CREATE [.EMERGENCY]/DIR/PROT=(W:RE) $ DIR Directory TASM$ROOT:[DOC] APPLICATIONS.DIR;1 CONTACTS.DIR;1 EMERGENCY.DIR;1 Total of 3 files. Then create as many documents as you want within each directory. When you name a document file, the file name must be "DOC", but the file extension can be whatever you want. $ $ CREATE [.CONTACTS]DOC.DIGITAL Digital Contacts Service: (800)-354-9000 Sales: (203)-555-2345 Bill Smith DECdirect: (800)-344-4825 Then invoke SYSDOC and select CONTACTS: $ SYSDOC O n l i n e S i t e G u i d e 1 - APPLICATIONS 2 - CONTACTS 3 - EMERGENCY Enter Choice #: 2 The documents in the CONTACTS directory are then displayed in a menu. Select the document you want to edit or view: O n l i n e S i t e G u i d e 1 - DIGITAL Digital Contacts Enter Choice #: 1 E - Edit T - Type P - Print Action: T Digital Contacts Service: (800)-354-9000 Sales: (203)-555-2345 Bill Smith DECdirect: (800)-344-4825 < Press RETURN to continue > At any menu just press the key to return to the previous level. Chapter 15 The files referenced in Chapter 15 are listed in the following table: Procedure Name Diskette File Name Function CHECK_QUEUES.COM FILE15A.TXT Monitor queues CHECK_PROCESSES.COM FILE15B.TXT Monitor processes CHECK_PROCESSES.DAT FILE15C.TXT Define processes to watch CHECK_PROCESSES.FDL FILE15D.TXT Defines format to load indexed file from .DAT CHECK_DISKS.COM FILE15E.TXT Monitor disks CHECK_DISKS.DAT FILE15F.TXT Define disks to watch You can use the example procedures in this section to monitor the status of queues, system processes, and disks. All procedures execute as detached processes that send operator request messages in the event a problem is detected. To receive these messages add the following command to your LOGIN.COM: $ REPLY/ENABLE=CENTRAL ! Requires OPER privilege The following sections describe each procedure in more detail: • CHECK_QUEUES CHECK_QUEUES uses the Get Queue Information lexical function (F$GETQUI) to monitor the status of all print and batch queues. By default, every five minutes it verifies that all queues are started. If malfunctioning queues are detected, CHECK_QUEUES sends an operator request message to the "CENTRAL" class. You can change the polling interval by adjusting the "interval" symbol defined in CHECK_QUEUES.COM. To start CHECK_QUEUES at system startup time, include the following line in your system startup procedures (e.g. STARTUP_PRODUCTS.COM): $@TASM$COM:CHECK_QUEUES.COM Note: Add this line after the line that executes TASM$STARTUP so that all required logical names will be defined. • CHECK_PROCESSES CHECK_PROCESSES uses the Get Job Information lexical function (F$GETJPI) to monitor the status of selected system processes. By default, every thirty minutes it verifies that selected processes exist and are running under the proper usernames. If CHECK_PROCESSES detects the absence of a process or a process executing under the wrong username, it sends an operator request message to the "CENTRAL" class. You can change the polling interval by adjusting the "interval" symbol defined in CHECK_PROCESSES.COM. You define the processes and usernames that CHECK_PROCESSES monitors by creating TASM$COM:CHECK_PROCESSES.DAT, using the following format: SWAPPER / /00/ ERRFMT /SYSTEM /00/ OPCOM /SYSTEM /00/ AUDIT_SERVER /AUDIT$SERVER/00/ JOB_CONTROL /SYSTEM /00/ NETACP /DECNET /00/ EVL /DECNET /00/ REMACP /SYSTEM /00/ /SYSTEM /00/ /SYSTEM /00/ To start CHECK_PROCESSES at system startup time, include the following line in your system startup procedures (e.g. STARTUP_PRODUCTS.COM): $@TASM$COM:CHECK_PROCESSES.COM Note: Add this line after the line that executes TASM$STARTUP so that all required logical names will be defined. The first time CHECK_PROCESSES executes it converts the entries from CHECK_PROCESSES.DAT into an indexed file (CHECK_PROCESSES.IDX) using the included File Definition Language file (CHECK_PROCESSES.FDL). The indexed file is then used for the life of the detached process. If you make changes to the text data file and you want to make them effective, you must manually stop the detached process and restart it. • CHECK_DISKS CHECK_DISKS uses the Get Device Information lexical function (F$GETDVI) to monitor disk space and disk errors. By default, every fifteen minutes it verifies that every disk has at least 50,000 free blocks and that error counts have not incremented. When CHECK_DISKS detects disk space below 50,000 blocks or a single disk error (a "WARNING" state), it sends an operator request message to the "CENTRAL" class. Additionally, if disk space drops below 10,000 blocks, or 10 or more disk errors are detected (a "CRITICAL" state), CHECK_DISKS sends a REPLY message directly to selected usernames. To adjust thresholds, polling interval, or the destination of messages, modify the following symbols in CHECK_DISKS.COM: $! CHECK_DISKS.COM $! ... $ freeblock_warning = 50000 ! Disk space WARNING threshold $ freeblock_critical = 10000 ! Disk space CRITICAL threshold $ disk_err_warning = 1 ! Disk error WARNING threshold $ disk_err_critical = 10 ! Disk error CRITICAL threshold $ interval = "00:15:00" ! polling interval $ warning_class = "(central)" ! Opcom class to reply to for warnings $ critical_list = "(system)" ! Usernames to notify if critical When CHECK_DISKS is started it determines which disks to monitor by reading the data file CHECK_DISKS.DAT. Before you start CHECK_DISKS, edit this file so that each disk you want to monitor is listed on a separate line, as follows: DISK$USER1 DISK$USER2 To start CHECK_DISKS at system startup time, include the following line in your system startup procedures (e.g. STARTUP_PRODUCTS.COM): $@TASM$COM:CHECK_DISKS.COM Note: Add this line after the line that executes TASM$STARTUP so that all required logical names will be defined. Chapter 16 The files referenced in Chapter 16 are listed in the following table: Procedure Name Diskette File Name Function MAIL_COMPRESS.COM FILE16A.TXT Compress all mail files on a disk Procedures for using this file are presented in Chapter 16. Chapter 17 The files referenced in Chapter 17 are listed in the following table: Procedure Name Diskette File Name Function VMS$PASSWORD_POLICY.C FILE17A.TXT Password Filter CAPTIVE_MENU.COM FILE17B.TXT Captive login procedure Procedures for using these files are presented in Chapter 17. Chapter 18 The files referenced in Chapter 18 are listed in the following table: Procedure Name Diskette File Name Function BENCH.COM FILE18A.TXT Gather resource usage statistics for an activity HARD.MAR FILE18B.TXT Macro code to get hard page fault count Procedures for using these files are presented in Chapter 18. Appendix E The files referenced in this appendix are listed in the following table: Procedure Name Diskette File Name Function TASM$STARTUP.COM FILE0FA.TXT Define TASM logical names TASM_MENU_ABORT.MSG FILE0FB.TXT Error message file TASM_MENU_INPERR.MSG FILE0FC.TXT Error message file TASM_SYMBOLS.COM FILE0FD.TXT Defines TASM symbols TASM_MENUSYM.COM FILE0FE.TXT Defines symbols used by command procedures RENAME.COM RENAME.COM Procedure to rename all files on this diskette to their full names The procedures for using these files are discussed at the beginning of this chapter.