FSANALYZE
Section: Maintenance Commands (8)
Index
Return to Main Contents
NAME
fsanalyze - a file system analyzer tool
SYNOPSIS
fsanalyze
[
-deio
]
special
[
files
]
DESCRIPTION
Fsanalyze
is a simple tool that estimates file or file system fragmentation. It accomplishes
this by scanning the data blocks of each inode looking for block numbers that
are out of sequence. In effect, it is counting the number of disk seeks
required to read a file sequentially. Fragmentation is then computed as the
ratio of actual "seeks" to the potential number "seeks" which would be
required if the file were completely fragmented.
If the optional files argument is omitted,
fsanalyze
will analyze the entire file system specified by the special argument.
Special must be a block-oriented file system device.
Fsanalyze
reports various statistics regarding file system usage and data-block
indirection, plus a list of the 10 most fragmented inodes in the file system.
The 10 most fragmented files are listed in decreasing order of fragmentation
based on the absolute number of fragments. For example a 100-block file
that contains 40 individual fragments is 39.39% fragmented (39 seeks / 99
potential seeks), but is listed before a 2-block file that contains 2
fragments (100% fragmented).
If the files argument is present,
fsanalyze
will report the fragmentation of the designated files only.
Before performing any analysis,
fsanalyze
checks the file system integrity by invoking
fsstat (1M).
If the file system needs to be checked,
fsanalyze
terminates with a message to that effect. If a non-root file system is
mounted, a warning message is displayed, but analysis continues. When
used on a mounted file system, it is recommended that a
sync (1)
be performed immediately prior to running
fsanalyze .
If
sync (1)
is not performed, the file system will not be damaged, but erroneous
statistics may be reported.
OPTIONS
- -d
-
display inode numbers as they are examined. This flag makes it easy to
chart the progress of fsanalyze through the file system. Used mainly for
debugging.
- -e
-
report file size inconsistencies - the inode numbers are reported for files
where the file size and number of data blocks are inconsistent. This
option provides the same information as
fsck (1)
phase 1.
- -i
-
report double and triple indirection - the inode numbers are reported for
files that contain double and/or triple data-block indirection.
- -o
-
overrides file system integrity checks. The file system will be analyzed
even if
fsstat (1M)
reports that it is damaged. Note that
fsanalyze
may give erroneous results if used on a damaged file system, but the file
system itself will not be affected.
EXAMPLES
fsanalyze /dev/dsk/0s2 # analyze file system
fsanalyze /dev/dsk/0s2 * # analyze files in current dir
FILES
/usr/include/sys/filesys.h super block structure
/usr/include/sys/ino.h disk inode structure
/usr/include/sys/param.h system parameters
/usr/include/sys/types.h system type definitions
BUGS
Fsanalyze
is supported by System V Release 2. It has not yet been ported to any
other version of Unix.
SEE ALSO
fsstat(1M), fsck(1M), fsdb(1M)
AUTHOR
Michael J. Young
{decvax|harvard|linus|mit-eddie}!necntc!necis!mrst!sdti!mjy
Internet : mjy%sdti.uucp@harvard.harvard.edu
VERSION
v2.04 - 7 January 1988
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- FILES
-
- BUGS
-
- SEE ALSO
-
- AUTHOR
-
- VERSION
-
This document was created by
man2html,
using the manual pages.
Time: 07:02:44 GMT, December 12, 2024