Freebsd – Reporting historical system activity in FreeBSD

freebsdiostatsarsystem-monitoringvmstat

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?

Best Answer

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.