1fsstat(1M)              System Administration Commands              fsstat(1M)
2
3
4

NAME

6       fsstat - report file system statistics
7

SYNOPSIS

9       fsstat [-a|f|i|n|v] [-T | u|d] {-F | {fstype|path}...}
10            [interval [count]]
11
12

DESCRIPTION

14       fsstat  reports  kernel file operation activity by the file system type
15       (fstype) or by the path name, which is converted to a mount point.  The
16       first set of lines of output reports all activity since:
17
18           o      The file system module was loaded (in the case of fstype)
19
20           o      The file system was mounted (in the case of mount point)
21
22
23       Statistics  are  gathered  at the file system independent layer at both
24       the fstype and the mount point levels. However,  not  all  file  system
25       types  are  represented  in the gathering of statistics. (See the NOTES
26       section of this man page.)
27
28
29       The output of fsstat is dependent on the mode (option)  requested.  All
30       statistic  fields  are  displayed using "smart numbers" which automati‐
31       cally scale the units in a human readable form that fits in  a  maximum
32       of 5 characters. For example:
33
34       100        is displayed as 100
35
36
37       2048       is displayed as 2K
38
39
40       3000000    is displayed as 2.86M
41
42
43
44       The  unit modifiers are: K (Kbyte), M (Mbyte), G (Gbyte), T (terabyte),
45       P (petabyte), and E (exabyte).
46
47
48       During the execution of fsstat, the state of the system can change.  If
49       relevant,  a  state  change message is included in the fsstat output in
50       one of the following forms:
51
52         <<mount point no longer available: {path}>>
53         <<file system module no longer loaded: {fstype}>>
54
55
56
57
58       After the state change messages are displayed, fsstat continues to dis‐
59       play the statistics as directed. If all of the fstypes and mount points
60       that fsstat was reporting on  are  no  longer  available,  then  fsstat
61       exits.
62
63
64       The  user is required to specify the -F option (all available file sys‐
65       tem types) or a list of one or more fstypes and/or mount points.
66
67
68       The default report shows general file  system  activity.  This  display
69       combines similar operations into general categories as follows:
70
71       new file       Number  of  creation  operations for file system objects
72                      (for example, files, directories, symlinks, etc.)
73
74
75       name remov     Number of name removal operations
76
77
78       name chng      Number of name change operations
79
80
81       attr get       Number of object attribute retrieval operations
82
83
84       attr set       Number of object attribute change operations
85
86
87       lookup ops     Number of object lookup operations
88
89
90       rddir ops      Number of read directory operations
91
92
93       read ops       Number of data read operations
94
95
96       read bytes     Bytes transferred by data read operations
97
98
99       write ops      Number of data write operations
100
101
102       write bytes    Bytes transferred by data write operations
103
104
105
106       The entity being reported on (fstype or mount point)  is  displayed  in
107       the last column.
108

OPTIONS

110       The following options are supported:
111
112       -a        Report the activity for kernel attribute operations. The fol‐
113                 lowing statistics are reported:
114
115                 getattr    Number of file attribute retrieval calls
116
117
118                 setattr    Number of file attribute modification calls
119
120
121                 getsec     Number of file security attribute retrieval calls
122
123
124                 setsec     Number of  file  security  attribute  modification
125                            calls
126
127                 The  entity being reported on (fstype or mount point) is dis‐
128                 played in the last column.
129
130
131       -f        Report the full activity for all kernel file operations. Each
132                 file  operation  is  listed in the left column. The following
133                 statistics are reported for each operation:
134
135                 #ops     Number of calls for this operation
136
137
138                 bytes    Average transfer size  in  bytes  (only  applies  to
139                          read, write, readdir)
140
141                 The  entity being reported on (fstype or mount point) is dis‐
142                 played in the first row.
143
144
145       -i        Reports the activity for kernel I/O operations. The following
146                 statistics are reported:
147
148                 read ops       Number of data read calls
149
150
151                 read bytes     Number of bytes read
152
153
154                 write ops      Number of data write calls
155
156
157                 write bytes    Number of bytes written
158
159
160                 rddir ops      Number of read directory calls
161
162
163                 rddir bytes    Number of bytes read by reading directories
164
165
166                 rwlock ops     Number of internal file system lock operations
167
168
169                 rwulock ops    Number  of  internal file system unlock opera‐
170                                tions
171
172                 The entity being reported on (fstype or mount point) is  dis‐
173                 played in the last column.
174
175
176       -n        Reports  the  activity for kernel naming operations. The fol‐
177                 lowing statistics are reported:
178
179                 lookup     Number of file name retrieval calls
180
181
182                 creat      Number of file creation calls
183
184
185                 remov      Number of file remove calls
186
187
188                 link       Number of link calls
189
190
191                 renam      Number of file renaming calls
192
193
194                 mkdir      Number of directory creation calls
195
196
197                 rmdir      Number of directory removal calls
198
199
200                 rddir      Number of directory read calls
201
202
203                 symlink    Number of symlink creation calls
204
205
206                 rdlink     Number of symlink read calls
207
208                 The entity being reported on (fstype or mount point) is  dis‐
209                 played in the last column.
210
211
212       -v        Reports  the  activity for calls to the virtual memory opera‐
213                 tions. The following statistics are reported.
214
215                 map       Number of calls mapping a file
216
217
218                 addmap    Number of calls setting  additional  mapping  to  a
219                           mapped file
220
221
222                 delmap    Number of calls deleting mapping to a file
223
224
225                 getpag    Number  of  calls  retrieving a page of data from a
226                           file
227
228
229                 putpag    Number of calls writing a page of data to a file
230
231
232                 pagio     Number of calls to transfer pages  in  file  system
233                           swap files
234
235                 The  entity being reported on (fstype or mount point) is dis‐
236                 played in the last column.
237
238
239       -F        Report on all available file system types.
240
241
242       -T u|d    Display a time stamp.
243
244                 Specify u for a printed representation of the internal repre‐
245                 sentation  of  time  (see time(2)) Specify d for the standard
246                 date format. (See date(1)). The time stamp is only used  when
247                 an interval is set.
248
249

