8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / fsstat.1m
blobfce7a1bf64d052393d1a0f36da9c0492a3e4e9d4
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH FSSTAT 1M "Jan 5, 2007"
7 .SH NAME
8 fsstat \- report file system statistics
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBfsstat\fR [\fB-a|f|i|n|v\fR] [\fB-T\fR | u|d] {\fB-F\fR | {\fIfstype\fR|\fIpath\fR}...}
13      [\fIinterval\fR [\fIcount\fR]]
14 .fi
16 .SH DESCRIPTION
17 .sp
18 .LP
19 \fBfsstat\fR reports kernel file operation activity by the file system type
20 (\fIfstype\fR) or by the path name, which is converted to a mount point. The
21 first set of lines of output reports all activity since:
22 .RS +4
23 .TP
24 .ie t \(bu
25 .el o
26 The file system module was loaded (in the case of \fIfstype\fR)
27 .RE
28 .RS +4
29 .TP
30 .ie t \(bu
31 .el o
32 The file system was mounted (in the case of mount point)
33 .RE
34 .sp
35 .LP
36 Statistics are gathered at the file system independent layer at both the
37 \fIfstype\fR and the mount point levels. However, not all file system types are
38 represented in the gathering of statistics. (See the NOTES section of this man
39 page.)
40 .sp
41 .LP
42 The output of \fBfsstat\fR is dependent on the mode (option) requested. All
43 statistic fields are displayed using "smart numbers" which automatically scale
44 the units in a human readable form that fits in a maximum of 5 characters. For
45 example:
46 .sp
47 .ne 2
48 .na
49 \fB100\fR
50 .ad
51 .RS 11n
52 is displayed as 100
53 .RE
55 .sp
56 .ne 2
57 .na
58 \fB2048\fR
59 .ad
60 .RS 11n
61 is displayed as 2K
62 .RE
64 .sp
65 .ne 2
66 .na
67 \fB3000000\fR
68 .ad
69 .RS 11n
70 is displayed as 2.86M
71 .RE
73 .sp
74 .LP
75 The unit modifiers are: K (Kbyte), M (Mbyte), G (Gbyte), T (terabyte), P
76 (petabyte), and E (exabyte).
77 .sp
78 .LP
79 During the execution of \fBfsstat\fR, the state of the system can change. If
80 relevant, a state change message is included in the \fBfsstat\fR output in one
81 of the following forms:
82 .sp
83 .in +2
84 .nf
85 <<mount point no longer available: {path}>>
86 <<file system module no longer loaded: {fstype}>>
87 .fi
88 .in -2
89 .sp
91 .sp
92 .LP
93 After the state change messages are displayed, \fBfsstat\fR continues to
94 display the statistics as directed. If all of the \fIfstypes\fR and mount
95 points that \fBfsstat\fR was reporting on are no longer available, then
96 \fBfsstat\fR exits.
97 .sp
98 .LP
99 The user is required to specify the \fB-F\fR option (all available file system
100 types) or a list of one or more \fIfstypes\fR and/or mount points.
103 The default report shows general file system activity. This display combines
104 similar operations into general categories as follows:
106 .ne 2
108 \fBnew file\fR
110 .RS 15n
111 Number of creation operations for file system objects (for example, files,
112 directories, symlinks, etc.)
116 .ne 2
118 \fBname remov\fR
120 .RS 15n
121 Number of name removal operations
125 .ne 2
127 \fBname chng\fR
129 .RS 15n
130 Number of name change operations
134 .ne 2
136 \fBattr get\fR
138 .RS 15n
139 Number of object attribute retrieval operations
143 .ne 2
145 \fBattr set\fR
147 .RS 15n
148 Number of object attribute change operations
152 .ne 2
154 \fBlookup ops\fR
156 .RS 15n
157 Number of object lookup operations
161 .ne 2
163 \fBrddir ops\fR
165 .RS 15n
166 Number of read directory operations
170 .ne 2
172 \fBread ops\fR
174 .RS 15n
175 Number of data read operations
179 .ne 2
181 \fBread bytes\fR
183 .RS 15n
184 Bytes transferred by data read operations
188 .ne 2
190 \fBwrite ops\fR
192 .RS 15n
193 Number of data write operations
197 .ne 2
199 \fBwrite bytes\fR
201 .RS 15n
202 Bytes transferred by data write operations
207 The entity being reported on (\fIfstype\fR or mount point) is displayed in the
208 last column.
209 .SH OPTIONS
212 The following options are supported:
214 .ne 2
216 \fB\fB-a\fR\fR
218 .RS 10n
219 Report the activity for kernel attribute operations. The following statistics
220 are reported:
222 .ne 2
224 \fBgetattr\fR
226 .RS 11n
227 Number of file attribute retrieval calls
231 .ne 2
233 \fBsetattr\fR
235 .RS 11n
236 Number of file attribute modification calls
240 .ne 2
242 \fBgetsec\fR
244 .RS 11n
245 Number of file security attribute retrieval calls
249 .ne 2
251 \fBsetsec\fR
253 .RS 11n
254 Number of file security attribute modification calls
257 The entity being reported on (\fIfstype\fR or mount point) is displayed in the
258 last column.
262 .ne 2
264 \fB\fB-f\fR\fR
266 .RS 10n
267 Report the full activity for all kernel file operations. Each file operation is
268 listed in the left column. The following statistics are reported for each
269 operation:
271 .ne 2
273 \fB#ops\fR
275 .RS 9n
276 Number of calls for this operation
280 .ne 2
282 \fBbytes\fR
284 .RS 9n
285 Average transfer size in bytes (only applies to read, write, readdir)
288 The entity being reported on (\fIfstype\fR or mount point) is displayed in the
289 first row.
293 .ne 2
295 \fB\fB-i\fR\fR
297 .RS 10n
298 Reports the activity for kernel I/O operations. The following statistics are
299 reported:
301 .ne 2
303 \fBread ops\fR
305 .RS 15n
306 Number of data read calls
310 .ne 2
312 \fBread bytes\fR
314 .RS 15n
315 Number of bytes read
319 .ne 2
321 \fBwrite ops\fR
323 .RS 15n
324 Number of data write calls
328 .ne 2
330 \fBwrite bytes\fR
332 .RS 15n
333 Number of bytes written
337 .ne 2
339 \fBrddir ops\fR
341 .RS 15n
342 Number of read directory calls
346 .ne 2
348 \fBrddir bytes\fR
350 .RS 15n
351 Number of bytes read by reading directories
355 .ne 2
357 \fBrwlock ops\fR
359 .RS 15n
360 Number of internal file system lock operations
364 .ne 2
366 \fBrwulock ops\fR
368 .RS 15n
369 Number of internal file system unlock operations
372 The entity being reported on (\fIfstype\fR or mount point) is displayed in the
373 last column.
377 .ne 2
379 \fB\fB-n\fR\fR
381 .RS 10n
382 Reports the activity for kernel naming operations. The following statistics are
383 reported:
385 .ne 2
387 \fBlookup\fR
389 .RS 11n
390 Number of file name retrieval calls
394 .ne 2
396 \fBcreat\fR
398 .RS 11n
399 Number of file creation calls
403 .ne 2
405 \fBremov\fR
407 .RS 11n
408 Number of file remove calls
412 .ne 2
414 \fBlink\fR
416 .RS 11n
417 Number of link calls
421 .ne 2
423 \fBrenam\fR
425 .RS 11n
426 Number of file renaming calls
430 .ne 2
432 \fBmkdir\fR
434 .RS 11n
435 Number of directory creation calls
439 .ne 2
441 \fBrmdir\fR
443 .RS 11n
444 Number of directory removal calls
448 .ne 2
450 \fBrddir\fR
452 .RS 11n
453 Number of directory read calls
457 .ne 2
459 \fBsymlink\fR
461 .RS 11n
462 Number of symlink creation calls
466 .ne 2
468 \fBrdlink\fR
470 .RS 11n
471 Number of symlink read calls
474 The entity being reported on (\fIfstype\fR or mount point) is displayed in the
475 last column.
479 .ne 2
481 \fB\fB-v\fR\fR
483 .RS 10n
484 Reports the activity for calls to the virtual memory operations. The following
485 statistics are reported.
487 .ne 2
489 \fBmap\fR
491 .RS 10n
492 Number of calls mapping a file
496 .ne 2
498 \fBaddmap\fR
500 .RS 10n
501 Number of calls setting additional mapping to a mapped file
505 .ne 2
507 \fBdelmap\fR
509 .RS 10n
510 Number of calls deleting mapping to a file
514 .ne 2
516 \fBgetpag\fR
518 .RS 10n
519 Number of calls retrieving a page of data from a file
523 .ne 2
525 \fBputpag\fR
527 .RS 10n
528 Number of calls writing a page of data to a file
532 .ne 2
534 \fBpagio\fR
536 .RS 10n
537 Number of calls to transfer pages in file system swap files
540 The entity being reported on (fstype or mount point) is displayed in the last
541 column.
545 .ne 2
547 \fB\fB-F\fR\fR
549 .RS 10n
550 Report on all available file system types.
554 .ne 2
556 \fB\fB-T\fR \fIu\fR|\fId\fR\fR
558 .RS 10n
559 Display a time stamp.
561 Specify \fIu\fR for a printed representation of the internal representation of
562 time (see \fBtime\fR(2)) Specify \fId\fR for the standard date format. (See
563 \fBdate\fR(1)). The time stamp is only used when an interval is set.
566 .SH OPERANDS
569 The following operands are supported:
571 .ne 2
573 \fB\fIcount\fR\fR
575 .RS 12n
576 Display only \fIcount\fR reports.
580 .ne 2
582 \fB\fIfstype\fR\fR
584 .RS 12n
585 Explicitly specify the file system type(s) to be reported. The file system
586 module must be loaded.
590 .ne 2
592 \fB\fIinterval\fR\fR
594 .RS 12n
595 Report once each \fIinterval\fR seconds.
599 .ne 2
601 \fB\fIpath\fR\fR
603 .RS 12n
604 Specify the path(s) of the mount point(s) to be reported. If path is not a
605 mount point, the mount point containing path will be determined and displayed
606 in the output.
611 If no \fIinterval\fR and no \fIcount\fR are specified, a single report is
612 printed and \fBfsstat\fR exits. If an \fIinterval\fR is specified but no
613 \fIcount\fR is specified, \fBfsstat\fR prints reports every \fIinterval\fR
614 seconds indefinitely until the command is interrupted.
615 .SH EXAMPLES
617 \fBExample 1 \fRDisplaying General Activity
620 The following example shows general activity for all file system types.
623 .in +2
625 \fB$ fsstat -F\fR
626  new  name   name  attr   attr lookup rddir  read read  write write
627  file remov  chng   get    set    ops   ops   ops bytes   ops bytes
628   313K  214K 38.5K 2.16M 56.2K  8.36M 52.8K 19.7M 39.9G 18.8M 39.1G ufs
629      0     0     0 2.95K     0  3.81K   282 2.52K  466K     0     0 proc
630      0     0     0     0     0      0     0     0     0     0     0 nfs
631     10     8     2    86     9     98    15   413  103M 8.43K 1.05G zfs
632     13    14     4    98    16    125    10 1.01K  258M 15.9K  127M lofs
633 8.73K 3.29K 5.25K 55.3K    37  1.20M    44 37.9K 38.3M 47.2K 35.9M tmpfs
634      0     0     0 4.93K     0      0     0 1.08K  913K     0     0 mntfs
635      3     2     1   503     3    897    13   122 25.8K   128  272K nfs3
636     10     8     0   615    10  10.1K    18    61 45.6K   292 2.26M nfs4
638 .in -2
642 \fBExample 2 \fRDisplaying Naming Activity
645 The following example shows the naming activity for ufs, nfs, nfs3, nfs4, and
646 tmpfs:
649 .in +2
651 \fB$ fsstat -n ufs nfs nfs3 nfs4 tmpfs\fR
652 lookup creat remov  link renam mkdir rmdir rddir symlnk rdlnk
653 3.57M  3.10K   586     6    24   115   100 30.2K      5  330K ufs
654     0      0     0     0     0     0     0     0      0     0 nfs
655 18.3K      3     5     0     0     0     0 1.03K      2   346 nfs3
656   535      0     0     0     0     0     0    46      0     4 nfs4
657   146     24    15     0     0     4     0     4      0     0 tmpfs
659 .in -2
663 \fBExample 3 \fRDisplaying Attribute Activity
666 The following example shows the attribute activity for the FS type ufs and the
667 mounted file systems "/" and "/export/home" every three seconds for every third
668 iteration:
671 .in +2
673 \fB# fsstat -a ufs / /export/home 3 3\fR
674 getattr setattr getsec setsec
675   378K    91.9K  11.8K      0 ufs
676   367K    82.3K  11.6K      0 /
677  11.3K     9.6K    198      0 /export/home
678  4.97K    2.27K    163      0 ufs
679  3.94K    1.36K    162      0 /
680  1.03K      927      1      0 /export/home
681  2.30K    1.06K     73      0 ufs
682  1.95K      766     71      0 /
683    361      317      2      0 /export/home
684  2.33K    1.06K     78      0 ufs
685  1.64K      451     77      0 /
686    711      631      1      0 /export/home
688 .in -2
692 \fBExample 4 \fRDisplaying File Operation Statistics
695 The following example shows the statistics for each file operation for "/"
696 (using the \fB-f\fR option):
699 .in +2
701 \fB$ fsstat -f /\fR
702 Mountpoint: /
703  operation  #ops  bytes
704       open 8.54K
705      close  9.8K
706       read 43.6K  65.9M
707      write 1.57K  2.99M
708      ioctl 2.06K
709      setfl     4
710    getattr 40.3K
711    setattr    38
712     access 9.19K
713     lookup  203K
714     create   595
715     remove    56
716       link     0
717     rename     9
718      mkdir    19
719      rmdir     0
720    readdir 2.02K  2.27M
721    symlink     4
722   readlink 8.31K
723      fsync   199
724   inactive 2.96K
725        fid     0
726     rwlock 47.2K
727   rwunlock 47.2K
728       seek 29.1K
729        cmp 42.9K
730     frlock 4.45K
731      space     8
732     realvp 3.25K
733    getpage  104K
734    putpage 2.69K
735        map 13.2K
736     addmap 34.4K
737     delmap 33.4K
738       poll   287
739       dump     0
740   pathconf    54
741     pageio     0
742    dumpctl     0
743    dispose 23.8K
744 getsecattr   697
745 setsecattr     0
746    shrlock     0
747    vnevent     0
749 .in -2
752 .SH ENVIRONMENT VARIABLES
755 See \fBenviron\fR(5) for descriptions of the following environment variables
756 that affect the execution of \fBfsstat\fR: \fBLANG\fR, \fBLC_ALL\fR,
757 \fBLC_CTYPE\fR,  \fBLC_MESSAGES\fR,  \fBLC_TIME\fR, and \fBNLSPATH\fR.
758 .SH EXIT STATUS
761 The following exit values are returned:
763 .ne 2
765 \fB\fB0\fR\fR
767 .RS 5n
768 Successful completion.
772 .ne 2
774 \fB\fB1\fR\fR
776 .RS 5n
777 A fatal error occurred. A fatal error could be a failed system call or another
778 internal error.
782 .ne 2
784 \fB\fB2\fR\fR
786 .RS 5n
787 Invalid command-line options were specified.
790 .SH ATTRIBUTES
793 See \fBattributes\fR(5) for descriptions of the following attributes:
798 box;
799 c | c
800 l | l .
801 ATTRIBUTE TYPE  ATTRIBUTE VALUE
803 CSI     Enabled
805 Interface Stability     See below.
810 The command-line options are Unstable. The human-readable output is not
811 considered an interface.
812 .SH SEE ALSO
815 \fBdate\fR(1), \fBtime\fR(2), \fBattributes\fR(5)
816 .SH NOTES
819 All display options (\fB-a\fR, \fB-f\fR, \fB-i\fR, \fB-n\fR, \fB-v\fR) are
820 mutually exclusive. Entering more than one of these options will result in an
821 error.
824 The \fIfstype\fR and \fIpath\fR operands must appear after the option, but
825 before the \fIinterval\fR or \fIcount\fR on the command line. For example,
826 "\fBfsstat\fR \fB-a\fR \fIfstype\fR \fIinterval\fR". Preference is given to
827 \fIfstype\fR so that if a user wishes to see the statistics for a directory
828 that has the same name as an \fIfstype\fR (for example, ufs), then the path
829 must be specified unambiguously (for example, ./ufs). Similarly, in order to
830 define a file with a numeric name (for example, "10") from an interval or count
831 operand, the name should be prefixed accordingly (for example, ./10).
834 When an interval is used, headers repeat after more than 12 lines of statistics
835 have been displayed and the set of lines to be displayed in the current
836 interval have completed.
839 Statistics are not displayed for all pseudo-filesystems. The output displayed
840 with the \fB-F\fR option shows which of the loaded filesystem types are
841 supported.
844 Unbundled file systems may not be recognized by \fBfsstat\fR.
847 The command-line options are classified as Unstable and could change. The
848 output is not considered to be an interface. The construction of higher level
849 software tools depend on either the command-line options or the output of
850 \fBfsstat\fR is not recommended.