Class ProcFsReader

java.lang.Object
org.apache.druid.java.util.metrics.ProcFsReader

public class ProcFsReader extends Object
Fetches data from top-level procfs files for metrics.
  • Constructor Details

    • ProcFsReader

      public ProcFsReader(Path procFsRoot)
  • Method Details

    • getBootId

      public UUID getBootId()
      Reads the boot ID from the boot_id path, which is just a UUID.
      Returns:
      The boot UUID.
    • getProcessorCount

      public long getProcessorCount()
      Reads the cpuinfo path (example in src/test/resources/cpuinfo) and counts the number of processors.
      Returns:
      the number of processors.