<div dir="ltr"><div>Master now has an in-kernel statistics collector which is enabled by default, and a (still primitive) userland program to access it.  This recorder samples the state of the machine once every 10 seconds and records it in a large FIFO, all in-kernel.  The FIFO typically contains 8192 entries, or around the last 23 hours worth of data.</div><div><br></div><div>Statistics recorded include current load, user/sys/idle cpu use, swap use, VM fault rate, VM memory statistics, and counters for syscalls, path lookups, and various interrupt types.  A few more useful counters will probably be added... I'd like to tie cpu temperature, fork rate, and exec rate in at some point, as well as network and disk traffic.</div><div><br></div><div>The statistics gathering takes essentially no real overhead and is always on, so any user at the spur of the moment with no prior intent can query the last 23 hours worth of data.<br></div><div><br></div><div>--</div><div><br></div><div>There is a user frontend to the data called 'kcollect' (its tied into the buildworld now).  Currently still primitive.  Ultimately my intention is to integrate it with a dbm database for long-term statistical data retention (if desired) using an occasional (like once-an-hour) cron-job to soak up anything new, with plenty of wiggle room due to the amount of time the kernel keeps itself.  This is better and less invasive than having a userland statistics gathering script running every few minutes from cron and has the advantage of giving you a lot of data on the spur of the moment without having to ask for it before-hand.</div><div><br></div><div>If you have gnuplot installed (pkg install gnuplot), kcollect can generate some useful graphs based on the in-kernel data.  Well, it will be boring if the machine isn't doing anything :-).  There are options to use gnuplot to generate a plot window in X or a .jpg or .png file, and other options to set the width and height and such.  At the moment the gnuplot output uses a subset of statically defined fields to plot but ultimately the field list it uses will be specifiable.</div><div><br></div><div>Sample image generated during a synth run:</div><div><br></div><div><a href="http://apollo.backplane.com/DFlyMisc/kcollect03.jpg">http://apollo.backplane.com/DFlyMisc/kcollect03.jpg</a><br></div><div><br></div><div>-Matt</div><div><br></div></div>