diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-03-15 21:59:06 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-03-15 21:59:06 +0000 |
| commit | 7194d335cfa65141113997cdc4ac01fe9c4504c1 (patch) | |
| tree | c322a33c0275fefd9ca33cd377e3d6f459cb9a8c /libexec | |
| parent | 0c61d694a810b1a9d361f7414576ff1afdde28a9 (diff) | |
Notes
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index bb04c16b75a2..440bdb6f588b 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -370,7 +370,7 @@ haveadisk(void) void updatexfers(int numdevs, int *devs) { - register int i, j, t; + register int i, j, k, t; struct statinfo stats; int num_devices = 0; u_int64_t total_transfers; @@ -400,9 +400,10 @@ updatexfers(int numdevs, int *devs) & DEVSTAT_TYPE_MASK) == DEVSTAT_TYPE_DIRECT) && ((stats.dinfo->devices[i].device_type & DEVSTAT_TYPE_PASS) == 0)) { - total_transfers = stats.dinfo->devices[i].num_reads + - stats.dinfo->devices[i].num_writes + - stats.dinfo->devices[i].num_other; + total_transfers = 0; + for (k = 0; k < DEVSTAT_N_TRANS_FLAGS; k++) + total_transfers += + stats.dinfo->devices[i].operations[k]; /* * XXX KDM If the total transfers for this device * are greater than the amount we can fit in a |
