visualize your sar data with ksar

April 11, 2013 — 3 Comments

if you are on linux/solaris and sar is configured and running on your system there is a nice utility called kSar which can be used to create graphs of the various statistics sar gathered. this can be very handy if you are looking for peaks and want to have a quick overview what happened on your system.

installing kSar is just a matter of unzipping the provided package and either executing the script or use java directly to execute the jar file:

java -jar kSar.jar

this will start ksar and you may load the sar files for having a look at the statistics:

another option is to generate a pdf:

java -jar kSar.jar -input '/var/log/sa/sarXX' -outputPDF today.pdf


and even faster: create a bash function and an alias in your .bashrc:

ksarfunc() {
java -jar PATH_TO/kSar.jar -input "$1" -outputPDF today.pdf
alias ksar='ksarfunc'

… and you will be able to quickly generate a pdf for a specific sar file:

ksar /path/to/sar/file

a much more comprehensive tutorial for sar and ksar can be found here.

3 responses to visualize your sar data with ksar


    it’s useful to me ..


    very nice tool, works on our old machines (Linux 2.6.18-274.18.1.el5 x86_64; jvm 1.6.0_27-b07), but fails on new ones (Linux 3.10.0-327.el7.x86_64 x86_64; JVM 1.8.0_65-b17) with this error:

    [esb@wm9-is-t1 bin]$ /opt/esb/jvm/jvm/jre/bin/java -jar /esbinstall/temp/kSar-5.0.6/kSar.jar -input ‘/var/log/sa/sar28’ -outputPDF wm9-is-t1_20160328_ksar.pdf
    java.lang.NumberFormatException: For input string: “all”
    at sun.misc.FloatingDecimal.readJavaFormatString(
    at sun.misc.FloatingDecimal.parseFloat(
    at java.lang.Float.parseFloat(
    at java.lang.Float.(
    at net.atomique.ksar.Linux.Parser.parse(
    at net.atomique.ksar.kSar.parse(

    Let me know if you need any further details.


    just tested on:

    Linux 4.2.0-23-generic #28~14.04.1-Ubuntu SMP Thu Dec 31 13:40:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

    java -version
    java version “1.7.0_95”
    OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
    OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

    works like a charm. does it not work at all or only the pdf part?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.