kernel - Add a sampling history mechanism called kcollect
* Add a kernel API which automatically samples useful statistics on a
10-second period without needing a user program to poll it. This API
is enabled by default and can be disabled by setting kern.collect_samples=0
in /boot/loader.conf (or setting it higher, if desired).
The idea is for the kernel to always collect a solid amount of historical
data for various useful statistics such that a user can pull it all up
going back upwards of 23 hours (or more, depending on configured samples)
after the fact. "Oh, what happened recently"... bang.
* The sysctl provides sufficient information to userland to be able to
process the statistics dynamically, without necessarily having to know
what they are.
The sysctl can be cut short to request less data for ongoing incremental
collection, if desired.
* Implement "load" collection to start with as a test. Add #defines for
everything I want the kernel to collect. The kernel API's critical path
is lockless.
* Start working on a front-end user program called 'kcollect'. This program
will eventually generate fancy graphs via gnuplot and have a dbm interface
for collecting data continuously if desired.