1 .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
8 .Nd report system calls and page faults related to filesystem activity in
11 .Nm fs_usage [-e] [-w] [-f mode [-f mode] ...] [ pid|cmd [pid|cmd] ...]
15 utility presents an ongoing display of system call usage information
16 pertaining to filesystem activity.
17 It requires root privileges due to the kernel tracing facility it uses to
19 By default the activity monitored includes all system processes except the
22 process, Terminal, telnetd, sshd, rlogind, tcsh, csh and sh.
23 These defaults can be overridden such that output is limited to include or
24 exclude a list of processes specified by the user.
26 The output presented by
28 is formatted according to the size of your window.
29 A narrow window will display fewer columns of data.
30 Use a wide window for maximum data display.
31 You may override the window formatting restrictions by forcing a wide display
35 In this case, the data displayed will wrap when the window is not wide enough.
37 The options are as follows:
42 option generates output that excludes sampling
43 of the running fs_usage tool.
44 If a list of process ids or commands is also given, then those processes are
45 also excluded from the sampled output.
49 option forces a wider, more detailed output, regardless of the window size.
53 option turns on output filtering based on the
56 Multiple filtering options can be specified.
57 By default no output filtering occurs.
58 The supported modes are:
61 Only network related output is displayed.
64 Only file system related output is displayed.
67 In addition, display CACHE_HIT output.
69 The sampled data can be limited to a list of process ids or commands.
70 When a command name is given, all processes with that name will be sampled.
73 option has the opposite effect, excluding sampled data relating to the given
74 list of process ids or commands.
77 If you set the DYLD_IMAGE_SUFFIX environment variable to
79 then an application will use the debug version of all libraries including the
85 is run against a Carbon Application launched in this environment, then the
86 high level Carbon FileManager calls will be displayed bracketing the system
87 calls that they are built on.
89 The data columns displayed are as follows:
93 TOD when call occurred.
94 Wide mode will have millisecond granularity.
96 The name of the network or filesystem related call, page-in, page-out or physical disk access.
98 Of the form F=x, x is a file descriptor.
99 Depending on the type of system call, this will be either an input value or a
102 Of the form B=x, x is the number of bytes requested by the call.
104 On error, the errno is displayed in brackets.
106 Pathname of the file accessed (up to the last 28 bytes).
108 Of the form A=0xnnnnnnnn, where 0xnnnnnnnn is the address being faulted.
109 .It DISK BLOCK NUMBER
110 Of the form D=0xnnnnnnnn, where 0xnnnnnnnn is the block number of the physical
111 disk block being read or written.
113 Of the form O=0xnnnnnnnn, where 0xnnnnnnnn is a file offset.
115 Of the form S=x, x is the number of ready descriptors returned by the select()
117 If S=0, the time limit expired.
119 The elapsed time spent in the system call.
122 after the elapsed time indicates the process was scheduled out during this file
124 In this case, the elapsed time includes the wait time.
126 The process that made the system call.
131 fs_usage -w -f filesys Mail
134 will display file system related data for all instances of processes named Mail.
135 Maximum data output will be displayed in the window.