fsstat

Synopsis

Description

fsstat reports kernel file operation activity by the file system type (fstype)
or by the path name, which is converted to a mount point.
The first set of lines of output reports all activity since:

The file system module was loaded (in the case of fstype)

The file system was mounted (in the case of mount point)

Statistics are gathered at the file system independent layer at both the
fstype and the mount point levels. However, not all file system types
are represented in the gathering of statistics. (See the NOTES section of
this man page.)

The output of fsstat is dependent on the mode (option) requested. All
statistic fields are displayed using “smart numbers” which automatically scale the units
in a human readable form that fits in a maximum of 5
characters. For example:

During the execution of fsstat, the state of the system can change.
If relevant, a state change message is included in the fsstat output
in one of the following forms:

<<mount point no longer available: {path}>>
<<file system module no longer loaded: {fstype}>>

After the state change messages are displayed, fsstat continues to display the
statistics as directed. If all of the fstypes and mount points that
fsstat was reporting on are no longer available, then fsstat exits.

The user is required to specify the -F option (all available file
system types) or a list of one or more fstypes and/or mount
points.

The default report shows general file system activity. This display combines similar
operations into general categories as follows:

The entity being reported on (fstype or mount point) is displayed in
the last column.

Options

The following options are supported:

-a

Report the activity for kernel attribute operations. The following statistics are reported:

getattr

Number of file attribute retrieval calls

setattr

Number of file attribute modification calls

getsec

Number of file security attribute retrieval calls

setsec

Number of file security attribute modification calls

The entity being reported on (fstype or mount point) is displayed in the last column.

-f

Report the full activity for all kernel file operations. Each file operation is listed in the left column. The following statistics are reported for each operation:

#ops

Number of calls for this operation

bytes

Average transfer size in bytes (only applies to read, write, readdir)

The entity being reported on (fstype or mount point) is displayed in the first row.

-i

Reports the activity for kernel I/O operations. The following statistics are reported:

read ops

Number of data read calls

read bytes

Number of bytes read

write ops

Number of data write calls

write bytes

Number of bytes written

rddir ops

Number of read directory calls

rddir bytes

Number of bytes read by reading directories

rwlock ops

Number of internal file system lock operations

rwulock ops

Number of internal file system unlock operations

The entity being reported on (fstype or mount point) is displayed in the last column.

-n

Reports the activity for kernel naming operations. The following statistics are reported:

lookup

Number of file name retrieval calls

creat

Number of file creation calls

remov

Number of file remove calls

link

Number of link calls

renam

Number of file renaming calls

mkdir

Number of directory creation calls

rmdir

Number of directory removal calls

rddir

Number of directory read calls

symlink

Number of symlink creation calls

rdlink

Number of symlink read calls

The entity being reported on (fstype or mount point) is displayed in the last column.

-v

Reports the activity for calls to the virtual memory operations. The following statistics are reported.

map

Number of calls mapping a file

addmap

Number of calls setting additional mapping to a mapped file

delmap

Number of calls deleting mapping to a file

getpag

Number of calls retrieving a page of data from a file

putpag

Number of calls writing a page of data to a file

pagio

Number of calls to transfer pages in file system swap files

The entity being reported on (fstype or mount point) is displayed in the last column.

-F

Report on all available file system types.

-Tu|d

Display a time stamp.

Specify u for a printed representation of the internal representation of time (see time(2)) Specify d for the standard date format. (See date(1)). The time stamp is only used when an interval is set.

Operands

The following operands are supported:

count

Display only count reports.

fstype

Explicitly specify the file system type(s) to be reported. The file system module must be loaded.

interval

Report once each interval seconds.

path

Specify the path(s) of the mount point(s) to be reported. If path is not a mount point, the mount point containing path will be determined and displayed in the output.

If no interval and no count are specified, a single report is
printed and fsstat exits. If an interval is specified but no count
is specified, fsstat prints reports every interval seconds indefinitely until the command is
interrupted.

Examples

Example 1 Displaying General Activity

The following example shows general activity for all file system types.

See Also

Notes

All display options (-a, -f, -i, -n, -v) are mutually exclusive. Entering
more than one of these options will result in an error.

The fstype and path operands must appear after the option, but before
the interval or count on the command line. For example, “fsstat-afstypeinterval”. Preference is given to fstype so that if a user
wishes to see the statistics for a directory that has the same
name as an fstype (for example, ufs), then the path must be
specified unambiguously (for example, ./ufs). Similarly, in order to define a file with
a numeric name (for example, “10“) from an interval or count operand,
the name should be prefixed accordingly (for example, ./10).

When an interval is used, headers repeat after more than 12 lines
of statistics have been displayed and the set of lines to be
displayed in the current interval have completed.

Statistics are not displayed for all pseudo-filesystems. The output displayed with the
-F option shows which of the loaded filesystem types are supported.

Unbundled file systems may not be recognized by fsstat.

The command-line options are classified as Unstable and could change. The output
is not considered to be an interface. The construction of higher level
software tools depend on either the command-line options or the output of
fsstat is not recommended.