Update to handle fragments correctly (set bsize to be fragment
[unix-history] / usr / src / sys / scripts / stats
CommitLineData
a40d7b4f 1# @(#)stats 8.1 (Berkeley) %G%
6d90a972
KB
2#
3# disk statistics
13ea0b87
KB
4
5define dstat
6 set $op=(struct sdop *)&($arg0[$arg2])
7 set $i=$arg1
8 while ($i)
9 printf "$arg3 "
10 printf "%d %d 0x%x 0x%x %d", $op->bp, $op->bufsize, $op->blkno, $op->when.tv_sec, $op->when.tv_usec
11 if ($op->op & 1)
12 printf " READ\n"
13 else
14 printf " WRITE\n"
15 end
16 set $op = $op + 1
17 set $i = $i - 1
18 end
19end