2005-12-11 15:16:03 +03:00
|
|
|
# $NetBSD: stats,v 1.4 2005/12/11 12:24:29 christos Exp $
|
1997-02-13 02:35:06 +03:00
|
|
|
|
1997-02-13 01:09:45 +03:00
|
|
|
# @(#)stats 8.1 (Berkeley) 6/10/93
|
|
|
|
#
|
|
|
|
# disk statistics
|
|
|
|
|
|
|
|
define dstat
|
|
|
|
set $op=(struct sdop *)&($arg0[$arg2])
|
|
|
|
set $i=$arg1
|
2005-02-27 01:58:54 +03:00
|
|
|
while ($i)
|
1997-02-13 01:09:45 +03:00
|
|
|
printf "$arg3 "
|
|
|
|
printf "%d %d 0x%x 0x%x %d", $op->bp, $op->bufsize, $op->blkno, $op->when.tv_sec, $op->when.tv_usec
|
|
|
|
if ($op->op & 1)
|
|
|
|
printf " READ\n"
|
|
|
|
else
|
|
|
|
printf " WRITE\n"
|
|
|
|
end
|
|
|
|
set $op = $op + 1
|
|
|
|
set $i = $i - 1
|
|
|
|
end
|
|
|
|
end
|