Class 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
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DiskStats()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      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
    • Constructor Detail

      • DiskStats

        private DiskStats()
    • Method Detail

      • 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.