static IDiskMetricsManager getDiskMetricsManager() {
    if (MetricConfigDescriptor.getInstance()
        .getMetricConfig()
        .getMetricLevel()
        .equals(MetricLevel.OFF)) {
      return new DoNothingDiskMetricsManager();
    } else {
      String os = System.getProperty("os.name").toLowerCase();

      if (os.startsWith("windows")) {
        return new WindowsDiskMetricsManager();
      } else if (os.startsWith("linux")) {
        return new LinuxDiskMetricsManager();
      } else {
        return new MacDiskMetricsManager();
      }
    }
  }
Return different implementation of DiskMetricsManager according to OS type.
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/metricsets/disk/IDiskMetricsManager.java