org.bootchart.parser.linux

## Class ProcDiskStatParser

- java.lang.Object
- - org.bootchart.parser.linux.ProcDiskStatParser

-     public class ProcDiskStatParser
      extends java.lang.Object

  ProcDiskStatParser parses log files produced by logging the output of `/proc/diskstats`. The samples contain information about disk IO activity.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProcDiskStatParser()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `getMaxDiskTPut(java.util.List ioSampleList)` Returns the maximum throughput seen in the iostat sample list.
    `static Stats` | `parseLog(java.io.InputStream is, int numCpu)` Parses the `proc_diskstats.log` file.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcDiskStatParser

          public ProcDiskStatParser()

  - ### Method Detail

    - #### parseLog

          public static Stats parseLog(java.io.InputStream is,
                                       int numCpu)
                                throws java.io.IOException

      Parses the `proc_diskstats.log` file. The output from `/proc/diskstat` is used to collect the disk statistics.
      Parameters:
        `is` - the input stream to read from
        `numCpu` - number of processors
      Returns:
        disk statistics (`DiskUtilSample` and `DiskTPutSample` samples)
      Throws:
        `java.io.IOException` - if an I/O 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