.TH iosnoop 1m "$Date: 2015/09/30 22:01:09 $" "USER COMMANDS" .SH NAME iosnoop \- snoop I/O events as they occur. Uses DTrace. .SH SYNOPSIS .B iosnoop [\-a|\-A|\-Deghinostv] [\-d device] [\-f filename] [\-m mount_point] [\-n name] [\-p PID] .SH DESCRIPTION iosnoop prints I/O events as they happen, with useful details such as UID, PID, block number, size, filename, etc. This is useful to determine the process responsible for using the disks, as well as details on what activity the process is requesting. Behaviour such as random or sequential I/O can be observed by reading the block numbers. Since this uses DTrace, only the root user or users with the dtrace_kernel privilege can run this command. .SH OS Solaris .SH STABILITY stable - needs the io provider. .SH OPTIONS .TP \-a print all data .TP \-A dump all data, space delimited .TP \-D print time delta, us (elapsed) .TP \-e print device name .TP \-i print device instance .TP \-n print major and minor numbers .TP \-o print disk delta time, us .TP \-s print start time, us .TP \-t print completion time, us .TP \-v print completion time, string .TP \-d device instance name to snoop (eg, dad0) .TP \-f filename full pathname of file to snoop .TP \-m mount_point mountpoint for filesystem to snoop .TP \-n name process name .TP \-p PID process ID .PP .SH EXAMPLES .TP Default output, print I/O activity as it occurs, # .B iosnoop .PP .TP Print human readable timestamps, # .B iosnoop \-v .PP .TP Print major and minor numbers, # .B iosnoop \-n .PP .TP Snoop events on the root filesystem only, # .B iosnoop \-m / .PP .SH FIELDS .TP UID User ID .TP PID Process ID .TP PPID Parent Process ID .TP COMM command name for the process .TP ARGS argument listing for the process .TP SIZE size of the operation, bytes .TP BLOCK disk block for the operation (location. relative to this filesystem. more useful with the -n option to print major and minor numbers) .TP STIME timestamp for the disk request, us .TP TIME timestamp for the disk completion, us .TP DELTA elapsed time from request to completion, us (this is the elapsed time from the disk request (strategy) to the disk completion (iodone)) .TP DTIME time for disk to complete request, us (this is the time for the disk to complete that event since it's last event (time between iodones), or, the time to the strategy if the disk had been idle) .TP STRTIME timestamp for the disk completion, string .TP DEVICE device name .TP INS device instance number .TP D direction, Read or Write .TP MOUNT mount point .TP FILE filename (basename) for I/O operation .PP .SH NOTES When filtering on PID or process name, be aware that poor disk event times may be due to events that have been filtered away, for example another process that may be seeking the disk heads elsewhere. .PP .SH DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. .SH EXIT iosnoop will run forever until Ctrl\-C is hit. .SH AUTHOR Brendan Gregg [Sydney, Australia] .SH SEE ALSO iotop(1M), dtrace(1M)