Peter's Solaris Zone
8 Sep 2015: version 1.1.1. Download
(in zip form)
| JKstat on GitHub
JKstat provides a jni interface for Java applications to access
In addition to the jni library and supporting classes, JKstat also
provides a graphical browser to explore the kstat hierarchy, and a small
number of standalone utilities such as jcpustate.
To use the kar support, both the browser and
the chartbuilder support a -z flag to tell it which zipfile to
open. For example:
./jkstat browser -z /var/adm/ka/ka-2010-03-01.zip
./jkstat chartbuilder -z /var/adm/ka/ka-2010-03-01.zip
JKstat can run in client-server mode, so you don't need to run the
GUI on the monitored host:
./jkstat server -p server_port
where the argument to the -p flag specifies which port you would like
the server to listen on. Then on the client machine, run the browser
./jkstat remotebrowser -s http://server_name:server_port/
If you're on windows, then download in zip
format instead, unpack the zip file, and double-click on the
jkstat.bat file to start the client.
To see what subcommands are available, just run jkstat without any
The Kstat browser:
The fsstat utility:
The network traffic gadget:
A java version of xcpustate:
A sample chart:
(It's Solaris specific, and I'm developing on Solaris
10, but it ought to work on earlier versions. You will require J2SE 6
or later, though. If you're stuck on J2SE 5, then download version
- Tweak wrapper and build scripts for newer distros, java versions,
jersey, and flot (no code changes from 1.1).
- Update JFreeChart, better desktop integration, requires Java 6.
- Stable release.
- Refactor mpstat, adding right-click menu for charts.
- Update httpclient, allow kar to turn off the parser cache.
- Custom charts of IO kstats.
- Applet version. RESTful war build. Remove some unused code. Tidy up
accessories. Abstract away rate calculations.
- A handful of minor fixes.
- Play framework example;
tidy up client-server invocations.
- Update to latest Jfreechart.
- Spit and polish.
- Minor tweaks, including to graphs and JSON parsing code for a kar
- Incompatible changes to the way chain updates are handled, so
consumers must always explicitly check the current chain id against
theirs rather than asking if it's changed.
- Remove interesting subcommand. Fix connection leak in the RESTful
- Add RESTful support to the chart builder. Remove kstat -p support.
- RESTful client (as provide by node-kstat). Remove JavaFX demos.
- Remove the old private kar format support.
- Add JSON support for kar and the client-server mode.
- More code and javadoc cleanups. Moved some demos back from
solview; removed some of the cruftier demos. General polish. Charts
display statistics in the requested order. KstatFilter negative
matching bug. Preliminary attempt at sparklines and an 'interesting'
- Many code and javadoc cleanups. The netload demo now resizes
properly, and the network accessory calculates the speed correctly. The
browser gets reset and backwards for kar output.
- Added JMX and groovy examples. Improvements to Sequenced kstats to
allow caching, and other changes to allow significant performance
imporvemants in kar.
- Cleanups, strip chart demos, and removal of Kstat.getMap() in
favour of ks.statistics().
- Cleanups, and Kstat implements Comparable making sorting much
- Cleanups, bugfixes, can build svr4 packages.
- Parse new kar output format.
- 64-bit version, and png and areapng subcommands for cli chart
- Spring clean, just a bunch of tidying up.
- SequencedJKstat support for kstat -p output.
- KstatAccessorySet to drive multiple accessories together.
- Preliminary kstat -p parser support.
- Code cleanups, better exception handling.
- Code cleanups, should be no user-visible changes.
- Interactive chart builder. Code and javadoc cleanup. kstat cli
emulation now essentially complete.
- Code and javadoc cleanup; JavaFX example.
- Charts enhanced.
- Improved client-server mode.
- Experimental client-server mode added.
- Major refactoring and simplification.
- Added arcstat demo (removed in 0.25 and moved to SolView).
- Code cleanup using PMD.
- Added KstatAggregate class. Added ProcessorTree to map the cpu
structure. The psrinfo subcommand tests that. The cpustate demo shows
aggregate core and chip statistic for multithreaded amd multicore
machines. (The advanced cpustate demo was moved to SolView in version
0.25.) The cpustate and netload demos gain charts.
- Fixes NPEs when given a kstat with missing data. Humanizes the
units in the network rate display, and removes the kstatbrowser wrapper
(use "jkstat browser" instead).
- Text in resources. Updated jfreechart. kstat charts can have other
statistics added. Regular expression support in KstatFilter.
- Handle kstat chain updates. A master jkstat utility with the other
utilities implemented as subcommands. Removed unused native
methods. Added CDDL license text. Restructured the directory
layout. The browser Trees have models.
- Refactoring continues: common code eliminated from demos. Added
jkmemalloc utility; added jkchart utility.
- More code cleanups. Added chart displays using JFreeChart.
- More code cleanups. And more sensible class names. Overall, the API
is getting closer to where I want it to be.
- Browser sorting works properly.
- Many code cleanups: jstyle, generics, collections.
- First attempt at jmpstat. Other sample applications use filters.
- Browser now sorts. Thanks Tom!
- Add KstatFilter.
- jnetio has gone; jnetload is the new gadget.
- Menus cleaned up - RadioButtons for all the sleep menus, mnemonics
- Use SpringLayout in place of GridLayout.
- Add mm:0:phys_installed.
- Fix a number of display corruption issues.
- Right click popup menus in jiostat and jcpustate.
- The kstatbrowser now uses a JTable, rather than mocking up the
table in html.
- Added a new jfsstat utility to display the new kstats introduced
alongside the fsstat utility in Nevada build 35. The JTable also uses
the TableSorter class from the Java Swing tutorial to allow you to sort
- More work on jiostat, fixing up underlying performance
- This introduced jiostat, but was never released due to the
performance problems that jiostat encountered. Hopefully 0.10 is much
- The accessories have been significantly cleaned up and are better
structured. Rates now use the snaptimes, and accessories for the
distribution of packet sizes on bge interfaces and dma transfer rates
on ifb graphics cards have been added.
- Some more raw kstats, and some more graphical helpers. A general
code cleanup and restructure. Ability to clone the kstatbrowser window,
and help and license details. Added jcpustate, just like xcpustate.
- Add graphics to the kstat browser, so you get a continually
updating graphical representation of I/O and network traffic.
- Add some statistics, so you can see a breakdown of how many kstats
are in a given module, class, or type. Add the capability to update the
currently viewed kstat. Add the first raw kstat - nfs mntinfo.
- Add support for I/O and interrupt kstats. It should be easy to do
timer kstats, but I haven't found any yet to test with. And raw kstats
aren't hard - they just need to be done individually, which will take
time. I also added browsing by kstat class and type.
- Graphical kstat browser added. Run kstatbrowser.
- Simplifies the code, while adding graphical tools to display load
average and network utilization.
- Initial release. Classes to return the type of a kstat and its
Peter's Home | Zone Home