Friday, December 04, 2009

JKstat 0.33

There are a number of features that have been suggested for JKstat that I've been thinking of including, and I've just added one of the more interesting ones.

I think it was Phil Harman suggested this at LOSUG. Someone may have archived kstat -p output, so why not allow JKstat to read that?

So, as of version 0.33, JKstat can do exactly that. You can either save kstat -p output into files in a directory, or simply put those files into a zipfile. (The reader is pretty dumb right now - no other files or subdirectories.) It uses the timestamps on the files as the time the measurement was take,

The browser can handle the input, but needs a bit more work to be useful - it currently steps through the data in real time, which isn't ideal for what could be days of data sampled at multi-minute intervals. Ideally it would be able to step through the data, pause, and rewind. Next release, perhaps.

The chart and areachart subcommands can read in data and display a chart. For example, the cpu behaviour of my home desktop yesterday evening, from kstat -p output saved every 5 minutes, could be shown with:

./jkstat areachart -z /var/adm/ka/ka-2009-12-03.zip \
cpu_stat:: user kernel idle
which looks like:


(Yes, there's an anomaly on the first datapoint.)

This is a preliminary implementation, so there are plenty of rough edges in need of a bit of polish, but it proves that the idea of reading archival kstat data is viable.

No comments: