Expert utility commands for open files, FS invariants, the cache, and file streams
Copyright © 1985 by Xerox Corporation. All rights reserved.
CEDAR 6.0
The FSUtil Commands
By Michael Schroeder
Last edit by Schroeder on December 13, 1983 11:03 am
Bob Hagmann on June 19, 1985 4:47:34 pm PDT
Release as [Cedar]<Cedar6.0>Documentation>FSUtilDoc.Tioga
Abstract: Utilities for FS to list open files, active files, file streams, and cache LRU chain. FS open files can also be closed, the statistics of the FS cache flusher printed, and the user ``invariants'' re-established for the workstation file system. All these commands will be of interest to experts only.
Keywords: FS Utilities
XEROX Xerox Corporation
Palo Alto Research Center
3333 Coyote Hill Road
Palo Alto, California 94304
1. Introduction
This document describes commands implemented in FSUtil.bcd for listing the set of FS.OpenFiles, FS.ActiveFiles, and IO.STREAM's of class $FileStream that exist in a Cedar instance. It also contains commands for listing the FS cache LRU chain, listing statistics of the FS cache flusher, exercising the cache flusher, and forcing FS.OpenFiles to be closed. Another command re-establishes the ``invariants'' that the user would like to have in FS, and these invariants are not necessarily preserved during a system crash. All these commands will be of interest to experts only.
2. Commands
OpenFiles
Lists all FS.OpenFile's that currently are open. Each line in the listing contains the index of the ref for the FS.OpenFile from the package refrence table and the FName.
ActiveFiles
Lists all FS.ActiveFile's that exist. Each line in the listing contains the index of the ref for the FS.ActiveFile from the package refrence table, the FName, the lock count and the lock type.
FileStreams
Lists all IO.STREAM's of class $FileStream that are open. Each line in the listing contains the index of the ref for the file stream object from the package refrence table, the FName, the access rights.
LRUChain
Lists the current LRU chain for the FS cache of remote files. Each line contains the GName and the time last used.
LRUInfo
Lists statistics of operation for the FS cache of remote files.
LRUFlush numberToFlush
Flushes the first numberToFlush files from the LRU chain of the FS cache of remote files. Files that currently are open are skipped.
LRUFlush -t hoursOld
Flushes all files whose used time is longer ago that "hoursOld" hours from the LRU chain of the FS cache of remote files. Files that currently are open are skipped.
ForceClose fullFName
Calls FS.Close for the file whose complete FName is given, e.g. []<>FSUtilDoc.tioga!4.
FSEstablishInvariants volumeName {AutoConfirm}
Re-establish the invariant that all FS files on the disk are stable and readable, and that there is a one-to-one correspondence between the files in the FS BTree and FS files on the disk. AutoConfirm will automatically delete files or free headers for bogus files. This is a long running command (5 minutes on a 75,000 page logical volume).