private void sampleSpecialStats(boolean prepareOnly) {
    List<Statistics> statsList = getStatisticsManager().getStatsList();
    for (Statistics s : statsList) {
      if (stopRequested()) {
        return;
      }
      if (s instanceof StatisticsImpl) {
        ((StatisticsImpl) s).prepareForSample();
      }
    }

    if (!prepareOnly && vmStats != null) {
      if (stopRequested()) {
        return;
      }
      vmStats.refresh();
    }
    sampleProcessStats(prepareOnly);
  }
Collect samples of any operating system statistics

@param prepareOnly set to true if you only want to call prepareForSample
geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java