Menu

#23 NumberFormatException when parsing Linux "sar -Ap" text file

open
nobody
parser (12)
5
2016-12-06
2012-11-09
No

RHEL5 Server.
sa1 is run every minute with -d option
text file is created with "sar -Ap -f /var/log/sa/saXX" and then copied with pscp.exe to windows.

kSar is running on WinXP SP3 with java 1.6.0_35
When importing the text file:
java -jar kSar.jar
java.lang.NumberFormatException: For input string: "all"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Float.valueOf(Unknown Source)
at java.lang.Float.<init>(Unknown Source)
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)

The same command does work when using SSH from kSar directly.

Discussion

  • Daniël van Eeden

    kSar version 5.0.6

     
  • Michael Hannemann

    I believe I'm running into the same problem under MacOSX. I've always used kSar directly with ssh in the past, but I have machine which only allows ssh-keys, not password logins, and kSar cannot connect that way. I captured the "sar -A" output to a file, copied that down, and tried to load it with kSar. I get an incomplete load - no status message, incomplete population of the "interrupts" data, and nothing else.

     
  • Roger Michoud

    Roger Michoud - 2016-12-06

    I have run through the same problem but I found the solution. You need to run it that way:

    LC_ALL=C sar -A > my_sar.

    It looks like a problem of Locale. I still have a NumberFormatException, but only for kbhugfree, not for all. I get stats from the CPUs, Memory, Swapping, IO..

     

Log in to post a comment.