OPERANDS

251       The following operands are supported:
252
253       count       Display only count reports.
254
255
256       fstype      Explicitly  specify the file system type(s) to be reported.
257                   The file system module must be loaded.
258
259
260       interval    Report once each interval seconds.
261
262
263       path        Specify the path(s) of the mount point(s) to  be  reported.
264                   If  path  is  not a mount point, the mount point containing
265                   path will be determined and displayed in the output.
266
267
268
269       If no interval and no count are specified, a single report  is  printed
270       and  fsstat  exits.  If an interval is specified but no count is speci‐
271       fied, fsstat prints reports every interval seconds  indefinitely  until
272       the command is interrupted.
273

EXAMPLES

275       Example 1 Displaying General Activity
276
277
278       The following example shows general activity for all file system types.
279
280
281         $ fsstat -F
282          new  name   name  attr   attr lookup rddir  read read  write write
283          file remov  chng   get    set    ops   ops   ops bytes   ops bytes
284           313K  214K 38.5K 2.16M 56.2K  8.36M 52.8K 19.7M 39.9G 18.8M 39.1G ufs
285              0     0     0 2.95K     0  3.81K   282 2.52K  466K     0     0 proc
286              0     0     0     0     0      0     0     0     0     0     0 nfs
287             10     8     2    86     9     98    15   413  103M 8.43K 1.05G zfs
288             13    14     4    98    16    125    10 1.01K  258M 15.9K  127M lofs
289         8.73K 3.29K 5.25K 55.3K    37  1.20M    44 37.9K 38.3M 47.2K 35.9M tmpfs
290              0     0     0 4.93K     0      0     0 1.08K  913K     0     0 mntfs
291              3     2     1   503     3    897    13   122 25.8K   128  272K nfs3
292             10     8     0   615    10  10.1K    18    61 45.6K   292 2.26M nfs4
293
294
295
296       Example 2 Displaying Naming Activity
297
298
299       The  following  example  shows  the naming activity for ufs, nfs, nfs3,
300       nfs4, and tmpfs:
301
302
303         $ fsstat -n ufs nfs nfs3 nfs4 tmpfs
304         lookup creat remov  link renam mkdir rmdir rddir symlnk rdlnk
305         3.57M  3.10K   586     6    24   115   100 30.2K      5  330K ufs
306             0      0     0     0     0     0     0     0      0     0 nfs
307         18.3K      3     5     0     0     0     0 1.03K      2   346 nfs3
308           535      0     0     0     0     0     0    46      0     4 nfs4
309           146     24    15     0     0     4     0     4      0     0 tmpfs
310
311
312
313       Example 3 Displaying Attribute Activity
314
315
316       The following example shows the attribute activity for the FS type  ufs
317       and the mounted file systems "/" and "/export/home" every three seconds
318       for every third iteration:
319
320
321         # fsstat -a ufs / /export/home 3 3
322         getattr setattr getsec setsec
323           378K    91.9K  11.8K      0 ufs
324           367K    82.3K  11.6K      0 /
325          11.3K     9.6K    198      0 /export/home
326          4.97K    2.27K    163      0 ufs
327          3.94K    1.36K    162      0 /
328          1.03K      927      1      0 /export/home
329          2.30K    1.06K     73      0 ufs
330          1.95K      766     71      0 /
331            361      317      2      0 /export/home
332          2.33K    1.06K     78      0 ufs
333          1.64K      451     77      0 /
334            711      631      1      0 /export/home
335
336
337
338       Example 4 Displaying File Operation Statistics
339
340
341       The following example shows the statistics for each file operation  for
342       "/" (using the -f option):
343
344
345         $ fsstat -f /
346         Mountpoint: /
347          operation  #ops  bytes
348               open 8.54K
349              close  9.8K
350               read 43.6K  65.9M
351              write 1.57K  2.99M
352              ioctl 2.06K
353              setfl     4
354            getattr 40.3K
355            setattr    38
356             access 9.19K
357             lookup  203K
358             create   595
359             remove    56
360               link     0
361             rename     9
362              mkdir    19
363              rmdir     0
364            readdir 2.02K  2.27M
365            symlink     4
366           readlink 8.31K
367              fsync   199
368           inactive 2.96K
369                fid     0
370             rwlock 47.2K
371           rwunlock 47.2K
372               seek 29.1K
373                cmp 42.9K
374             frlock 4.45K
375              space     8
376             realvp 3.25K
377            getpage  104K
378            putpage 2.69K
379                map 13.2K
380             addmap 34.4K
381             delmap 33.4K
382               poll   287
383               dump     0
384           pathconf    54
385             pageio     0
386            dumpctl     0
387            dispose 23.8K
388         getsecattr   697
389         setsecattr     0
390            shrlock     0
391            vnevent     0
392
393
394

