#13 kSar cannot handle output from sysstat 9.1.x

open
nobody
None
5
2014-08-19
2011-07-17
Anonymous
No

systat package 9.1.7 on Ubuntu 11.04 64bit

Run sudo sar -o test.sar 1
to generate binary outfile.

Converted file using "-A" option: sar -A -f test.sar > testsar-converted.txt

When loading the testsar-converted.txt in kSar 5.0.6, I got

java.lang.IllegalArgumentException: The 'year' argument must be in range 1900 to 9999.
at org.jfree.date.SpreadsheetDate.<init>(SpreadsheetDate.java:114)
at org.jfree.date.SerialDate.createInstance(SerialDate.java:795)
at org.jfree.data.time.Day.<init>(Day.java:126)
at org.jfree.data.time.Minute.<init>(Minute.java:175)
at org.jfree.data.time.Second.<init>(Second.java:136)
at net.atomique.ksar.Linux.Parser.parse(Parser.java:153)
at net.atomique.ksar.kSar.parse(kSar.java:750)
at net.atomique.ksar.FileRead.run(FileRead.java:62)

Ok, from some comments on other bugs, I set "export LC_ALL=C" before running "sar -o" again.

Converted again using "-A" option, kSar failed with

java.lang.NumberFormatException: For input string: "irec/s"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Float.valueOf(Float.java:405)
at java.lang.Float.<init>(Float.java:506)
at net.atomique.ksar.Linux.Parser.parse(Parser.java:992)
at net.atomique.ksar.kSar.parse(kSar.java:750)
at net.atomique.ksar.FileRead.run(FileRead.java:62)

Removed the option "-n ALL" from conversion command and imported again, kSar failed with

java.lang.NumberFormatException: For input string: "degC"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Float.valueOf(Float.java:405)
at java.lang.Float.<init>(Float.java:506)
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)

Removed the option "-m ALL" from conversion command and imported again, kSar failed with

java.lang.NumberFormatException: For input string: "kbhugused"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Float.valueOf(Float.java:405)
at java.lang.Float.<init>(Float.java:506)
at net.atomique.ksar.Linux.Parser.parse(Parser.java:897)
at net.atomique.ksar.kSar.parse(kSar.java:750)
at net.atomique.ksar.FileRead.run(FileRead.java:62)

Removed the option "-H" from conversion command and imported again, this time successfully.
However, network statistics are missing (as removed with option "-n ALL")

The working options from sar to convert the binary data file are:
sar -bBdqrRSuvwWy -I SUM -I XALL -u ALL -P ALL -f test.sar > testsar-converted.txt

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks