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 run.sh 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:
standard
another option is to generate a pdf:
java -jar kSar.jar -input '/var/log/sa/sarXX' -outputPDF today.pdf
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.
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(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at java.lang.Float.(Float.java:532)
at net.atomique.ksar.Linux.Parser.parse(Parser.java:624)
at net.atomique.ksar.kSar.parse(kSar.java:750)
at net.atomique.ksar.FileRead.run(FileRead.java:62)
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?