Class DiskStats

java.lang.Object
oshi.driver.linux.proc.DiskStats

@ThreadSafe
public final class DiskStats
extends java.lang.Object
Utility to read disk statistics from /proc/diskstats
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  DiskStats.IoStat
    Enum corresponding to the fields in the output of /proc/diskstats
  • Method Summary

    Modifier and Type Method Description
    static java.util.Map<java.lang.String,​java.util.Map<DiskStats.IoStat,​java.lang.Long>> getDiskStats()
    Reads the statistics in /proc/diskstats and returns the results.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getDiskStats

      public static java.util.Map<java.lang.String,​java.util.Map<DiskStats.IoStat,​java.lang.Long>> getDiskStats()
      Reads the statistics in /proc/diskstats and returns the results.
      Returns:
      A map with each disk's name as the key, and an EnumMap as the value, where the numeric values in DiskStats.IoStat are mapped to a Long value.