fs_usage -- report system calls and page faults related to filesystem activity in real-time

fs_usage [-e] [-w] [-f mode [-f mode] ...] [pid|cmd [pid|cmd] ...]

display system call usage information pertaining to filesystem activity.
requires root privileges .
default includes all system processes except fs_usage Terminal, telnetd, sshd, rlogind, tcsh, csh and sh.

A narrow window will display few columns of data.
Piping output reqults in many I/O's related to piping.

-e excludes ids or commands
-w wide
-f filters network , filesys , cachehit , pathname or exec
pids | cmds

Setting DYLD_IMAGE_SUFFIX to _debug causes applications to use the debug version of all libraries including the Carbon FileManager. See dyld. the high level Carbon FileManager calls will be displayed bracketing the system calls that they are built on.
TIMESTAMP Wide mode includes millisecond
CALL of the network or filesystem related call, page-in, page-out or physical disk access.
FILE DESCRIPTOR F=x, either an input value or a return value.
PATHNAME rightmost 28 characers. ctory/directory/xyzrstu.app
FAULT ADDRESS A=0xnnnnnnnn
DISK BLOCK NUMBER D=0xnnnnnnnn, physical disk block being read or written.
OFFSET O=0xnnnnnnnn, is a file offset.
SELECT RETURN S=x number of ready descriptors returned by the select() system call. If S=0, the time limit expired.
TIME INTERVAL W indicates the process was scheduled out during the file activity. elapsed time includes the wait time.

sudo fs_usage -w -f filesys Mail
fs_usage will display file system related data for all instances of processes named Mail. Maximum data output will be displayed in the window.

SEE top, sc_usage, latency, dyld

Mac OS X November 7, 2002