sysstat and sar
After looking at how useful vmstat
and iostat
data is, you might be wondering how you can capture it all the time. The standard UNIX system package for this purpose is named sysstat, and it's not installed or activated on many systems by default. On some systems, you have to install this package just to get iostat
. The easiest way to test out if you have sysstat installed and working is to run its user interface, the sar
program, and see if anything comes back. If not, you will either have to install sysstat (if sar
isn't even there), or enable it (if it's there but has no data).
Once it's running and collecting data, sysstat collects up data quite regularly, and gives you a broad perspective of average server performance during each day. The following comes from the period when all of the benchmark examples described in this chapter were run:
$ sar 01:20:02 PM CPU %user %nice %system %iowait %steal %idle 01:20:02 PM all 0.02 0.00 0.03 0...