The DECwindows interface provides you with the ability to create a script and examine all its settings before committing it to the Disk File Optimizer database. You have the option of creating scripts to defragment specified files or creating scripts to defragment all files on a specified volume. When you select the pull-down menu option to create a volume script, you must specify a volume. By default, the DECwindows interface lists all mounted disk volumes. Select the volume for which you want to create the script. After you select the volume, the DECwindows interface presents the script creation dialog box. You have two options for creating the script: o Inheriting script information from another script o Scheduling the script
1 – Procedure for Creating a Script
The following procedure lists steps for creating a script. Use this procedure for creating either a file or disk volume defragmentation script: 1. Select the Create Script option of the File pull-down menu. 2. Select to create a file or volume script. IF you want to create a file script, select the name of the files you want to target for defragmentation from the file list, and select OK. IF you select to create a volume script, choose the disk volume you want to target for defragmentation from the volume selection list, and select OK. 3. Choose to apply the script settings of another script, or create all new settings. IF you want to create all new script settings, continue with the next step. IF you want to apply the script settings of another script, use the Options pull-down menu Inherit option to bring up a Script List, then select the script with the settings you want. 4. Fill in the fields of the script creation dialog box. 5. Choose to schedule the newly created script. IF you want to schedule the script, use the Options pull-down menu Schedule option, or the Schedule Script button to bring up the Scheduler dialog box. 6. Finish script creation. Select: o Apply to complete the script o OK to complete the script and leave the Create Script option o Cancel to quit and not create a new script Table 1 Script Creation Dialog Box Fields Field Description Script The script name. Name If a duplicate script-name is selected, defragmentation software issues a duplicate script name error message and does not enter the new script into the database-no defragmentation takes place. A script name may be up to 64 characters in length and may contain any of the following characters: o Any alphanumeric character o Underscore ( _ ) o Hyphen ( - ) o Dollar sign ( $ ) Observe the following rules when naming a script: o You can use any combination of uppercase and lowercase letters. o You cannot begin script names using the dollar sign, but you can include the dollar sign within the script name. (The dollar sign is reserved for special use by Digital Equipment Corporation.) o You should not end a script name with a hyphen, because the hyphen is the DCL continuation character. The VMS DCL Concepts Manual contains more information on naming conventions. File List The File List option will show the active file list associated with the script. Log File The Log File option causes the defragmentation process to create a file containing a list of all its operations. The information in the log file varies with the presence of the Full or Brief option selections: o The Full option lists all files analyzed by the defragmentation process and reports their disposition during each phase of defragmentation. o The Brief option lists only the statistics of each phase, such as number of files analyzed and number of files defragmented. Dormant The Dormant Files option indicates files to be Files considered dormant when final file placement decisions are made. Dormant files are placed on the volume to allow placing other files in optimum disk locations. In general, they are placed further away from the ODS- 2 data structures than Frequent files and files not classified in any manner. If a file is indicated in both the DORMANT and FREQUENT lists, it is considered dormant. If a file is indicated in both the EXCLUDE and DORMANT lists, it is excluded. NOTE <REFERENCE>(PLACEMENT_NOTE) <REFERENCE>(WILDCARDS_ALLOWED) Exclude The Exclude Files option specifies files to be Files excluded from processing. The defragmentation process ignores files matching the listed file specifications. Any file indicated in the EXCLUDE list and in either the FREQUENT or DORMANT lists is excluded from processing. <REFERENCE>(WILDCARDS_ALLOWED) The defragmentation process always excludes system files, open files, files excluded in an options file, and files excluded using the Ignore option. Frequent The Frequent Files option indicates files to be Files considered frequently accessed when final file placement decisions are made. Frequent files are placed to optimize access speed. If a file is indicated in both the FREQUENT and DORMANT lists, it is considered dormant. If a file is indicated in both the FREQUENT and EXCLUDE lists, it is excluded. NOTE <REFERENCE>(PLACEMENT_NOTE) <REFERENCE>(WILDCARDS_ALLOWED) Options The Options File option provides an alternate method File for associating files with the Dormant File, Exclude File, or Frequent File options. If the list of files for any of these options is large, you can create a separate file that contains this information. Each record of the options file consists of a file name followed by one of these keywords: o /EXCLUDE-File to be excluded o /FREQUENT-File to be considered frequently accessed o /DORMANT-File to be considered dormant The following example shows the contents of an options file called MYOPTFILE.OPT. This file specifies that all files on the target device called FILE1.EXE are frequent files, all files in the [ARCHIVE] directory are to be excluded, and all files in the [OLDSTUFF] directory and its subdirectories are dormant. FILE1.EXE/FREQUENT [ARCHIVE]*.*;*/EXCLUDE [OLDSTUFF...]*.*;*/DORMANT Prologue The Prologue File option identifies a DCL command file File that Defrag executes just before the DEFRAGMENT FILE operation starts. Epilogue The Epilogue File option identifies a DCL command file File that Defrag executes upon completion of the DEFRAGMENT FILE operation. Ignore The Ignore option requests that the defragmentation process ignore certain types of files. The following list explains the options: o Selecting the Indexed button-Ignores all RMS indexed files o Turning off the Indexed button-May defragment RMS indexed files o Selecting the Placed button-Ignores all files with explicit placement flags set in their headers o Turning off the Placed button-May defragment files with explicit placement flags Files indicated by the Ignore option are added to the EXCLUDE list. The default value (Ignore option and Placed buttons selected) indicates that files with explicit placement control should be ignored, and that RMS indexed files should be defragmented and placed in appropriate locations on the volume. Level The defragmentation process selects files for defragmentation (from among those not excluded) based on the Level option. Once a file is selected as a candidate, the defragmentation process attempts to fully defragment that file (make it 100 percent contiguous). Specify the level number as an integer ranging from one to five: o Level 1-Any file that is not 100 percent contiguous, or can be selected using levels two through four, is a candidate for defragmentation. o Level 2-Any file whose extents cannot be completely mapped by the mapping window, or that can be selected using levels three or four, is a candidate for defragmentation. The default window value is seven and can be set for a given volume using the following command: $ SET VOLUME {device-spec}/WINDOWS=[n] o Level 3-Any file with retrieval pointers in more than one file header, or that can be selected using level four, is a candidate for defragmentation. o Level 4-The defragmentation process for level 4 processing performs only free space consolidation. This level is used in conjunction with the Consolidate Freespace option. o Level 5-This level requests a volume analysis only; no defragmentation occurs. The statistical results are available in the log file, which is required when Level 5 is selected (see the Log option). If level five is selected, the level 2 candidate file specifications are listed in the full log file. ConsolidateThe Consolidate Freespace qualifier tells the Disk File Optimizer to use its free space Freespace consolidation algorithm. Hotfile The Hotfile option causes the defragmenter to query the appropriate hotfile database and append the list of hotfiles to the defragmenter's frequent file list. Mail The Mail option requests that brief status and termination messages regarding defragmentation processes be mailed to the distribution list provided in the DFG$MAIL_ADDRESS file. OpCom The OpCom option requests that brief status and termination messages regarding defragmentation processes be sent to OPCOM. Write The Write Check option requests that a read-after- Check write check be performed on all defragmented or placed files. This qualifier significantly extends the execution time of a defragmentation process. Schedule The Schedule Script option schedules the script for Script operation. Figure 2 Schedule Definition Table 2 Schedule Definition Dialog Box Fields Field Description Script Identifies the name of the script to be scheduled. Name: PredecessorNames the script that will run before the current script will be executed. The script must exist in the database. A selection list is displayed when this button is selected. Interval: Specifies the delta time expressing the interval at which the script will be executed. Time Specifies the delta time expressing the maximum Limit: elapsed time for a given defragmentation operation. Node Limits the defragmentation to only those nodes listed. List: A selection list is displayed when this button is selected. Continuous Causes the script to run continuously. When selected, the defragmentation script used for the process must be aborted or canceled when no longer needed. Cancel Cancels the next scheduled execution of the script. Start Starts execution of the script immediately. Start Starts execution of the script after the specified /After time.