]> granicus.if.org Git - sysstat/commit
Workaround for I/O and transfer rates statistics
authorSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 1 Jul 2016 13:30:34 +0000 (15:30 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Fri, 1 Jul 2016 13:30:34 +0000 (15:30 +0200)
commit5d3efa188a27fa3b515e5d447460cd446c189f53
treea7c0e48739b6e54b4461baf1e74a1c7002b054cb
parentcd95fcd4caa2da197813040f65a933bbcd25bb41
Workaround for I/O and transfer rates statistics

Values displayed for I/O and transfer rates statistics (sar -b) may be
wrong if a filesystem / a device is unmounted, eg:

16:45:08          tps      rtps      wtps   bread/s   bwrtn/s
16:50:00        46.57     40.12      6.45    648.67    573.12
16:55:08    59853160524690272.00 59853160524690272.00      6.29
59853160524689824.00    135.44

This is because the total number of I/O operations is calculated as the sum
of operations for each filesystem/device mounted by the system. But if a
filesystem is unmounted, the total number of I/O operations may be lower
than its previous value, resulting in a negative number displayed by
sar. Display 0.0 in this case.
A note warning the user should probably go into the manual page too.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
json_stats.c
pr_stats.c
rndr_stats.c
xml_stats.c