New release of kar, the Kstat Activity Reporter:

http://www.petertribble.co.uk/Solaris/kar.html

The first thing I did was to write a little emulation of the default sar
output (cpu utilization) using jkstat. This worked just fine.

Then I wrote something that would give me iostat over the reporting
period, which was a miserable failure, leading to my questions about
the output time format from kstat -p. In the end, I wrote a replacement
for kstat -p in C, that prints hrtime_t output in raw nanoseconds, and
adds a kstat_type field. As I was already incompatible with kstat -p, I
also streamlined the output, so it looks like:

md:0:md0:kstat_type     3
:class  disk
:crtime 64.862554331
:snaptime       1414.284774554
:nread  132608
:nwritten       10240
:reads  14
:writes 7
:wtime  21093
:wlentime       21093
:wlastupdate    65049661745
:rtime  75616187
:rlentime       75616187
:rlastupdate    65049870490
:wcnt   0
:rcnt   0

which is still pretty easy to parse.

My next step is to fill out the sar output emulation, and to add more of
the *stat tools (vmstat, fsstat, mpstat, nfsstat) to the mix. I plan to do
large-scale generation of graphical charts as well. Note that much of this
is largely independent of the detailed implementation of how the kstats
are saved - if someone comes up with a better serialization format then
I'm all for it, and could probably just slot it into place.

This leaves the overall scope of the project a little open. I'm intent on
replacing sar with something that works in the current millennium and is
extensible, but I have no intention of wandering into SNMP territory, or
wanting to compete with tools like nagios/zenoss/zabbix - I'm definitely
restricted to a single host saving its own history. Even so, there are
probably a lot of other things that could be done.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________
observability-discuss mailing list
observability-discuss@opensolaris.org

Reply via email to