fsstat - report file system statistics
fsstat [-a|f|i|n|v] [-T | u|d] {-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:
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:
100
2048
3000000
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}>>
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:
new file
name remov
name chng
attr get
attr set
lookup ops
rddir ops
read ops
read bytes
write ops
write bytes
The entity being reported on (fstype or mount point) is displayed in the last column.
The following options are supported:
-a
getattr
setattr
getsec
setsec
The entity being reported on (fstype or mount point) is displayed in the last column.
-f
#ops
bytes
The entity being reported on (fstype or mount point) is displayed in the first row.
-i
read ops
read bytes
write ops
write bytes
rddir ops
rddir bytes
rwlock ops
rwulock ops
The entity being reported on (fstype or mount point) is displayed in the last column.
-n
lookup
creat
remov
link
renam
mkdir
rmdir
rddir
symlink
rdlink
The entity being reported on (fstype or mount point) is displayed in the last column.
-v
map
addmap
delmap
getpag
putpag
pagio
The entity being reported on (fstype or mount point) is displayed in the last column.
-F
-T u|d
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.
The following operands are supported:
count
fstype
interval
path
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.
Example 1 Displaying General Activity
The 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 nfs4
Example 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 tmpfs
Example 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/home
Example 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 0
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:
0
1
2
See attributes(5) for descriptions of the following attributes:
|
The command-line options are Unstable. 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 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.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |