diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-02-15 02:45:48 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-02-15 02:45:48 +0000 |
commit | bafaa11c619a93cd4b705e4cca3a65baa2688326 (patch) | |
tree | cab08efe46eb2822ef440f2d84e9c243d779a3a9 /sys/kern/kern_sysctl.c | |
parent | 1218bfa7ac931aa5372051060561ce67ec995924 (diff) |
new arg to disk_unbusy, to record separate read/write statistics.
looked at by various, testing henning@ mcbride@ dan weeks
mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 68685933775..a3cbe801bb6 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.99 2004/02/14 15:09:22 grange Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.100 2004/02/15 02:45:46 tedu Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -1528,10 +1528,14 @@ sysctl_diskinit(update, p) dk->dk_name ? dk->dk_name : ""); l += strlen(disknames + l); sdk = diskstats + i; + strlcpy(sdk->ds_name, dk->dk_name, + sizeof(sdk->ds_name)); sdk->ds_busy = dk->dk_busy; - sdk->ds_xfer = dk->dk_xfer; + sdk->ds_rxfer = dk->dk_rxfer; + sdk->ds_wxfer = dk->dk_wxfer; sdk->ds_seek = dk->dk_seek; - sdk->ds_bytes = dk->dk_bytes; + sdk->ds_rbytes = dk->dk_rbytes; + sdk->ds_wbytes = dk->dk_wbytes; sdk->ds_attachtime = dk->dk_attachtime; sdk->ds_timestamp = dk->dk_timestamp; sdk->ds_time = dk->dk_time; @@ -1546,10 +1550,14 @@ sysctl_diskinit(update, p) for (dk = TAILQ_FIRST(&disklist), i = 0; dk; dk = TAILQ_NEXT(dk, dk_link), i++) { sdk = diskstats + i; + strlcpy(sdk->ds_name, dk->dk_name, + sizeof(sdk->ds_name)); sdk->ds_busy = dk->dk_busy; - sdk->ds_xfer = dk->dk_xfer; + sdk->ds_rxfer = dk->dk_rxfer; + sdk->ds_wxfer = dk->dk_wxfer; sdk->ds_seek = dk->dk_seek; - sdk->ds_bytes = dk->dk_bytes; + sdk->ds_rbytes = dk->dk_rbytes; + sdk->ds_wbytes = dk->dk_wbytes; sdk->ds_attachtime = dk->dk_attachtime; sdk->ds_timestamp = dk->dk_timestamp; sdk->ds_time = dk->dk_time; |