/*
* seeksize.d - analyse disk head seek distance by process.
* Written using DTrace (Solaris 10 3/05).
*
* Disk I/O events caused by processes will in turn cause the disk heads
* to seek. This program analyses those seeks, so that we can determine
* if processes are causing the disks to seek in a "random" or "sequential"
* manner.
*
* $Id: seeksize.d 3 2007-08-01 10:50:08Z brendan $
*
* USAGE: seeksize.d # wait several seconds, then hit Ctrl-C
*
* FIELDS:
* PID process ID
* CMD command and argument list
* value distance in disk blocks (sectors)
* count number of I/O operations
*
* SEE ALSO: bitesize.d, iosnoop
*
* COPYRIGHT: Copyright (c) 2006 Brendan Gregg.
*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* See the License for the specific language governing permissions
* and limitations under the License.
*
* CDDL HEADER END
*
* 11-Sep-2004 Brendan Gregg Created this.
* 10-Oct-2004 " " Rewrote to use the io provider.
* 20-Apr-2006 " " Last update.
*/
/*
* Print header
*/
{
printf("Tracing... Hit Ctrl-C to end.\n");
}
/*
* Process io start
*/
{
/* calculate seek distance */
/* store details */
}
{
/* save last position of disk head */
}
/*
* Print final report
*/
{
}