diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-12-04 18:01:58 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-12-04 18:01:58 +0000 |
commit | f86b45d722081f57d0336e7c1ce63021e9510db5 (patch) | |
tree | 2709036e5db7d694325403f0259639a5b07f985d /libexec/Makefile | |
parent | 29f05e53a79d52e2dcc3d5a55bcb37a3d299e965 (diff) |
systat(1): vmstat: measure elapsed time with clock_gettime(2) instead of ticks
The vmstat view in systat(1) should not use statclock() ticks to count
elapsed time. First, ticks are low resolution. Second, the statclock
is sometimes randomized, so each tick is not necessarily of equal
length. Third, we're counting ticks from every CPU on the system, so
every rate in the view is divided by the number of CPUs. For example,
on an amd64 system with 8 CPUs you currently see:
200 clock
... when the true clock interrupt rate on that system is 1600.
Instead, measure elapsed time with clock_gettime(2). Use CLOCK_UPTIME
here so we exclude time when the system is suspended. With this
change we no longer need "stathz" or "hertz". We can also get rid of
the anachronistic secondary clock failure test.
Prompted by dlg@ and jmatthew@. deraadt@ says this has been in snaps
since 2022-11-21; no complaints.
Link: https://marc.info/?l=openbsd-tech&m=166898960831136&w=2
ok dlg@ deraadt@
Diffstat (limited to 'libexec/Makefile')
0 files changed, 0 insertions, 0 deletions