org.bootchart.parser.linux
Class IostatParser

java.lang.Object
  extended byorg.bootchart.parser.linux.IostatParser

public class IostatParser
extends java.lang.Object

IostatParser parses log files produced by iostat. These log files contain information about hard disk utilization and throughput.


Constructor Summary
IostatParser()
           
 
Method Summary
static double getMaxDiskTPut(java.util.List ioSampleList)
          Returns the maximum throughput seen in the iostat sample list.
static Stats parseLog(java.io.InputStream is, java.util.Date endTime)
          Parses the iostat log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IostatParser

public IostatParser()
Method Detail

parseLog

public static Stats parseLog(java.io.InputStream is,
                             java.util.Date endTime)
                      throws java.io.IOException,
                             java.text.ParseException
Parses the iostat log file. Consecutive iostat samples are parsed and returned in a list. Parsing stops when sample time exceeds endTime.

Parameters:
is - the input stream to parse
endTime - when to stop parsing
Returns:
disk I/O statistics
Throws:
java.io.IOException - if an I/O error occurs
java.text.ParseException - if a parsing error occurs

getMaxDiskTPut

public static double getMaxDiskTPut(java.util.List ioSampleList)
Returns the maximum throughput seen in the iostat sample list.

Parameters:
ioSampleList - iostat sample list
Returns:
maximum throughput