1N/A * Written using DTrace (Solaris 10 3/05) 1N/A * This traces file related activity: system call reads and writes, 1N/A * vnode logical read and writes (fop), and disk I/O. It can be used 1N/A * to examine the behaviour of each I/O layer, from the syscall 1N/A * interface to what the disk is doing. Behaviour such as read-ahead, and 1N/A * max I/O size breakup can be observed. 1N/A * $Id: fsrw.d 3 2007-08-01 10:50:08Z brendan $ 1N/A * Event Traced event (see EVENTS below) 1N/A * Device Device, for disk I/O 1N/A * RW Either Read or Write 1N/A * Size Size of I/O in bytes 1N/A * Offset Offset of I/O in kilobytes 1N/A * Path Path to file on disk 1N/A * sc-read System call read 1N/A * sc-write System call write 1N/A * fop_read Logical read 1N/A * fop_write Logical write 1N/A * disk_io Physical disk I/O 1N/A * disk_ra Physical disk I/O, read ahead 1N/A * The events are drawn with a level of indentation, which can sometimes 1N/A * help identify related events. 1N/A * SEE ALSO: fspaging.d 1N/A * IDEA: Richard McDougall, Solaris Internals 2nd Ed, FS Chapter. 1N/A * COPYRIGHT: Copyright (c) 2006 Brendan Gregg. 1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License, Version 1.0 only 1N/A * (the "License"). You may not use this file except in compliance 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * 20-Mar-2006 Brendan Gregg Created this. 1N/A * 23-Apr-2006 " " Last update. 1N/A "Event",
"Device",
"RW",
"Size",
"Offset",
"Path");
1N/A * starting with a file descriptior, dig out useful info 1N/A * from the corresponding file_t and vnode_t. 1N/A /* only trace activity to regular files and directories, as */ 1N/A /* fetch the real offset (file_t is unaware of this) */ 1N/A * it would seem to make sense to only trace disk events during 1N/A * an fop event, easily coded with a self->fop_trace flag. However 1N/A * writes are asynchronous to the fop_write calls (they are flushed 1N/A * at some later time), and so this approach will miss tracing 1N/A * most of the disk writes.