Deal with separate read/write statistics.

This commit is contained in:
naddy 2004-02-19 22:19:41 +00:00
parent 92ff5d28b1
commit df2668ff71

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-bsd_kernel_cc,v 1.2 2001/12/06 03:40:07 form Exp $
--- bsd/kernel.cc.orig Tue Jul 18 01:52:31 2000
+++ bsd/kernel.cc Thu Dec 6 09:33:22 2001
$OpenBSD: patch-bsd_kernel_cc,v 1.3 2004/02/19 22:19:41 naddy Exp $
--- bsd/kernel.cc.orig 2001-10-09 04:40:51.000000000 +0200
+++ bsd/kernel.cc 2004-02-19 23:10:45.000000000 +0100
@@ -76,7 +76,7 @@ int DevStat_Get();
#ifdef HAVE_SWAPCTL
@ -22,6 +22,15 @@ $OpenBSD: patch-bsd_kernel_cc,v 1.2 2001/12/06 03:40:07 form Exp $
{ "_intrhand" },
#define INTRHAND_SYM_INDEX 9
{ "_intrstray" },
@@ -776,7 +776,7 @@ BSDGetDiskXFerBytes (unsigned long long
while (kvmdiskptr != NULL) {
safe_kvm_read ((u_long)kvmdiskptr, &kvmcurrdisk, sizeof(kvmcurrdisk));
/* Add up the contribution from this disk. */
- *bytesXferred += kvmcurrdisk.dk_bytes;
+ *bytesXferred += kvmcurrdisk.dk_rbytes + kvmcurrdisk.dk_wbytes;
#ifdef DEBUG
printf ("Got %#x (lower 32bits)\n", (int) (*bytesXferred & 0xffffffff));
#endif
@@ -786,7 +786,7 @@ BSDGetDiskXFerBytes (unsigned long long
}