ENVIRONMENT VARIABLES

396       See  environ(5) for descriptions of the following environment variables
397       that affect the execution of fsstat: LANG, LC_ALL,  LC_CTYPE,   LC_MES‐
398       SAGES,  LC_TIME, and NLSPATH.
399

EXIT STATUS

401       The following exit values are returned:
402
403       0    Successful completion.
404
405
406       1    A  fatal  error  occurred.  A fatal error could be a failed system
407            call or another internal error.
408
409
410       2    Invalid command-line options were specified.
411
412

ATTRIBUTES

414       See attributes(5) for descriptions of the following attributes:
415
416
417
418
419       ┌─────────────────────────────┬─────────────────────────────┐
420       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
421       ├─────────────────────────────┼─────────────────────────────┤
422       │Availability                 │SUNWcsu                      │
423       ├─────────────────────────────┼─────────────────────────────┤
424       │CSI                          │Enabled                      │
425       ├─────────────────────────────┼─────────────────────────────┤
426       │Interface Stability          │See below.                   │
427       └─────────────────────────────┴─────────────────────────────┘
428
429
430       The command-line options are Unstable. The human-readable output is not
431       considered an interface.
432

SEE ALSO

434       date(1), time(2), attributes(5)
435

NOTES

437       All display options (-a, -f, -i, -n, -v) are mutually exclusive. Enter‐
438       ing more than one of these options will result in an error.
439
440
441       The fstype and path operands must appear after the option,  but  before
442       the  interval  or  count  on  the command line. For example, "fsstat -a
443       fstype interval". Preference is given to  fstype  so  that  if  a  user
444       wishes  to see the statistics for a directory that has the same name as
445       an fstype (for example, ufs), then the path must be specified unambigu‐
446       ously (for example, ./ufs). Similarly, in order to define a file with a
447       numeric name (for example, "10") from an interval or count operand, the
448       name should be prefixed accordingly (for example, ./10).
449
450
451       When  an  interval  is used, headers repeat after more than 12 lines of
452       statistics have been displayed and the set of lines to be displayed  in
453       the current interval have completed.
454
455
456       Statistics  are  not  displayed  for all pseudo-filesystems. The output
457       displayed with the -F option shows which of the loaded filesystem types
458       are supported.
459
460
461       Unbundled file systems may not be recognized by fsstat.
462
463
464       The  command-line  options are classified as Unstable and could change.
465       The output is not considered to be an interface.  The  construction  of
466       higher  level  software tools depend on either the command-line options
467       or the output of fsstat is not recommended.
468
469
470
471SunOS 5.11                        5 Jan 2007                        fsstat(1M)
Impressum