]> git.saurik.com Git - apple/system_cmds.git/blame - fs_usage.tproj/fs_usage.1
system_cmds-336.1.2.tar.gz
[apple/system_cmds.git] / fs_usage.tproj / fs_usage.1
CommitLineData
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
9real-time
1815bff5 10.Sh SYNOPSIS
83f6dbe8 11.Nm fs_usage [-e] [-w] [-f mode [-f mode] ...] [ pid|cmd [pid|cmd] ...]
1815bff5 12.Sh DESCRIPTION
20e66415 13The
1815bff5 14.Nm fs_usage
20e66415
A
15utility presents an ongoing display of system call usage information
16pertaining to filesystem activity.
17It requires root privileges due to the kernel tracing facility it uses to
18operate.
19By default the activity monitored includes all system processes except the
20running
21.Nm fs_usage
22process, Terminal, telnetd, sshd, rlogind, tcsh, csh and sh.
23These defaults can be overridden such that output is limited to include or
24exclude a list of processes specified by the user.
1815bff5
A
25.Pp
26The output presented by
27.Nm fs_usage
28is formatted according to the size of your window.
29A narrow window will display fewer columns of data.
20e66415
A
30Use a wide window for maximum data display.
31You may override the window formatting restrictions by forcing a wide display
32with the
1815bff5 33.Fl w
20e66415
A
34option.
35In this case, the data displayed will wrap when the window is not wide enough.
1815bff5
A
36.Pp
37The options are as follows:
38.Bl -tag -width Ds
39.It Fl e
40Specifying the
41.Fl e
42option generates output that excludes sampling
20e66415
A
43of the running fs_usage tool.
44If a list of process ids or commands is also given, then those processes are
45also excluded from the sampled output.
1815bff5
A
46.It Fl w
47Specifying the
48.Fl w
20e66415
A
49option forces a wider, more detailed output, regardless of the window size.
50.It Fl f
51Specifying the
52.Fl f
53option turns on output filtering based on the
54.Pa mode
55provided.
83f6dbe8
A
56Multiple filtering options can be specified.
57By default no output filtering occurs.
20e66415
A
58The supported modes are:
59.Pp
60.Pa network
61Only network related output is displayed.
62.Pp
63.Pa filesys
64Only file system related output is displayed.
83f6dbe8
A
65.Pp
66.Pa cachehit
2fc1e207 67In addition, display CACHE_HIT output.
1815bff5 68.It pid | cmd
20e66415
A
69The sampled data can be limited to a list of process ids or commands.
70When a command name is given, all processes with that name will be sampled.
71Using the
1815bff5 72.Fl e
20e66415
A
73option has the opposite effect, excluding sampled data relating to the given
74list of process ids or commands.
1815bff5
A
75.El
76.Pp
20e66415
A
77If you set the DYLD_IMAGE_SUFFIX environment variable to
78.Dq Li _debug ,
79then an application will use the debug version of all libraries including the
80Carbon FileManager.
81See
82.Xr dyld 1 .
83When
84.Nm fs_usage
85is run against a Carbon Application launched in this environment, then the
86high level Carbon FileManager calls will be displayed bracketing the system
87calls that they are built on.
1815bff5
A
88.Pp
89The data columns displayed are as follows:
20e66415 90.Bl -tag -width Ds
1815bff5
A
91.Pp
92.It TIMESTAMP
20e66415
A
93TOD when call occurred.
94Wide mode will have millisecond granularity.
1815bff5 95.It CALL
20e66415 96The name of the network or filesystem related call, page-in, page-out or physical disk access.
1815bff5 97.It FILE DESCRIPTOR
20e66415
A
98Of the form F=x, x is a file descriptor.
99Depending on the type of system call, this will be either an input value or a
100return value.
1815bff5
A
101.It BYTE COUNT
102Of the form B=x, x is the number of bytes requested by the call.
103.It [ERRNO]
104On error, the errno is displayed in brackets.
105.It PATHNAME
106Pathname of the file accessed (up to the last 28 bytes).
107.It FAULT ADDRESS
20e66415 108Of the form A=0xnnnnnnnn, where 0xnnnnnnnn is the address being faulted.
b51d5b5f 109.It DISK BLOCK NUMBER
20e66415
A
110Of the form D=0xnnnnnnnn, where 0xnnnnnnnn is the block number of the physical
111disk block being read or written.
c3a08f59
A
112.It OFFSET
113Of the form O=0xnnnnnnnn, where 0xnnnnnnnn is a file offset.
20e66415
A
114.It SELECT RETURN
115Of the form S=x, x is the number of ready descriptors returned by the select()
116system call.
117If S=0, the time limit expired.
1815bff5
A
118.It TIME INTERVAL(W)
119The elapsed time spent in the system call.
20e66415
A
120A
121.Sq Li W
122after the elapsed time indicates the process was scheduled out during this file
123activity.
124In this case, the elapsed time includes the wait time.
1815bff5
A
125.It PROCESS NAME
126The process that made the system call.
127.El
128.Pp
129.Sh SAMPLE USAGE
130.Pp
20e66415 131fs_usage -w -f filesys Mail
1815bff5
A
132.Pp
133.Nm fs_usage
20e66415
A
134will display file system related data for all instances of processes named Mail.
135Maximum data output will be displayed in the window.
1815bff5 136.Sh SEE ALSO
20e66415
A
137.Xr top 1 ,
138.Xr sc_usage 1 ,
139.Xr latency 1 ,
b51d5b5f 140.Xr dyld 1