]> git.saurik.com Git - apple/system_cmds.git/blame - fs_usage.tproj/fs_usage.1
system_cmds-230.tar.gz
[apple/system_cmds.git] / fs_usage.tproj / fs_usage.1
CommitLineData
1815bff5
A
1
2.\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
3.\"
b51d5b5f 4.Dd November 26, 2001
1815bff5
A
5.Dt FS_USAGE 1
6.Os "Mac OS X"
7.Sh NAME
8.Nm fs_usage
9.Nd reports system calls and page faults related to filesystem activity
10in real-time.
11.Sh SYNOPSIS
12.Nm fs_usage [-e] [-w] [ pid|cmd [pid|cmd] ...]
13.Sh DESCRIPTION
14.Nm fs_usage
15presents an ongoing display of system call usage
16information pertaining to filesystem activity. By default
1c51fdde
A
17this includes all system processes except the running
18fs_usage process,
19Terminal, telnetd, sshd, rlogind, tcsh, csh and sh.
b51d5b5f 20These defaults can be overridden such that output is limited to
1c51fdde 21include or exclude a list of processes specified by the user.
1815bff5
A
22.Pp
23The output presented by
24.Nm fs_usage
25is formatted according to the size of your window.
26A narrow window will display fewer columns of data.
27Use a wide window for maximum data display. You may
28override the window formatting restrictions by
29forcing a wide display with the
30.Fl w
31option. In this case, the data displayed will wrap
32when the window is not wide enough.
33.Pp
34The options are as follows:
35.Bl -tag -width Ds
36.It Fl e
37Specifying the
38.Fl e
39option generates output that excludes sampling
40of the running fs_usage tool. If a list of
41process ids or commands is also given, then
42those processes are also excluded from the sampled
43output.
44.It Fl w
45Specifying the
46.Fl w
47option forces a wider, more detailed output,
48regardless of the window size.
49.It pid | cmd
50The sampled data can be limited to a list of process
51ids or commands. When a command name is given, all
52processes with that name will be sampled. Using the
53.Fl e
54option has the opposite effect, excluding sampled data
55relating to the given list of process ids or commands.
56.El
57.Pp
b51d5b5f
A
58If you set the DYLD_IMAGE_SUFFIX environment variable
59to "_debug", then an application will use
60the debug version of all libraries including the
61Carbon FileManager. See dyld(1). When
62fs_usage is run against a Carbon Application launched
63in this environment, then the high level Carbon FileManager
1815bff5
A
64calls will be displayed bracketing the system calls that they
65are built on.
66.Pp
67The data columns displayed are as follows:
68.Bl -tag -width TIME_INTERVALWWWW -compact
69.Pp
70.It TIMESTAMP
71TOD when call occurred. Wide mode will
b51d5b5f 72have millisecond granularity.
1815bff5 73.It CALL
b51d5b5f 74the name of the filesystem call, page-in, page-out or physical disk access.
1815bff5
A
75.It FILE DESCRIPTOR
76Of the form F=x, x is a file descriptor. Depending
77on the type of system call, this will be either
78an input value or a return value.
79.It BYTE COUNT
80Of the form B=x, x is the number of bytes requested by the call.
81.It [ERRNO]
82On error, the errno is displayed in brackets.
83.It PATHNAME
84Pathname of the file accessed (up to the last 28 bytes).
85.It FAULT ADDRESS
86Of the form A=0xnnnnnnnn, where 0xnnnnnnnn is the
87address being faulted.
b51d5b5f
A
88.It DISK BLOCK NUMBER
89Of the form D=0xnnnnnnnn, where 0xnnnnnnnn is the block number
90of the physical disk block being read or written.
1815bff5
A
91.It TIME INTERVAL(W)
92The elapsed time spent in the system call.
93A 'W' after the elapsed time indicates
94the process was scheduled out during
95this file activity. In this case, the elapsed
96time includes the wait time.
97.It PROCESS NAME
98The process that made the system call.
99.El
100.Pp
101.Sh SAMPLE USAGE
102.Pp
103fs_usage -w telnetd
104.Pp
105.Nm fs_usage
106will report file system usage data for all
107instances of processes named telnetd. Maximum
108data output will be displayed in the window.
109.Sh SEE ALSO
110.Xr top 1
111.Xr sc_usage 1
112.Xr latency 1
b51d5b5f 113.Xr dyld 1