]> git.saurik.com Git - apple/system_cmds.git/blame_incremental - fs_usage.tproj/fs_usage.1
system_cmds-880.100.5.tar.gz
[apple/system_cmds.git] / fs_usage.tproj / fs_usage.1
... / ...
CommitLineData
1.\" Copyright (c) 2000, Apple Computer, Inc. All rights reserved.
2.\"
3.Dd November 7, 2002
4.Dt FS_USAGE 1
5.Os "Mac OS X"
6.Sh NAME
7.Nm fs_usage
8.Nd report system calls and page faults related to filesystem activity in
9real-time
10.Sh SYNOPSIS
11.Nm fs_usage [-e] [-w] [-f mode] [-b] [-t seconds] [-R rawfile [-S start_time] [-E end_time]] [pid | cmd [pid | cmd] ...]
12.Sh DESCRIPTION
13The
14.Nm fs_usage
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, telnet, sshd, rlogind, tcsh, csh, sh, and zsh.
23These defaults can be overridden such that output is limited to include or
24exclude a list of processes specified by the user.
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.
30Use a wide window for maximum data display.
31You may override the window formatting restrictions
32by forcing a wide display with the
33.Fl w
34option.
35In this case, the data displayed will wrap
36when the window is not wide enough.
37.Pp
38The options are as follows:
39.Bl -tag -width Ds
40.\" ==========
41.It Fl e
42Specifying the
43.Fl e
44option generates output that excludes sampling
45of the running fs_usage tool.
46If a list of process IDs or commands is also given,
47then those processes are also excluded from the sampled output.
48.\" ==========
49.It Fl w
50Specifying the
51.Fl w
52option forces a wider, more detailed output,
53regardless of the window size.
54.\" ==========
55.It Fl f
56Specifying the
57.Fl f
58option turns on output filtering based on the
59.Pa mode
60provided.
61Multiple filtering options can be specified.
62By default, no output filtering occurs.
63The supported modes are:
64.Pp
65.Pa network
66Network-related events are displayed.
67.Pp
68.Pa filesys
69Filesystem-related events are displayed.
70.Pp
71.Pa pathname
72Pathname-related events are displayed.
73.Pp
74.Pa exec
75Exec and spawn events are displayed.
76.Pp
77.Pa diskio
78Disk I/O events are displayed.
79.Pp
80.Pa cachehit
81In addition, show cache hits.
82.\" ==========
83.It Fl b
84Specifying the
85.Fl b
86option annotates disk I/O events with BootCache info (if available).
87.\" ==========
88.It Fl t Ar seconds
89Specifies a run timeout in seconds.
90.Nm fs_usage
91will run for no longer than the timeout specified.
92.\" ==========
93.It Fl R Ar raw_file
94Specifies a raw trace file to process.
95.\" ==========
96.It Fl S Ar start_time
97If
98.Fl R
99is selected, specifies the start time in microseconds to
100begin processing entries from the raw trace file. Entries
101with timestamps before the specified start time will be
102skipped.
103.\" ==========
104.It Fl E Ar end_time
105If
106.Fl R
107is selected, specifies the ending time in microseconds to
108stop processing entries from the raw trace file. Entries
109with timestamps beyond the specified ending time will be
110skipped.
111.\" ==========
112.It pid | cmd
113The sampled data can be limited to a list of process IDs or commands.
114When a command name is given, all processes with that name will be sampled.
115Using the
116.Fl e
117option has the opposite effect,
118excluding sampled data relating to the given list
119of process IDs or commands.
120.El
121.Pp
122The data columns displayed are as follows:
123.Bl -tag -width Ds
124.Pp
125.It TIMESTAMP
126TOD when call occurred.
127Wide mode will have microsecond granularity.
128.It CALL
129The name of the network or filesystem related call, page-in, page-out,
130or physical disk access.
131.It FILE DESCRIPTOR
132Of the form F=x, x is a file descriptor.
133Depending on the type of system call,
134this will be either an input value or a return value.
135.It BYTE COUNT
136Of the form B=x, x is the number of bytes requested by the call.
137.It [ERRNO]
138On error, the errno is displayed in brackets.
139.It PATHNAME
140Pathname of the file accessed (up to the last 28 bytes).
141.It FAULT ADDRESS
142Of the form A=0xnnnnnnnn,
143where 0xnnnnnnnn is the address being faulted.
144.It DISK BLOCK NUMBER
145Of the form D=0xnnnnnnnn,
146where 0xnnnnnnnn is the block number
147of the physical disk block being read or written.
148.It OFFSET
149Of the form O=0xnnnnnnnn, where 0xnnnnnnnn is a file offset.
150.It SELECT RETURN
151Of the form S=x, x is the number of ready descriptors returned
152by the select() system call.
153If S=0, the time limit expired.
154.It TIME INTERVAL(W)
155The elapsed time spent in the system call.
156A
157.Sq Li W
158after the elapsed time indicates the process was scheduled out
159during this file activity.
160In this case, the elapsed time includes the wait time.
161.It PROCESS NAME
162The process that made the system call. Wide mode will append the
163thread id to the process name (i.e Mail.nnn).
164.El
165.Pp
166.Sh SAMPLE USAGE
167.Pp
168fs_usage -w -f filesys Mail
169.Pp
170.Nm fs_usage
171will display file system related data
172for all instances of processes named Mail.
173Maximum data output will be displayed in the window.
174.Sh SEE ALSO
175.Xr dyld 1 ,
176.Xr latency 1 ,
177.Xr sc_usage 1 ,
178.Xr top 1