FS_USAGE(1) | General Commands Manual | FS_USAGE(1) |
fs_usage
— report
system calls and page faults related to filesystem activity in
real-time
fs_usage |
[-e ] [-w ]
[-f mode]
[-b ] [-t
seconds] [-R
rawfile [-S
start_time -E
end_time]] [pid |
cmd [pid |
cmd [...]]] |
The fs_usage
utility presents an ongoing
display of system call usage information pertaining to filesystem activity.
It requires root privileges due to the kernel tracing facility it uses to
operate. By default, the activity monitored includes all system processes
except the running fs_usage
process, Terminal,
telnetd, telnet, sshd, rlogind, tcsh, csh, sh, and zsh. These defaults can
be overridden such that output is limited to include or exclude a list of
processes specified by the user.
The output presented by fs_usage
is
formatted according to the size of your window. A narrow window will display
fewer columns of data. Use a wide window for maximum data display. You may
override the window formatting restrictions by forcing a wide display with
the -w
option. In this case, the data displayed will
wrap when the window is not wide enough.
The options are as follows:
-e
-e
option generates output that
excludes sampling of the running fs_usage tool. If a list of process IDs
or commands is also given, then those processes are also excluded from the
sampled output.-w
-w
option forces a wider, more
detailed output, regardless of the window size.-f
-f
option turns on output filtering
based on the mode provided. Multiple filtering
options can be specified. By default, no output filtering occurs. The
supported modes are:
network Network-related events are displayed.
filesys Filesystem-related events are displayed.
pathname Pathname-related events are displayed.
exec Exec and spawn events are displayed.
diskio Disk I/O events are displayed.
cachehit In addition, show cache hits.
-b
-b
option annotates disk I/O events
with BootCache info (if available).-t
secondsfs_usage
will
run for no longer than the timeout specified.-R
raw_file-S
start_time-R
is selected, specifies the start time in
microseconds to begin processing entries from the raw trace file. Entries
with timestamps before the specified start time will be skipped.-E
end_time-R
is selected, specifies the ending time in
microseconds to stop processing entries from the raw trace file. Entries
with timestamps beyond the specified ending time will be skipped.-e
option has the opposite effect,
excluding sampled data relating to the given list of process IDs or
commands.The data columns displayed are as follows:
W
’ after the elapsed time indicates
the process was scheduled out during this file activity. In this case, the
elapsed time includes the wait time.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.
November 7, 2002 | macOS |