private EnumMap<OpenFileNumStatistics, Integer> getStatisticMap() {
    EnumMap<OpenFileNumStatistics, Integer> resultMap = new EnumMap<>(OpenFileNumStatistics.class);
    String osName = System.getProperty("os.name").toLowerCase();
    // get runtime OS name, currently only support Linux and MacOS
    if (osName.startsWith(LINUX_OS_NAME) || osName.startsWith(MAC_OS_NAME)) {
      // if pid is normal, then get statistics
      if (pid > 0) {
        resultMap = getOpenFile(pid);
      } else {
        // pid is abnormal, give all statistics abnormal value -1
        for (OpenFileNumStatistics statistics : OpenFileNumStatistics.values()) {
          resultMap.put(statistics, PID_ERROR_CODE);
        }
      }
    } else {
      // operation system not supported, give all statistics abnormal value -2
      for (OpenFileNumStatistics statistics : OpenFileNumStatistics.values()) {
        resultMap.put(statistics, UNSUPPORTED_OS_ERROR_CODE);
      }
    }
    return resultMap;
  }
Check if runtime OS is supported then return the result list. If pid is abnormal then all
statistics returns -1, if OS is not supported then all statistics returns -2

@return map
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/OpenFileNumUtil.java