I'd like to record data about system activity under FreeBSD for future analysis. If I were running a SysV system, I'd just sar and its related utilities, but that doesn't exist in the BSDs. (And bsdsar has gone missing.) I don't really care about specific formats or utilities, but I want to keep information about CPU, RAM, and VM utilization, as well as I/O information. At the same time, full acct process accounting both seems like overkill and doesn't really provide data I want: notably, data about preexisting processes.
I could just log the output from long-running vmstat, iostat, etc. commands, but it seems like there ought to be something tidier.
Ultimately, the question is:
What is a good way to find out recent past system utilization under FreeBSD?
I ended up using atop (which is available in FreeBSD ports as sysutils/atop), and it's awesome. I would very much consider using it in preference of sar on systems where sar is available. It comes with a curses-based UI that is easy to navigate and shows a lot of data at once. It's incredibly handy.
collectd is available for FreeBSD. From the collectd website:
You can collect lots of information with the plugins it ships with, and you can roll your own with its various language bindings.
If you want to use it on more than one host, you can collect data with collectd on one host as an agent and make it forward the data using the
network
plugin and plot RRD graphs there, or plug it into Grafana (for example with thekafka
output plugin) and make more fancy graphs there.From the FreshPorts page: