diff options
author | tjr <tjr@FreeBSD.org> | 2003-11-01 02:06:02 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-11-01 02:06:02 +0000 |
commit | 10ee4409153b1c1dd3c23ed0462230761a372541 (patch) | |
tree | ea751426b4461015c282900bc0dd5b58b6d4a60e | |
parent | a7ed4268511fad8fcd4d2b84692909536414e185 (diff) | |
download | FreeBSD-src-10ee4409153b1c1dd3c23ed0462230761a372541.zip FreeBSD-src-10ee4409153b1c1dd3c23ed0462230761a372541.tar.gz |
Copy cur's snap_time to last when refreshing statistics. Fixes problem
where MB/s and tps statistics would always be zero, presumably because
they were being averaged out over the time between now and when the
system booted instead of a few seconds.
PR: 58683
-rw-r--r-- | usr.bin/systat/iostat.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index a54bb6d..0702ea1 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -147,6 +147,8 @@ fetchiostat() tmp_dinfo = last.dinfo; last.dinfo = cur.dinfo; cur.dinfo = tmp_dinfo; + + last.snap_time = cur.snap_time; /* * Here what we want to do is refresh our device stats. |