]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | .\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved. |
2 | .\" | |
20e66415 | 3 | .Dd November 7, 2002 |
1815bff5 A |
4 | .Dt FS_USAGE 1 |
5 | .Os "Mac OS X" | |
6 | .Sh NAME | |
7 | .Nm fs_usage | |
20e66415 A |
8 | .Nd report system calls and page faults related to filesystem activity in |
9 | real-time | |
1815bff5 | 10 | .Sh SYNOPSIS |
20e66415 | 11 | .Nm fs_usage [-e] [-w] [-f mode] [ pid|cmd [pid|cmd] ...] |
1815bff5 | 12 | .Sh DESCRIPTION |
20e66415 | 13 | The |
1815bff5 | 14 | .Nm fs_usage |
20e66415 A |
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 | |
18 | operate. | |
19 | By default the activity monitored includes all system processes except the | |
20 | running | |
21 | .Nm fs_usage | |
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. | |
1815bff5 A |
25 | .Pp |
26 | The output presented by | |
27 | .Nm fs_usage | |
28 | is formatted according to the size of your window. | |
29 | A narrow window will display fewer columns of data. | |
20e66415 A |
30 | Use a wide window for maximum data display. |
31 | You may override the window formatting restrictions by forcing a wide display | |
32 | with the | |
1815bff5 | 33 | .Fl w |
20e66415 A |
34 | option. |
35 | In this case, the data displayed will wrap when the window is not wide enough. | |
1815bff5 A |
36 | .Pp |
37 | The options are as follows: | |
38 | .Bl -tag -width Ds | |
39 | .It Fl e | |
40 | Specifying the | |
41 | .Fl e | |
42 | option generates output that excludes sampling | |
20e66415 A |
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. | |
1815bff5 A |
46 | .It Fl w |
47 | Specifying the | |
48 | .Fl w | |
20e66415 A |
49 | option forces a wider, more detailed output, regardless of the window size. |
50 | .It Fl f | |
51 | Specifying the | |
52 | .Fl f | |
53 | option turns on output filtering based on the | |
54 | .Pa mode | |
55 | provided. | |
56 | By default no filtering occurs. | |
57 | The supported modes are: | |
58 | .Pp | |
59 | .Pa network | |
60 | Only network related output is displayed. | |
61 | .Pp | |
62 | .Pa filesys | |
63 | Only file system related output is displayed. | |
1815bff5 | 64 | .It pid | cmd |
20e66415 A |
65 | The sampled data can be limited to a list of process ids or commands. |
66 | When a command name is given, all processes with that name will be sampled. | |
67 | Using the | |
1815bff5 | 68 | .Fl e |
20e66415 A |
69 | option has the opposite effect, excluding sampled data relating to the given |
70 | list of process ids or commands. | |
1815bff5 A |
71 | .El |
72 | .Pp | |
20e66415 A |
73 | If you set the DYLD_IMAGE_SUFFIX environment variable to |
74 | .Dq Li _debug , | |
75 | then an application will use the debug version of all libraries including the | |
76 | Carbon FileManager. | |
77 | See | |
78 | .Xr dyld 1 . | |
79 | When | |
80 | .Nm fs_usage | |
81 | is run against a Carbon Application launched in this environment, then the | |
82 | high level Carbon FileManager calls will be displayed bracketing the system | |
83 | calls that they are built on. | |
1815bff5 A |
84 | .Pp |
85 | The data columns displayed are as follows: | |
20e66415 | 86 | .Bl -tag -width Ds |
1815bff5 A |
87 | .Pp |
88 | .It TIMESTAMP | |
20e66415 A |
89 | TOD when call occurred. |
90 | Wide mode will have millisecond granularity. | |
1815bff5 | 91 | .It CALL |
20e66415 | 92 | The name of the network or filesystem related call, page-in, page-out or physical disk access. |
1815bff5 | 93 | .It FILE DESCRIPTOR |
20e66415 A |
94 | Of the form F=x, x is a file descriptor. |
95 | Depending on the type of system call, this will be either an input value or a | |
96 | return value. | |
1815bff5 A |
97 | .It BYTE COUNT |
98 | Of the form B=x, x is the number of bytes requested by the call. | |
99 | .It [ERRNO] | |
100 | On error, the errno is displayed in brackets. | |
101 | .It PATHNAME | |
102 | Pathname of the file accessed (up to the last 28 bytes). | |
103 | .It FAULT ADDRESS | |
20e66415 | 104 | Of the form A=0xnnnnnnnn, where 0xnnnnnnnn is the address being faulted. |
b51d5b5f | 105 | .It DISK BLOCK NUMBER |
20e66415 A |
106 | Of the form D=0xnnnnnnnn, where 0xnnnnnnnn is the block number of the physical |
107 | disk block being read or written. | |
108 | .It SELECT RETURN | |
109 | Of the form S=x, x is the number of ready descriptors returned by the select() | |
110 | system call. | |
111 | If S=0, the time limit expired. | |
1815bff5 A |
112 | .It TIME INTERVAL(W) |
113 | The elapsed time spent in the system call. | |
20e66415 A |
114 | A |
115 | .Sq Li W | |
116 | after the elapsed time indicates the process was scheduled out during this file | |
117 | activity. | |
118 | In this case, the elapsed time includes the wait time. | |
1815bff5 A |
119 | .It PROCESS NAME |
120 | The process that made the system call. | |
121 | .El | |
122 | .Pp | |
123 | .Sh SAMPLE USAGE | |
124 | .Pp | |
20e66415 | 125 | fs_usage -w -f filesys Mail |
1815bff5 A |
126 | .Pp |
127 | .Nm fs_usage | |
20e66415 A |
128 | will display file system related data for all instances of processes named Mail. |
129 | Maximum data output will be displayed in the window. | |
1815bff5 | 130 | .Sh SEE ALSO |
20e66415 A |
131 | .Xr top 1 , |
132 | .Xr sc_usage 1 , | |
133 | .Xr latency 1 , | |
b51d5b5f | 134 | .Xr dyld 1 |