Revision Information: This manual supersedes V2.2
Date: August 1996
Operating System: OpenVMS VAX V5.5-2 thru 7.1, Alpha V6.1 thru 7.1
Note: Part of the Freeware CD-ROM
OpenVMS Freeware for VAX and AXP Systems
The OpenVMS Freeware CD-ROM contains free software tools and utilities to aid software developers in creating applications and managing and using OpenVMS systems.
Many of these tools are popular packages already widely known and in use, while others are internally developed Digital tools our engineers are making available to our OpenVMS customers. For example, the OpenVMS Freeware CD-ROM includes Bliss-32 for OpenVMS VAX, Bliss-32 for OpenVMS AXP, and Bliss-64 for OpenVMS AXP.
Disclaimer on Testing, Quality, and Licensing
The OpenVMS Freeware for VAX and AXP Systems CD-ROM is provided "AS IS" without warranty. Digital imposes no restrictions on its distribution, nor on the redistribution of anything on it. Be aware, however, that some of the packages on the CD-ROM may carry restrictions on their use imposed by the original authors. Therefore, you should carefully read the documentation accompanying the products.
Digital Equipment Corporation is providing this software free of charge and without warranty. Included in the [FREEWARE] directory on this CD are the GNU software licenses. Unless otherwise stated in sources or source packages, the GNU licenses cover all software supplied on this CD.
Digital makes no claims about the quality of this software. It is provided to the customer as a free service.
The Disk and File Utilities (DFU) is a high perfomance tool meant as an aid to the system manager who is responsible for monitoring and maintaining disks, files and directories. It makes use of low level I/O features of VMS. As a result a high level of performance is reached with minimal overhead on the system. DFU supports all types of disk sets which comply to the VMS ODS-2 standard such as volume sets, stripe sets , shadow sets and RAID sets, and combinations of these.
DFU does NOT work on Spiralog disks. Trying to use DFU on spiralog
disks will produce the error "%DFU-E-NOTF11, Device does not have an
ODS-2
filesystem" .
1.1 Support on DFU
Although there is no official support on DFU you may send
questions/remarks/bug-reports to the author via
internet address dorland@utrtsc.enet.dec.com.
A next version of DFU will no longer work on VMS 5.5-2 and VMS 6.0.
1.2 General description
DFU provides the following functions (in alphabetical order) :
Each function is described in detail in the corresponding chapter.
DFU is supported on OpenVMS VAX V5.5-2 through V7.1, and OpenVMS Alpha
V6.1 thru
V7.1. DFU has been tested on the Field test versions of VMS 7.1; so
far no problems have been found. The official freeware release of DFU
will
be distributed with the official release of VMS V7.1.
1.3 New features of V2.4
This version of DFU offers several improved and new features, as well as a couple of bugfixes. The new functions and features are:
The following bugs have been fixed:
1.4 Restrictions and Parameters
The DFU program has a few restrictions :
The following minimum process quotas are recommended for DFU usage:
If you use DFU on volume sets with a large number of members you may need to increase the SYSGEN parameter CHANNELCNT.
If you use the directory command on very large directory files (> 1000 blocks) and run into errors you may need to increase the following parameters:
Do not change parameters unless you run into errors such as EXCEEDED QUOTA or INSUFFICIENT WORKING SET LIMITS.
This chapter describes the installation procedure and other actions
which must be taken to run DFU.
2.1 Installation procedure
DFU can be installed with the VMSINSTAL utility. During the installation VMSINSTAL does the following:
The DFU utility in fact contains just 2 files :
DFU.EXE will be moved to SYS$SYSTEM, and DFUHLP.HLB will be moved to SYS$HELP.
You can optionally get documentation of DFU during installation. To install DFU log in into a privileged account and enter :
$ @sys$update:vmsinstal VAX/VMS Software Product Installation Procedure V6.2 It is 01-Aug-1996 at 13:46. Enter a question mark (?) at any time for help. * Are you satisfied with the backup of your system disk [YES]?
VMSINSTAL now asks for the distribution media and product. You can also specify the directory where you have the DFU_FREEWARE_024.A file instead of a device name:
* Where will the distribution volumes be mounted: [DDCU:] Enter the products to be processed from the first distribution volume set. * Products: DFU_FREEWARE_024 * Enter installation options you wish to use (none): The following products will be processed: DFU_FREEWARE_ 2.4 Beginning installation of DFU_FREEWARE_ V2.4 at 13:46 %VMSINSTAL-I-RESTORE, Restoring product save set A ... Installing DFU version 2.4
The next question will prompt you for the documentation files. The DFU documentation is available in Line printer, PostScript, HTML and Bookreader format. The documentation files will be copied to SYS$HELP.
* Do you want the documentation in Lineprinter format ? [Y]? %VMSINSTAL-I-DOCMOVED, DFU024.LINE moved to SYS$HELP * Do you want the documentation in PostScript(TM) format ? [N]? * Do you want the documentation in Bookreader format ? [N]? * Do you want the documentation in HTML format ? [N]?
VMSINSTAL now links the DFU image and adds the identifier to the Rightslist (see chapter 2.2 for the meaning of the identifier).
Linking DFU image ... %DFU-I-LINK, Linking DFU 2.4 image... %DFU-S-DONE, DFU.EXE created
Next VMSINSTAL will create the DFU_ALLPRIV identifier if necessary.
%VMSINSTAL-I-ACCOUNT, This installation adds an identifier named DFU_ALLPRIV. %UAF-I-RDBADDMSG, identifier DFU_ALLPRIV value: %X80010008 added to rights data base %VMSINSTAL-I-MOVEFILES, Files will now be moved to their target directories... Installation of DFU V2.4 completed at 13:47
You must grant any DFU user including yourself the necessary
DFU_ALLPRIV identifier if a user be allowed to use the special DFU
functions.
See chapter 2.2 for the meaning of this identifier.
2.2 Security and access
DFU has some functions which must not be made available for general usage. Therefore DFU has 2 groups of functions :
The normal functions need SYSPRV or BYPASS privilege. The special functions require BYPASS privilege as well as the DFU_ALLPRIV identifier granted. The DFU_ALLPRIV identifier is created during the installation procedure. To enable a user to perform special functions the system manager must grant this identifier as follows :
$ mc authorize UAF> grant/id DFU_ALLPRIV username
It is highly recommended that special functions are NOT made available to the world.
To run DFU you can enter :
$ RUN disk:[mydir]DFU
or (if DFU is installed systemwide):
$ MC DFU
You can also define and use a symbol for DFU as follows:
$ DFU == "$DFU" $ DFU
DFU now prompts with :
Disk and File Utilities for OpenVMS DFU V2.4 Freeware version Copyright (C) 1996 Digital Equipment Corporation DFU>
You can now enter DFU commands. HELP gives you online help. After each command DFU returns to the DFU> prompt. You can recall and edit commands, just as with DCL (20 commands will be stored in the recall buffer). Use EXIT or CTRL/Z to leave DFU. If you use a symbol for DFU , you also process a single command and return to DCL immediately:
$DFU SEARCH disk/qualifiers
During a DFU run , you can interrupt DFU with CTRL/C or
CTRL/Y. These interrupts are catched
by DFU to allow a correct rundown of the current
command. It may therefore take some time
before DFU responds to a CTRL/C or Y interrupt.
2.4 Using an indirect file list
There are 3 commands, DIRECTORY, DEFRAG and SET which accept an indirect file as input parameter. This is achieved by using the @ sign. An indirect file is a file containing a list of valid filenames (each line in such a file must contain exactly one file). Such indirect files can be the output file of the DFU Search command eg.:
$ DFU DFU> SEARCH mydisk/CHAR=DIRECTORY/OUTPUT=x.x DFU> DIRECTORY/COMPRESS @x.x
As of version V2.2 DFU uses SMG (Screen management routines) to perform
output for an interactive DFU session. This chapter describes
the layout of the DFU screen, the special commands used only in the
SMG interface and other items with respect to the SMG interface.
3.1 Enabling/Disabling SMG
DFU automatically selects SMG output if you run an interactive DFU
session on a terminal or workstation which supports SMG.
In a batch job or a non-DEC terminal DFU will use normal line oriented
output. You can explicitly disable SMG by defining the logical
DFU$NOSMG to any value.
3.2 Automatic switching between SMG and Line mode
You may prefer to perform interactive DFU sessions in SMG mode, and
single DFU commands in normal line mode. This can be done by using
the command procedure listed below:
$! Procedure to switch beteen SMG and line mode $ DFU = "$DFU" $ if p1 .eqs. "" $ then $!Interactive seesion $ def/user sys$input sys$command $ dfu $ else $!Single command so disable SMG $ def/user dfu$nosmg x $ dfu 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' $ endif $ exit
After starting DFU the screen looks as follows :
+-----------------------< DFU V2.4 (Freeware ) >----------------------------+ | | | Disk and File Utilities for OpenVMS DFU V2.4 | | Freeware version | | Copyright © 1996 Digital Equipment Corporation | | | | DFU functions are : | | | | DEFRAGMENT : Defragment files | | DELETE : Delete files by File-ID; delete directory (trees) | | DIRECTORY : Manipulate directories | | REPORT : Generate a complete disk report | | SEARCH : Fast file search | | SET : Modify file attributes | | UNDELETE : Recover deleted files | | VERIFY : Check and repair disk structure | | | | | +----------------------------------Statistics-------------------------------+ | | | | +---------------------------------------------------------------------------+ DFU>
This screen is divided into 3 sections:
In SMG mode the following keys perform special functions :
Although only some 20 lines are visible in the output (main) screen DFU in fact remembers 500 output lines. You can scroll back and forward through these lines with the NEXT and PREV SCREEN keys. At the beginning of each new DFU command these lines are cleared.
On a workstation with DecWindows/Motif you can change the DecTerm size
to be more than the standard 24 lines. DFU's SMG screen will
automatically
adjust to the screen size of such a DecTerm.
3.5 Side effects
There are a few side effects when using SMG mode. CTRL/C and CTRL/Y are catched but not echoed. Also all broadcast messages are trapped and will be displayed in the main screen at the end of the current DFU command. Sometimes this may slightly disrupt the main screen, which can be repaired with the CTRL/W key.
Further, during the execution of a DFU command the cursor will disappear. After the command finishes the cursor will reappear at the DFU> prompt.
Note : this chapter is meant for first time users of DFU. If you already used DFU before you may probably skip this chapter.
This chapter gives a brief overview of the commands which can be used with DFU, and how they can provide the system manager with the necessary information.
One of most common actions by a system manager is trying to locate specific files eg. files with a certain file size. Although a lot can be done with the VMS DIRECTORY command this can be a time consuming process , especially if the complete disk much be scanned. The SEARCH command of DFU is exactly meant for this situation. It gives a very quick list of specific files, with their size, and if needed the number of file fragments. Some usefull SEARCH commands are :
DFU> SEARCH disk/SIZE=MINIMUM=1000 (files > 1000 blocks) DFU> SEARCH disk/IDENT=SYSTEM (files owned by SYSTEM) DFU> SEARCH disk/FRAGMENT=MINIMUM=10 (files with at least 10 fragments) DFU> SEARCH disk/CHAR=MARKED (all files marked for delete) DFU> SEARCH disk/CREATED=SINCE=YESTERDAY (all files created since YESTERDAY)
Of course these qualifiers can be combined to narrow the search. As the SEARCH command scans INDEXF.SYS , not directories, the output generated by SEARCH may look a bit random (but it is just the order in which the file headers are in the INDEXF.SYS file). To smooth the output use the /SORT qualifier.
Another important action for a system manager is to gather some overall disk information , such as number of files , free space statistics and fragmentation information. The REPORT command will generate such a disk report. To get individual disk space usage information the /USAGE qualifier can be used. This will work even if there is no disk quota enabled on the disk.
At regular intervals a system manager may need to check a disk with ANALYZE/DISK. The DFU VERIFY command provides more or less the same functionality but many times faster. The /FIX qualifier provides some REPAIR options which (unlike ANALYZE/DISK/REPAIR) do NOT lock the disk, and thus do not interfere with other disk operations. However, the disk can be rebuild completely by using the /REBUILD qualifier.
Occasionaly a user will delete the wrong file, leaving the system manager or operator with the tedious task of restoring the file from a backup set. The UNDELETE command may be able to recover the file if it has not yet been overwritten with a new one. Much care has been taken to make this command as safe as possible; therefore no disk corruptions will be the result of an UNDELETE. If DFU encounters a problem with a deleted file it will refuse to UNDELETE it.
Another type of typical system manager problems deals with directories. The DFU command DIRECTORY can handle such problems. DIRECTORY can generate reports about empty directories (/EMPTY qualifier) or directories which contains files with a certain number of versions (/VERSION=n qualifier). Also , directories may become internally fragmented which degrades performance. This can be quickly solved by using DFU's directory compressing (the /COMPRESS qualifier).
A second problem with directories is in deleting a directory with many files. On large directories this may take several hours using a DCL DELETE *.* command. This problem is solved by using DFU's DELETE/DIRECTORY command which can delete large directories some 10 times faster than the normal DELETE command does. Also, using DELETE/DIR/TREE will delete a complete directory tree with just one command.
The last 2 commands deal with individual files. SET allows settings of some special file attributes. Since VMS V6.0 this functionality is also provided by the DCL SET FILE/ATTRIBUTE command, but DFU's SET offers some more options. The DEFRAG command is an interface to the MOVEFILE function offered by VMS 5.5 and higher. This allows a simple defragmentation of individual files.
The next chapters gives a detailed description of each individual DFU command.
This chapter describes the DEFRAG command with the related parameters
and qualifiers.
5.1 Description
The DEFRAG command can be used to defragment a single file or a group of files. You can also enter an indirect command file containing a list of files. This feature allows you to create an output file with SEARCH and use that as an input to DEFRAG.
DEFRAG makes use of the file-primitive MOVEFILE function. Therefore files which are open, or which are marked NOMOVE will not be DEFRAGmented. Still you should be cautious about using DEFRAG. You should not make this function available for general usage.
The most common errors returned by DEFRAG are :
Defragment a file or a list of files on the disk.
DEFRAG file1,file2,@file...
file1,file2,@file...
The file(s) to be defragmented. You can also use an indirect command file (@file) which contains a list of files to be defragmented. This may be an output file generated with the SEARCH/OUTPUT command.
/BESTTRY
Normally DEFRAG tries to create a contiguous file. If there is not enough contiguous free space the operation will fail. With the /BESTTRY qualifier DEFRAG tries to move the file with the contiguous-best-try method. This means a maximum of 3 fragments. You should only use this qualifier when a normal DEFRAG fails. If a DEFRAG/BESTTRY also fails this is an indication that the disks free space is too fragmented. Run a REPORT command to see what the largest contiguous free space is, and check the free space fragmentation index./DEVICE
The device on which the files reside. The device name is added to the file name. If you generate a file list with the DFU SEARCH command you don't need this qualifier anymore. However you may have a list of files produced from another source and thus need to append a device name to it. Example:DFU> SEARCH mydisk/...../frag=min=50/output=x.x DFU> DEFRAG @x.x/LBN=logical-block-number
Forces a single file to be moved to the specified logical block number. Do not use this qualifier when processing a list of files./STATISTICS
This qualifier displays the performance statistics: CPU time, Elapsed Time, I/O and PageFaults./WRITECHECK
Perform a writecheck on the resultant file. The default is /NOWRITECHECK. Note that a writecheck doubles the number of involved disk I/O's.
This chapter describes the DELETE command with the related parameters
and qualifiers.
6.1 Introduction
The DELETE command is designed for 2 purposes:
Deletes files or directories.
DELETE device[:] or directory-file(s)
device
The device on which to perform the DELETE/FILE=file-id command.directory-file(s)
The filespecification of the directory on which to perform the DELETE/DIRECTORY command. Wildcard file specifications may be used. DFU will automatically add .DIR to the filespecification if a filetype is not provided.
/DIRECTORY
Specify the directory file which must be deleted. Wildcards may be used but must be used very carefully. Make sure that the directory does not contain non-empty subdirectories. Files within such a subdirectory will become lost after the DELETE/DIRECTORY command (but can be recovered with ANALYZE/DISK/REPAIR). Note that the directory file itself will also be deleted. Example:
Next page... | Contents