Peter's Solaris Zone

Kstat Activity Reporter

Current Release: 0.3

Traditionally, sar - system activity reporter, has been used to save and display a small subset of system activity.

Sar suffers from being incomplete and inextensible, and some of the statistics it does report are no longer useful.

Kar - kstat activity reporter - is an effort to archive and display a more complete set of system statistics.

The basic idea is really simple: rather than save the limited set of statistics reported by sar, simply save everything tracked by the kstat framework and do any aggregation or analysis when the user needs it.

The result is a system that is as complete as the kstat framework, and is immediately extensible - new kstats get picked up automatically rather than kaving to modify the framework. And because the raw data is saved, it can be analysed and displayed in any way you see fit: you aren't limited to the handful of results that the authors of sar thought you might need.

The implementation here is really a proof of concept. I simply save something that looks like the output of kstat -p at regular intervals. (In version 0.1, it really was kstat -p, but as of 0.2 a slight variant of that format is used that is more complete, saves IO statistics better, and is about half the size and requires less cpu to generate and parse.) To keep disk usage down, the output is stored in a zip file (thus compressed) for each day. That's it.

Simple is sometimes good. And that's about as simple and unsophisticated as it gets.

You can unpack the zip files and chew through the files with awk/sed/grep or perl or whatever and sling that at your graphing tool of choice.

Or, jkstat (version 0.38 or later) can read in the zip files and allow you to browse the statistics and generate charts.

Version history

0.1
Initial prototype, just containing collector.
0.2
Add sample sar and iostat clients using jkstat. Add custom kar_collector and enhanced output format.
0.3
Add sample mpstat and fsstat clients; add -z option to iostat client; code cleanups.

Peter's Home | Zone Home