fsstat [-A|a|f|i|n|v|Z] [-T d|u] [[-z zone]...] {-F | {fstype|path}...} [interval [count]]
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:
is displayed as 100
is displayed as 2K
is displayed as 2.86M
The unit modifiers are: K (Kbyte), M (Mbyte), G (Gbyte), T (terabyte), P (petabyte), and E (exabyte).
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}>> <<zone no longer active: {zonename}>> <<zone now active: {zonename}>>
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:
Number of creation operations for file system objects (for example, files, directories, symlinks, etc.)
Number of name removal operations
Number of name change operations
Number of object attribute retrieval operations
Number of object attribute change operations
Number of object lookup operations
Number of read directory operations
Number of data read operations
Bytes transferred by data read operations
Number of data write operations
Bytes transferred by data write operations
The entity being reported on (fstype or mount point) is displayed in the last column.
The following options are supported:
Report aggregate activity for the specified fstypes across all zones. This is the default behavior if neither –z nor –Z are specified.
When used in conjunction with –z or –Z, the –A option will additionally report on a separate line the aggregate for the specified fstypes across all zones.
Report the activity for kernel attribute operations. The following statistics are reported:
Number of file attribute retrieval calls
Number of file attribute modification calls
Number of file security attribute retrieval calls
Number of file security attribute modification calls
The entity being reported on (fstype or mount point) is displayed in the last column.
Report on all available file system types.
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:
Number of calls for this operation
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.
Reports the activity for kernel I/O operations. The following statistics are reported:
Number of data read calls
Number of bytes read
Number of data write calls
Number of bytes written
Number of read directory calls
Number of bytes read by reading directories
Number of internal file system lock operations
Number of internal file system unlock operations
The entity being reported on (fstype or mount point) is displayed in the last column.
Reports the activity for kernel naming operations. The following statistics are reported:
Number of file name retrieval calls
Number of file creation calls
Number of file remove calls
Number of link calls
Number of file renaming calls
Number of directory creation calls
Number of directory removal calls
Number of directory read calls
Number of symlink creation calls
Number of symlink read calls
The entity being reported on (fstype or mount point) is displayed in the last column.
Reports the activity for calls to the virtual memory operations. The following statistics are reported.
Number of calls mapping a file
Number of calls setting additional mapping to a mapped file
Number of calls deleting mapping to a file
Number of calls retrieving a page of data from a file
Number of calls writing a page of data to a file
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.
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.
Report per-zone activity for each zone.
Specifying –Z has no effect if used in conjunction with –z.
Report on activity in the specified zone. Multiple –z options can be specified to monitor multiple zones. If –z is specified, the user is notified of state changes only for explicitly specified zones.
The following operands are supported:
Display only count reports.
Explicitly specify the file system type(s) to be reported. The file system module must be loaded.
Report once each interval seconds.
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.
In some examples, fsstat output exceeds the width of 80–character displays.
Example 1 Displaying General ActivityThe following example shows general activity for all file system types.
$ fsstat -F new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 313K 214K 38.5K 2.16M 56.2K 8.36M 52.8K 19.7M 39.9G 18.8M 39.1G ufs 0 0 0 2.95K 0 3.81K 282 2.52K 466K 0 0 proc 0 0 0 0 0 0 0 0 0 0 0 nfs 10 8 2 86 9 98 15 413 103M 8.43K 1.05G zfs 13 14 4 98 16 125 10 1.01K 258M 15.9K 127M lofs 8.73K 3.29K 5.25K 55.3K 37 1.20M 44 37.9K 38.3M 47.2K 35.9M tmpfs 0 0 0 4.93K 0 0 0 1.08K 913K 0 0 mntfs 3 2 1 503 3 897 13 122 25.8K 128 272K nfs3 10 8 0 615 10 10.1K 18 61 45.6K 292 2.26M nfs4Example 2 Displaying Naming Activity
The following example shows the naming activity for ufs, nfs, nfs3, nfs4, and tmpfs:
$ fsstat -n ufs nfs nfs3 nfs4 tmpfs lookup creat remov link renam mkdir rmdir rddir symlnk rdlnk 3.57M 3.10K 586 6 24 115 100 30.2K 5 330K ufs 0 0 0 0 0 0 0 0 0 0 nfs 18.3K 3 5 0 0 0 0 1.03K 2 346 nfs3 535 0 0 0 0 0 0 46 0 4 nfs4 146 24 15 0 0 4 0 4 0 0 tmpfsExample 3 Displaying Attribute Activity
The following example shows the attribute activity for the FS type ufs and the mounted file systems “/” and “/export/home” every three seconds for every third iteration:
# fsstat -a ufs / /export/home 3 3 getattr setattr getsec setsec 378K 91.9K 11.8K 0 ufs 367K 82.3K 11.6K 0 / 11.3K 9.6K 198 0 /export/home 4.97K 2.27K 163 0 ufs 3.94K 1.36K 162 0 / 1.03K 927 1 0 /export/home 2.30K 1.06K 73 0 ufs 1.95K 766 71 0 / 361 317 2 0 /export/home 2.33K 1.06K 78 0 ufs 1.64K 451 77 0 / 711 631 1 0 /export/homeExample 4 Displaying File Operation Statistics
The following example shows the statistics for each file operation for “/” (using the –f option):
$ fsstat -f / Mountpoint: / operation #ops bytes open 8.54K close 9.8K read 43.6K 65.9M write 1.57K 2.99M ioctl 2.06K setfl 4 getattr 40.3K setattr 38 access 9.19K lookup 203K create 595 remove 56 link 0 rename 9 mkdir 19 rmdir 0 readdir 2.02K 2.27M symlink 4 readlink 8.31K fsync 199 inactive 2.96K fid 0 rwlock 47.2K rwunlock 47.2K seek 29.1K cmp 42.9K frlock 4.45K space 8 realvp 3.25K getpage 104K putpage 2.69K map 13.2K addmap 34.4K delmap 33.4K poll 287 dump 0 pathconf 54 pageio 0 dumpctl 0 dispose 23.8K getsecattr 697 setsecattr 0 shrlock 0 vnevent 0Example 5 Displaying per-Zone Statistics for All Zones
The following example shows per-zone statistics for each zone on the system, as well as a system-wide aggregate for fstypes tmpfs and zfs.
$ fsstat -A -Z tmpfs zfs new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 125K 116K 8.92K 846K 1.25K 1.36M 252 1013K 913M 1.52M 1.55G tmpfs 98.9K 89.8K 8.87K 600K 1.19K 1.33M 226 394K 253M 1.04M 1.07G tmpfs:global 2.49K 2.42K 32 20.5K 45 3.82K 26 56.8K 85.8M 43.9K 69.5M tmpfs:zone1 23.3K 23.3K 13 226K 13 24.1K 0 562K 574M 452K 425M tmpfs:zone2 82.7K 232K 77.6K 4.72M 73.6K 22.7M 464K 2.88M 6.17G 828K 8.19G zfs 82.1K 231K 77.3K 4.46M 73.5K 21.8M 444K 2.53M 5.71G 809K 8.12G zfs:global 102 88 28 83.3K 68 326K 3.16K 238K 307M 10.5K 54.2M zfs:zone1 499 204 255 179K 34 599K 17.4K 125K 163M 8.85K 21.8M zfs:zone2Example 6 Displaying per-Zone Statistics for Specific Zones
The following example shows per-zone statistics for zones zone1 and zone2, as well as a system-wide aggregate, for fstypes tmpfs and zfs.
$ fsstat -A -Z zone1 -z zone2 tmpfs zfs new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 125K 116K 8.92K 846K 1.25K 1.36M 252 1013K 913M 1.52M 1.55G tmpfs 2.49K 2.42K 32 20.5K 45 3.82K 26 56.8K 85.8M 43.9K 69.5M tmpfs:zone1 23.3K 23.3K 13 226K 13 24.1K 0 562K 574M 452K 425M tmpfs:zone2 82.7K 232K 77.6K 4.72M 73.6K 22.7M 464K 2.88M 6.17G 828K 8.19G zfs 102 88 28 83.3K 68 326K 3.16K 238K 307M 10.5K 54.2M zfs:zone1 499 204 255 179K 34 599K 17.4K 125K 163M 8.85K 21.8M zfs:zone2Example 7 Example 7 Displaying Global Zone-Only Statistics
The following example shows only the global zone's activity for all fstypes.
$ fsstat -z global -F new name name attr attr lookup rddir read read write write file remov chng get set ops ops ops bytes ops bytes 0 0 0 0 0 0 0 0 0 0 0 ufs:global 0 0 0 171K 0 289K 2.05K 628K 262M 230K 10.6M proc:global 0 0 0 0 0 0 0 0 0 0 0 nfs:global 82.1K 231K 77.3K 4.46M 73.5K 21.8M 444K 2.53M 5.71G 809K 8.12G zfs:global 0 0 0 357K 0 0 0 0 0 0 0 lofs:global 98.9K 89.8K 8.87K 600K 1.19K 1.33M 226 394K 253M 1.04M 1.07G tmpfs:global 0 0 0 15.4K 0 0 0 7.44K 1.03M 0 0 mntfs:global 0 0 0 9.34K 0 9.24K 0 0 0 0 0 autofs:global 0 0 0 0 0 0 0 0 0 0 0 nfs3:global 2 3 0 9.16K 12 104K 4 46 179K 12 43.0K nfs4:global
See environ(5) for descriptions of the following environment variables that affect the execution of fsstat: LANG, LC_ALL , LC_CTYPE, LC_MESSAGES, LC_TIME, and NLSPATH.
The following exit values are returned:
Successful completion.
A fatal error occurred. A fatal error could be a failed system call or another internal error.
Invalid command-line options were specified.
See attributes(5) for descriptions of the following attributes:
|
The command-line options are Uncommitted. The human-readable output is not considered an interface.
date(1), time(2), attributes(5)
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 –a fstype interval”. 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 Uncommitted 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.