You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2019/06/17 17:04:09 UTC

[geode] branch develop updated: GEODE-6660: Remove non-Linux OS statistics classes (#3574)

This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new c31bfd7  GEODE-6660: Remove non-Linux OS statistics classes (#3574)
c31bfd7 is described below

commit c31bfd795c349390e2ce0d265eee6de21e2fd966
Author: Alberto Bustamante Reyes <al...@users.noreply.github.com>
AuthorDate: Mon Jun 17 19:03:56 2019 +0200

    GEODE-6660: Remove non-Linux OS statistics classes (#3574)
---
 .../internal/MemberHealthEvaluatorJUnitTest.java   |   4 +-
 .../GemFireStatSamplerIntegrationTest.java         |  45 +--
 .../org/apache/geode/internal/PureJavaMode.java    |  11 -
 .../internal/statistics/GemFireStatSampler.java    |  23 +-
 .../geode/internal/statistics/HostStatHelper.java  | 286 ---------------
 .../internal/statistics/OsStatisticsProvider.java  | 162 +++++++++
 .../statistics/platform/LinuxProcessStats.java     |   8 +-
 .../statistics/platform/OSXProcessStats.java       |  88 -----
 .../statistics/platform/OSXSystemStats.java        | 247 -------------
 .../statistics/platform/SolarisProcessStats.java   | 213 -----------
 .../statistics/platform/SolarisSystemStats.java    | 401 ---------------------
 .../statistics/platform/WindowsProcessStats.java   | 152 --------
 .../statistics/platform/WindowsSystemStats.java    | 256 -------------
 .../internal/beans/MemberMBeanBridge.java          |  22 +-
 .../statistics/OsStatisticsProviderTest.java       |  65 ++++
 15 files changed, 250 insertions(+), 1733 deletions(-)

diff --git a/geode-core/src/integrationTest/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java b/geode-core/src/integrationTest/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
index 56e4e47..6a574e6 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
@@ -25,8 +25,8 @@ import org.junit.Test;
 
 import org.apache.geode.admin.GemFireHealth;
 import org.apache.geode.admin.GemFireHealthConfig;
-import org.apache.geode.internal.PureJavaMode;
 import org.apache.geode.internal.statistics.GemFireStatSampler;
+import org.apache.geode.internal.statistics.OsStatisticsProvider;
 import org.apache.geode.internal.statistics.platform.ProcessStats;
 
 /**
@@ -46,7 +46,7 @@ public class MemberHealthEvaluatorJUnitTest extends HealthEvaluatorTestCase {
    */
   @Test
   public void testCheckVMProcessSize() throws InterruptedException {
-    if (PureJavaMode.osStatsAreAvailable()) {
+    if (OsStatisticsProvider.build().osStatsSupported()) {
       GemFireStatSampler sampler = system.getStatSampler();
       assertNotNull(sampler);
 
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java
index 143289c..356ebfb 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/internal/statistics/GemFireStatSamplerIntegrationTest.java
@@ -31,7 +31,6 @@ import static org.apache.geode.distributed.ConfigurationProperties.STATISTIC_SAM
 import static org.apache.geode.internal.GemFireVersion.getBuildId;
 import static org.apache.geode.internal.GemFireVersion.getGemFireVersion;
 import static org.apache.geode.internal.GemFireVersion.getSourceDate;
-import static org.apache.geode.internal.PureJavaMode.osStatsAreAvailable;
 import static org.apache.geode.internal.cache.control.HeapMemoryMonitor.getTenuredMemoryPoolMXBean;
 import static org.apache.geode.internal.cache.control.HeapMemoryMonitor.getTenuredPoolStatistics;
 import static org.apache.geode.internal.net.SocketCreator.getHostName;
@@ -169,38 +168,11 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
     ProcessStats processStats = statSampler.getProcessStats();
     AllStatistics allStats = new AllStatistics(statSampler);
 
-    if (osName.equals("SunOS")) {
+    if (osName.startsWith("Linux")) {
       assertThat(processStats)
           .withFailMessage("ProcessStats were not created on" + osName)
           .isNotNull();
-      assertThat(osStatsAreAvailable())
-          .as("os stats are available on SunOS")
-          .isTrue();
-      assertThat(allStats.containsStatisticsType("SolarisProcessStats"))
-          .as("SunOS stats include statistics type named SolarisProcessStats")
-          .isTrue();
-      assertThat(allStats.containsStatisticsType("SolarisSystemStats"))
-          .as("SunOS stats include statistics type named SolarisSystemStats")
-          .isTrue();
-    } else if (osName.startsWith("Windows")) {
-      // fails on Windows 7: 45395 "ProcessStats are not created on Windows 7"
-      assertThat(processStats)
-          .withFailMessage("ProcessStats were not created on" + osName)
-          .isNotNull();
-      assertThat(osStatsAreAvailable())
-          .as("os stats are available on Windows")
-          .isTrue();
-      assertThat(allStats.containsStatisticsType("WindowsProcessStats"))
-          .as("Windows stats include statistics type named WindowsProcessStats")
-          .isTrue();
-      assertThat(allStats.containsStatisticsType("WindowsSystemStats"))
-          .as("Windows stats include statistics type named WindowsSystemStats")
-          .isTrue();
-    } else if (osName.startsWith("Linux")) {
-      assertThat(processStats)
-          .withFailMessage("ProcessStats were not created on" + osName)
-          .isNotNull();
-      assertThat(osStatsAreAvailable())
+      assertThat(OsStatisticsProvider.build().osStatsSupported())
           .as("os stats are available on Linux")
           .isTrue();
       assertThat(allStats.containsStatisticsType("LinuxProcessStats"))
@@ -209,19 +181,6 @@ public class GemFireStatSamplerIntegrationTest extends StatSamplerTestCase {
       assertThat(allStats.containsStatisticsType("LinuxSystemStats"))
           .as("Linux stats include statistics type named LinuxSystemStats")
           .isTrue();
-    } else if (osName.equals("Mac OS X")) {
-      assertThat(processStats)
-          .withFailMessage("ProcessStats were created on" + osName)
-          .isNull();
-      assertThat(osStatsAreAvailable())
-          .as("os stats are available on Mac OS X")
-          .isFalse();
-      assertThat(allStats.containsStatisticsType("OSXProcessStats"))
-          .as("Mac OS X stats include statistics type named OSXProcessStats")
-          .isFalse();
-      assertThat(allStats.containsStatisticsType("OSXSystemStats"))
-          .as("Mac OS X stats include statistics type named OSXSystemStats")
-          .isFalse();
     } else {
       assertThat(processStats)
           .withFailMessage("ProcessStats were created on" + osName)
diff --git a/geode-core/src/main/java/org/apache/geode/internal/PureJavaMode.java b/geode-core/src/main/java/org/apache/geode/internal/PureJavaMode.java
index 08a3a46..44810be 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/PureJavaMode.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/PureJavaMode.java
@@ -38,7 +38,6 @@ public class PureJavaMode {
 
   private static final boolean isPure;
   private static final boolean is64Bit;
-  private static final boolean osStatsAreAvailable;
   static {
     boolean tmpIsPure = false;
     if (Boolean.getBoolean(PURE_MODE_PROPERTY)) {
@@ -63,8 +62,6 @@ public class PureJavaMode {
     }
     isPure = tmpIsPure;
     is64Bit = SharedLibrary.is64Bit();
-    String osName = System.getProperty("os.name", "unknown");
-    osStatsAreAvailable = osName.startsWith("Linux") || !isPure;
   }
 
   public static boolean isPure() {
@@ -74,12 +71,4 @@ public class PureJavaMode {
   public static boolean is64Bit() {
     return is64Bit;
   }
-
-  /**
-   * Linux has OsStats even in PureJava mode but other platforms require the native code to provide
-   * OS Statistics. return true if OSStatistics are available
-   */
-  public static boolean osStatsAreAvailable() {
-    return osStatsAreAvailable;
-  }
 }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java
index bc40666..bca9747 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/GemFireStatSampler.java
@@ -31,7 +31,6 @@ import org.apache.geode.distributed.internal.DistributionManager;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.PureJavaMode;
 import org.apache.geode.internal.admin.ListenerIdMap;
 import org.apache.geode.internal.admin.remote.StatListenerMessage;
 import org.apache.geode.internal.logging.LogFile;
@@ -66,6 +65,8 @@ public class GemFireStatSampler extends HostStatSampler {
   private int nextListenerId = 1;
   private ProcessStats processStats;
 
+  private OsStatisticsProvider osStatisticsProvider = OsStatisticsProvider.build();
+
   public GemFireStatSampler(InternalDistributedSystem internalDistributedSystem) {
     this(internalDistributedSystem, null);
   }
@@ -266,31 +267,31 @@ public class GemFireStatSampler extends HostStatSampler {
 
   @Override
   protected void initProcessStats(long id) {
-    if (PureJavaMode.osStatsAreAvailable()) {
+    if (osStatisticsProvider.osStatsSupported()) {
       if (osStatsDisabled()) {
         logger.info(LogMarker.STATISTICS_MARKER,
             "OS statistic collection disabled by setting the osStatsDisabled system property to true.");
       } else {
-        int retVal = HostStatHelper.initOSStats();
+        int retVal = osStatisticsProvider.initOSStats();
         if (retVal != 0) {
           logger.error(LogMarker.STATISTICS_MARKER,
               "OS statistics failed to initialize properly, some stats may be missing. See bugnote #37160.");
         }
-        HostStatHelper.newSystem(getOsStatisticsFactory(), id);
+        osStatisticsProvider.newSystem(getOsStatisticsFactory(), id);
         String statName = getStatisticsManager().getName();
         if (statName == null || statName.length() == 0) {
           statName = "javaApp" + getSystemId();
         }
         Statistics stats =
-            HostStatHelper.newProcess(getOsStatisticsFactory(), id, statName + "-proc");
-        processStats = HostStatHelper.newProcessStats(stats);
+            osStatisticsProvider.newProcess(getOsStatisticsFactory(), id, statName + "-proc");
+        processStats = osStatisticsProvider.newProcessStats(stats);
       }
     }
   }
 
   @Override
   protected void sampleProcessStats(boolean prepareOnly) {
-    if (prepareOnly || osStatsDisabled() || !PureJavaMode.osStatsAreAvailable()) {
+    if (prepareOnly || osStatsDisabled() || !osStatisticsProvider.osStatsSupported()) {
       return;
     }
     List<Statistics> statisticsList = getStatisticsManager().getStatsList();
@@ -300,26 +301,26 @@ public class GemFireStatSampler extends HostStatSampler {
     if (stopRequested()) {
       return;
     }
-    HostStatHelper.readyRefreshOSStats();
+    osStatisticsProvider.readyRefreshOSStats();
     for (Statistics statistics : statisticsList) {
       if (stopRequested()) {
         return;
       }
       StatisticsImpl statisticsImpl = (StatisticsImpl) statistics;
       if (statisticsImpl.usesSystemCalls()) {
-        HostStatHelper.refresh((LocalStatisticsImpl) statisticsImpl);
+        osStatisticsProvider.refresh((LocalStatisticsImpl) statisticsImpl);
       }
     }
   }
 
   @Override
   protected void closeProcessStats() {
-    if (PureJavaMode.osStatsAreAvailable()) {
+    if (osStatisticsProvider.osStatsSupported()) {
       if (!osStatsDisabled()) {
         if (processStats != null) {
           processStats.close();
         }
-        HostStatHelper.closeOSStats();
+        osStatisticsProvider.closeOSStats();
       }
     }
   }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java
deleted file mode 100644
index 7b94f40..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatHelper.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.statistics;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.apache.geode.InternalGemFireException;
-import org.apache.geode.Statistics;
-import org.apache.geode.internal.PureJavaMode;
-import org.apache.geode.internal.net.SocketCreator;
-import org.apache.geode.internal.statistics.platform.LinuxProcFsStatistics;
-import org.apache.geode.internal.statistics.platform.LinuxProcessStats;
-import org.apache.geode.internal.statistics.platform.LinuxSystemStats;
-import org.apache.geode.internal.statistics.platform.OSXProcessStats;
-import org.apache.geode.internal.statistics.platform.OSXSystemStats;
-import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
-import org.apache.geode.internal.statistics.platform.ProcessStats;
-import org.apache.geode.internal.statistics.platform.SolarisProcessStats;
-import org.apache.geode.internal.statistics.platform.SolarisSystemStats;
-import org.apache.geode.internal.statistics.platform.WindowsProcessStats;
-import org.apache.geode.internal.statistics.platform.WindowsSystemStats;
-
-/**
- * Provides native methods which fetch operating system statistics.
- */
-public class HostStatHelper {
-  private static final int SOLARIS_CODE = 1; // Sparc Solaris
-  private static final int WINDOWS_CODE = 2;
-  private static final int LINUX_CODE = 3; // x86 Linux
-  private static final int OSX_CODE = 4; // Mac OS X
-
-  private static final int PROCESS_STAT_FLAG = 1;
-  private static final int SYSTEM_STAT_FLAG = 2;
-
-  private static final int osCode;
-
-  static {
-    String osName = System.getProperty("os.name", "unknown");
-    if (!PureJavaMode.osStatsAreAvailable()) {
-      throw new RuntimeException("HostStatHelper not allowed in pure java mode");
-    } else if (osName.equals("SunOS")) {
-      osCode = SOLARIS_CODE;
-    } else if (osName.startsWith("Windows")) {
-      osCode = WINDOWS_CODE;
-    } else if (osName.startsWith("Linux")) {
-      osCode = LINUX_CODE;
-    } else if (osName.equals("Mac OS X")) {
-      osCode = OSX_CODE;
-    } else {
-      throw new InternalGemFireException(
-          String.format(
-              "Unsupported OS %s. Supported OSs are: SunOS(sparc Solaris), Linux(x86) and Windows.",
-              osName));
-    }
-  }
-
-  public static boolean isWindows() {
-    return osCode == WINDOWS_CODE;
-  }
-
-  public static boolean isUnix() {
-    return osCode != WINDOWS_CODE;
-  }
-
-  public static boolean isSolaris() {
-    return osCode == SOLARIS_CODE;
-  }
-
-  public static boolean isLinux() {
-    return osCode == LINUX_CODE;
-  }
-
-  public static boolean isOSX() {
-    return osCode == OSX_CODE;
-  }
-
-  private HostStatHelper() {
-    // instances are not allowed
-  }
-
-  static int initOSStats() {
-    if (isLinux()) {
-      return LinuxProcFsStatistics.init();
-    } else {
-      return init();
-    }
-  }
-
-  static void closeOSStats() {
-    if (isLinux()) {
-      LinuxProcFsStatistics.close();
-    } else {
-      close();
-    }
-  }
-
-  static void readyRefreshOSStats() {
-    if (isLinux()) {
-      LinuxProcFsStatistics.readyRefresh();
-    } else {
-      readyRefresh();
-    }
-  }
-
-  /**
-   * Allocates and initializes any resources required to sample operating system statistics. returns
-   * 0 if initialization succeeded
-   */
-  private static native int init();
-
-  /**
-   * Frees up resources used by this class. Once close is called this class can no longer be used.
-   */
-  private static native void close();
-
-  /**
-   * Should be called before any calls to the refresh methods. On some platforms if this is not
-   * called then the refesh methods will just keep returning the same old data.
-   */
-  private static native void readyRefresh();
-
-  /**
-   * Refreshes the specified process stats instance by fetching the current OS values for the given
-   * stats and storing them in the instance.
-   */
-  private static void refreshProcess(LocalStatisticsImpl statistics) {
-    int pid = (int) statistics.getNumericId();
-    if (isLinux()) {
-      LinuxProcFsStatistics.refreshProcess(pid, statistics._getIntStorage(),
-          statistics._getLongStorage(), statistics._getDoubleStorage());
-    } else {
-      refreshProcess(pid, statistics._getIntStorage(), statistics._getLongStorage(),
-          statistics._getDoubleStorage());
-    }
-  }
-
-  private static native void refreshProcess(int pid, int[] ints, long[] longs, double[] doubles);
-
-  /**
-   * Refreshes the specified system stats instance by fetching the current OS values for the local
-   * machine and storing them in the instance.
-   */
-  private static void refreshSystem(LocalStatisticsImpl statistics) {
-    if (isLinux()) {
-      LinuxProcFsStatistics.refreshSystem(statistics._getIntStorage(), statistics._getLongStorage(),
-          statistics._getDoubleStorage());
-    } else {
-      refreshSystem(statistics._getIntStorage(), statistics._getLongStorage(),
-          statistics._getDoubleStorage());
-    }
-  }
-
-  private static native void refreshSystem(int[] ints, long[] longs, double[] doubles);
-
-  /**
-   * The call should have already checked to make sure usesSystemCalls returns true.
-   */
-  public static void refresh(LocalStatisticsImpl statistics) {
-    int flags = statistics.getOsStatFlags();
-    if ((flags & PROCESS_STAT_FLAG) != 0) {
-      refreshProcess(statistics);
-    } else if ((flags & SYSTEM_STAT_FLAG) != 0) {
-      refreshSystem(statistics);
-    } else {
-      throw new RuntimeException(String.format("Unexpected os stats flags %s", flags));
-    }
-  }
-
-  /**
-   * Creates and returns a {@link Statistics} with the given pid and name. The resource's stats will
-   * contain a snapshot of the current statistic values for the specified process.
-   */
-  static Statistics newProcess(OsStatisticsFactory osStatisticsFactory, long pid, String name) {
-    Statistics statistics;
-    switch (osCode) {
-      case SOLARIS_CODE:
-        statistics =
-            osStatisticsFactory.createOsStatistics(SolarisProcessStats.getType(), name, pid,
-                PROCESS_STAT_FLAG);
-        break;
-      case LINUX_CODE:
-        statistics = osStatisticsFactory.createOsStatistics(LinuxProcessStats.getType(), name, pid,
-            PROCESS_STAT_FLAG);
-        break;
-      case OSX_CODE:
-        statistics = osStatisticsFactory.createOsStatistics(OSXProcessStats.getType(), name, pid,
-            PROCESS_STAT_FLAG);
-        break;
-      case WINDOWS_CODE:
-        statistics =
-            osStatisticsFactory.createOsStatistics(WindowsProcessStats.getType(), name, pid,
-                PROCESS_STAT_FLAG);
-        break;
-      default:
-        throw new InternalGemFireException(
-            String.format("unhandled osCode= %s HostStatHelper:newProcess", osCode));
-    }
-    // Note we don't call refreshProcess since we only want the manager to do that
-    return statistics;
-  }
-
-  /**
-   * Creates a new <code>ProcessStats</code> instance that wraps the given <code>Statistics</code>.
-   *
-   * @see #newProcess
-   * @since GemFire 3.5
-   */
-  static ProcessStats newProcessStats(Statistics statistics) {
-    switch (osCode) {
-      case SOLARIS_CODE:
-        return SolarisProcessStats.createProcessStats(statistics);
-
-      case LINUX_CODE:
-        return LinuxProcessStats.createProcessStats(statistics);
-
-      case WINDOWS_CODE:
-        return WindowsProcessStats.createProcessStats(statistics);
-
-      case OSX_CODE:
-        return OSXProcessStats.createProcessStats(statistics);
-
-      default:
-        throw new InternalGemFireException(
-            String.format("unhandled osCode= %s HostStatHelper:newProcessStats",
-                osCode));
-    }
-  }
-
-  /**
-   * Creates and returns a {@link Statistics} with the current machine's stats. The resource's stats
-   * will contain a snapshot of the current statistic values for the local machine.
-   */
-  static void newSystem(OsStatisticsFactory osStatisticsFactory, long id) {
-    Statistics statistics;
-    switch (osCode) {
-      case SOLARIS_CODE:
-        statistics = osStatisticsFactory.createOsStatistics(SolarisSystemStats.getType(),
-            getHostSystemName(), id, SYSTEM_STAT_FLAG);
-        break;
-      case LINUX_CODE:
-        statistics = osStatisticsFactory.createOsStatistics(LinuxSystemStats.getType(),
-            getHostSystemName(), id, SYSTEM_STAT_FLAG);
-        break;
-      case WINDOWS_CODE:
-        statistics = osStatisticsFactory.createOsStatistics(WindowsSystemStats.getType(),
-            getHostSystemName(), id, SYSTEM_STAT_FLAG);
-        break;
-      case OSX_CODE:
-        statistics = osStatisticsFactory.createOsStatistics(OSXSystemStats.getType(),
-            getHostSystemName(), id, SYSTEM_STAT_FLAG);
-        break;
-      default:
-        throw new InternalGemFireException(
-            String.format("unhandled osCode= %s HostStatHelper:newSystem", osCode));
-    }
-    if (statistics instanceof LocalStatisticsImpl) {
-      refreshSystem((LocalStatisticsImpl) statistics);
-    } // otherwise its a Dummy implementation so do nothing
-  }
-
-  /**
-   * @return this machine's fully qualified hostname or "unknownHostName" if one cannot be found.
-   */
-  private static String getHostSystemName() {
-    String hostname = "unknownHostName";
-    try {
-      InetAddress inetAddress = SocketCreator.getLocalHost();
-      hostname = inetAddress.getCanonicalHostName();
-    } catch (UnknownHostException ignored) {
-    }
-    return hostname;
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/OsStatisticsProvider.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/OsStatisticsProvider.java
new file mode 100644
index 0000000..31dfcb8
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/OsStatisticsProvider.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.statistics;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.apache.geode.InternalGemFireException;
+import org.apache.geode.Statistics;
+import org.apache.geode.internal.lang.SystemUtils;
+import org.apache.geode.internal.net.SocketCreator;
+import org.apache.geode.internal.statistics.platform.LinuxProcFsStatistics;
+import org.apache.geode.internal.statistics.platform.LinuxProcessStats;
+import org.apache.geode.internal.statistics.platform.LinuxSystemStats;
+import org.apache.geode.internal.statistics.platform.OsStatisticsFactory;
+import org.apache.geode.internal.statistics.platform.ProcessStats;
+
+/**
+ * Provides methods which fetch operating system statistics.
+ * Only Linux OS is currently allowed.
+ */
+public class OsStatisticsProvider {
+  private static final int PROCESS_STAT_FLAG = 1;
+  private static final int SYSTEM_STAT_FLAG = 2;
+  private final boolean osStatsSupported;
+  private final String currentOs;
+
+  public boolean osStatsSupported() {
+    return osStatsSupported;
+  }
+
+  private OsStatisticsProvider() {
+    currentOs = SystemUtils.getOsName();
+    osStatsSupported = SystemUtils.isLinux();
+    if (!isSupportedOs(currentOs)) {
+      throw new InternalGemFireException(
+          String.format("Unsupported OS %s. Only Linux(x86) OSs supports OS statistics.",
+              currentOs));
+    }
+  }
+
+  public static OsStatisticsProvider build() {
+    return new OsStatisticsProvider();
+  }
+
+  private boolean isSupportedOs(String os) {
+    boolean result = true;
+    if (!SystemUtils.isLinux() && !SystemUtils.isWindows() && !SystemUtils.isMacOSX()
+        && !SystemUtils.isSolaris()) {
+      result = false;
+    }
+    return result;
+  }
+
+  int initOSStats() {
+    return LinuxProcFsStatistics.init();
+  }
+
+  void closeOSStats() {
+    LinuxProcFsStatistics.close();
+  }
+
+  void readyRefreshOSStats() {
+    LinuxProcFsStatistics.readyRefresh();
+  }
+
+  /**
+   * Refreshes the specified process stats instance by fetching the current OS values for the given
+   * stats and storing them in the instance.
+   */
+  private void refreshProcess(LocalStatisticsImpl statistics) {
+    int pid = (int) statistics.getNumericId();
+    LinuxProcFsStatistics.refreshProcess(pid, statistics._getIntStorage(),
+        statistics._getLongStorage(), statistics._getDoubleStorage());
+  }
+
+  /**
+   * Refreshes the specified system stats instance by fetching the current OS values for the local
+   * machine and storing them in the instance.
+   */
+  private void refreshSystem(LocalStatisticsImpl statistics) {
+    LinuxProcFsStatistics.refreshSystem(statistics._getIntStorage(), statistics._getLongStorage(),
+        statistics._getDoubleStorage());
+  }
+
+  /**
+   * The call should have already checked to make sure usesSystemCalls returns true.
+   */
+  public void refresh(LocalStatisticsImpl statistics) {
+    int flags = statistics.getOsStatFlags();
+    if ((flags & PROCESS_STAT_FLAG) != 0) {
+      refreshProcess(statistics);
+    } else if ((flags & SYSTEM_STAT_FLAG) != 0) {
+      refreshSystem(statistics);
+    } else {
+      throw new RuntimeException(String.format("Unexpected os stats flags %s", flags));
+    }
+  }
+
+  /**
+   * Creates and returns a {@link Statistics} with the given pid and name. The resource's stats will
+   * contain a snapshot of the current statistic values for the specified process.
+   */
+  Statistics newProcess(OsStatisticsFactory osStatisticsFactory, long pid, String name) {
+    Statistics statistics;
+    statistics = osStatisticsFactory.createOsStatistics(LinuxProcessStats.getType(), name, pid,
+        PROCESS_STAT_FLAG);
+    // Note we don't call refreshProcess since we only want the manager to do that
+    return statistics;
+  }
+
+  /**
+   * Creates a new <code>ProcessStats</code> instance that wraps the given <code>Statistics</code>.
+   *
+   * @see #newProcess
+   * @since GemFire 3.5
+   */
+  ProcessStats newProcessStats(Statistics statistics) {
+    if (statistics instanceof LocalStatisticsImpl) {
+      refresh((LocalStatisticsImpl) statistics);
+    } // otherwise its a Dummy implementation so do nothing
+    return LinuxProcessStats.createProcessStats(statistics);
+  }
+
+  /**
+   * Creates a {@link Statistics} with the current machine's stats. The resource's stats
+   * will contain a snapshot of the current statistic values for the local machine.
+   */
+  void newSystem(OsStatisticsFactory osStatisticsFactory, long id) {
+    Statistics statistics;
+    statistics = osStatisticsFactory.createOsStatistics(LinuxSystemStats.getType(),
+        getHostSystemName(), id, SYSTEM_STAT_FLAG);
+    if (statistics instanceof LocalStatisticsImpl) {
+      refreshSystem((LocalStatisticsImpl) statistics);
+    } // otherwise its a Dummy implementation so do nothing
+  }
+
+  /**
+   * @return this machine's fully qualified hostname or "unknownHostName" if one cannot be found.
+   */
+  private String getHostSystemName() {
+    String hostname = "unknownHostName";
+    try {
+      InetAddress inetAddress = SocketCreator.getLocalHost();
+      hostname = inetAddress.getCanonicalHostName();
+    } catch (UnknownHostException ignored) {
+    }
+    return hostname;
+  }
+}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java
index 249d573..9af39f7 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/LinuxProcessStats.java
@@ -21,8 +21,6 @@ import org.apache.geode.StatisticsType;
 import org.apache.geode.StatisticsTypeFactory;
 import org.apache.geode.annotations.Immutable;
 import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.HostStatHelper;
-import org.apache.geode.internal.statistics.LocalStatisticsImpl;
 import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
 
 /**
@@ -69,11 +67,7 @@ public class LinuxProcessStats {
    *
    * @since GemFire 3.5
    */
-  public static ProcessStats createProcessStats(final Statistics stats) { // TODO: was
-                                                                          // package-protected
-    if (stats instanceof LocalStatisticsImpl) {
-      HostStatHelper.refresh((LocalStatisticsImpl) stats);
-    } // otherwise its a Dummy implementation so do nothing
+  public static ProcessStats createProcessStats(final Statistics stats) {
     return new ProcessStats(stats) {
       @Override
       public long getProcessSize() {
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java
deleted file mode 100644
index b17d81d..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXProcessStats.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.statistics.platform;
-
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
-import org.apache.geode.annotations.internal.MakeNotStatic;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.HostStatHelper;
-import org.apache.geode.internal.statistics.LocalStatisticsImpl;
-import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
-
-/**
- * <P>
- * This class provides the interface for statistics about a Mac OS X operating system process that
- * is using a GemFire system.
- */
-public class OSXProcessStats {
-  // private static final int imageSizeINT = 0;
-  // private static final int rssSizeINT = 1;
-
-  @MakeNotStatic
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
-    int id = myType.nameToId(name);
-    Assert.assertTrue(offset == id,
-        "Expected the offset for " + name + " to be " + offset + " but it was " + id);
-  }
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("OSXProcessStats", "Statistics on a OS X process.",
-        new StatisticDescriptor[] {f.createIntGauge("dummyStat", "Placeholder", "megabytes")
-        // f.createIntGauge("imageSize",
-        // "The size of the process's image in megabytes.",
-        // "megabytes"),
-        // f.createIntGauge("rssSize",
-        // "The size of the process's resident set size in megabytes.",
-        // "megabytes"),
-        });
-    // checkOffset("imageSize", imageSizeINT);
-    // checkOffset("rssSize", rssSizeINT);
-  }
-
-  private OSXProcessStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
-  }
-
-  /**
-   * Returns a <code>ProcessStats</code> that wraps OS X process <code>Statistics</code>.
-   *
-   * @since GemFire 3.5
-   */
-  public static ProcessStats createProcessStats(final Statistics stats) { // TODO: was
-                                                                          // package-protected
-    if (stats instanceof LocalStatisticsImpl) {
-      HostStatHelper.refresh((LocalStatisticsImpl) stats);
-    } // otherwise its a Dummy implementation so do nothing
-    return new ProcessStats(stats) {
-      @Override
-      public long getProcessSize() {
-        // return stats.getInt(rssSizeINT);
-        return 0L;
-      }
-    };
-  }
-
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java
deleted file mode 100644
index ef87bed..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/OSXSystemStats.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.statistics.platform;
-
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
-import org.apache.geode.annotations.Immutable;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
-
-/**
- * <P>
- * This class provides the interface for statistics about the OS X machine a GemFire system is
- * running on.
- */
-public class OSXSystemStats {
-
-  // shared fields
-  // private static final int allocatedSwapINT = 0;
-  // private static final int bufferMemoryINT = 1;
-  // private static final int contextSwitchesINT = 2;
-  // private static final int cpuActiveINT = 3;
-  // private static final int cpuIdleINT = 4;
-  // private static final int cpuNiceINT = 5;
-  // private static final int cpuSystemINT = 6;
-  // private static final int cpuUserINT = 7;
-  // private static final int cpusINT = 8;
-  // private static final int freeMemoryINT = 9;
-  // private static final int pagesPagedInINT = 10;
-  // private static final int pagesPagedOutINT = 11;
-  // private static final int pagesSwappedInINT = 12;
-  // private static final int pagesSwappedOutINT = 13;
-  // private static final int physicalMemoryINT = 14;
-  // private static final int processCreatesINT = 15;
-  // private static final int processesINT = 16;
-  // private static final int sharedMemoryINT = 17;
-  // private static final int unallocatedSwapINT = 18;
-  //
-  // private static final int loopbackPacketsLONG = 0;
-  // private static final int loopbackBytesLONG = 1;
-  // private static final int recvPacketsLONG = 2;
-  // private static final int recvBytesLONG = 3;
-  // private static final int recvErrorsLONG = 4;
-  // private static final int recvDropsLONG = 5;
-  // private static final int xmitPacketsLONG = 6;
-  // private static final int xmitBytesLONG = 7;
-  // private static final int xmitErrorsLONG = 8;
-  // private static final int xmitDropsLONG = 9;
-  // private static final int xmitCollisionsLONG = 10;
-  //
-  // private static final int loadAverage1DOUBLE = 0;
-  // private static final int loadAverage15DOUBLE = 1;
-  // private static final int loadAverage5DOUBLE = 2;
-
-  @Immutable
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
-    int id = myType.nameToId(name);
-    Assert.assertTrue(offset == id,
-        "Expected the offset for " + name + " to be " + offset + " but it was " + id);
-  }
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("OSXSystemStats", "Statistics on an OS X machine.",
-        new StatisticDescriptor[] {f.createIntGauge("dummyStat",
-            "Place holder statistic until Stats are implimented for the Mac OS X Platform.",
-            "megabytes"),
-        // f.createIntGauge("allocatedSwap",
-        // "The number of megabytes of swap space have actually been written to. Swap space must be
-        // reserved before it can be allocated.",
-        // "megabytes"),
-        // f.createIntGauge("bufferMemory",
-        // "The number of megabytes of memory allocated to buffers.",
-        // "megabytes"),
-        // f.createIntCounter("contextSwitches",
-        // "The total number of context switches from one thread to another on the computer. Thread
-        // switches can occur either inside of a single process or across processes. A thread switch
-        // may be caused either by one thread asking another for information, or by a thread being
-        // preempted by another, higher priority thread becoming ready to run.",
-        // "operations", false),
-        // f.createIntGauge("cpuActive",
-        // "The percentage of the total available time that has been used in a non-idle state.",
-        // "%"),
-        // f.createIntGauge("cpuIdle",
-        // "The percentage of the total available time that has been spent sleeping.",
-        // "%", true),
-        // f.createIntGauge("cpuNice",
-        // "The percentage of the total available time that has been used to execute user code in
-        // processes with low priority.",
-        // "%"),
-        // f.createIntGauge("cpuSystem",
-        // "The percentage of the total available time that has been used to execute system (i.e.
-        // kernel) code.",
-        // "%"),
-        // f.createIntGauge("cpuUser",
-        // "The percentage of the total available time that has been used to execute user code.",
-        // "%"),
-        // f.createIntGauge("cpus",
-        // "The number of online cpus on the local machine.",
-        // "items"),
-        // f.createIntGauge("freeMemory",
-        // "The number of megabytes of unused memory on the machine.",
-        // "megabytes", true),
-        // f.createIntCounter("pagesPagedIn",
-        // "The total number of pages that have been brought into memory from disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntCounter("pagesPagedOut",
-        // "The total number of pages that have been flushed from memory to disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntCounter("pagesSwappedIn",
-        // "The total number of swap pages that have been read in from disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntCounter("pagesSwappedOut",
-        // "The total number of swap pages that have been written out to disk by the operating
-        // system's memory manager.",
-        // "pages", false),
-        // f.createIntGauge("physicalMemory",
-        // "The actual amount of total physical memory on the machine.",
-        // "megabytes", true),
-        // f.createIntCounter("processCreates",
-        // "The total number of times a process has been created.",
-        // "operations", false),
-        // f.createIntGauge("processes",
-        // "The number of processes in the computer at the time of data collection. Notice that this
-        // is an instantaneous count, not an average over the time interval. Each process represents
-        // the running of a program.",
-        // "processes"),
-        // f.createIntGauge("sharedMemory",
-        // "The number of megabytes of shared memory on the machine.",
-        // "megabytes", true),
-        // f.createIntGauge("unallocatedSwap",
-        // "The number of megabytes of swap space that have not been allocated.",
-        // "megabytes", true),
-        //
-        // f.createLongCounter("loopbackPackets",
-        // "The number of network packets sent (or received) on the loopback interface",
-        // "packets", false),
-        // f.createLongCounter("loopbackBytes",
-        // "The number of network bytes sent (or received) on the loopback interface",
-        // "bytes", false),
-        // f.createLongCounter("recvPackets",
-        // "The total number of network packets received (excluding loopback)",
-        // "packets", false),
-        // f.createLongCounter("recvBytes",
-        // "The total number of network bytes received (excluding loopback)",
-        // "bytes", false),
-        // f.createLongCounter("recvErrors",
-        // "The total number of network receive errors",
-        // "errors", false),
-        // f.createLongCounter("recvDrops",
-        // "The total number network receives dropped",
-        // "packets", false),
-        // f.createLongCounter("xmitPackets",
-        // "The total number of network packets transmitted (excluding loopback)",
-        // "packets", false),
-        // f.createLongCounter("xmitBytes",
-        // "The total number of network bytes transmitted (excluding loopback)",
-        // "bytes", false),
-        // f.createLongCounter("xmitErrors",
-        // "The total number of network transmit errors",
-        // "errors", false),
-        // f.createLongCounter("xmitDrops",
-        // "The total number of network transmits dropped",
-        // "packets", false),
-        // f.createLongCounter("xmitCollisions",
-        // "The total number of network transmit collisions",
-        // "collisions", false),
-        //
-        //
-        // f.createDoubleGauge("loadAverage1",
-        // "The average number of threads in the run queue or waiting for disk I/O over the last
-        // minute.",
-        // "threads"),
-        // f.createDoubleGauge("loadAverage15",
-        // "The average number of threads in the run queue or waiting for disk I/O over the last
-        // fifteen minutes.",
-        // "threads"),
-        // f.createDoubleGauge("loadAverage5",
-        // "The average number of threads in the run queue or waiting for disk I/O over the last
-        // five minutes.",
-        // "threads"),
-        });
-
-    // checkOffset("allocatedSwap", allocatedSwapINT);
-    // checkOffset("bufferMemory", bufferMemoryINT);
-    // checkOffset("contextSwitches", contextSwitchesINT);
-    // checkOffset("cpuActive", cpuActiveINT);
-    // checkOffset("cpuIdle", cpuIdleINT);
-    // checkOffset("cpuNice", cpuNiceINT);
-    // checkOffset("cpuSystem", cpuSystemINT);
-    // checkOffset("cpuUser", cpuUserINT);
-    // checkOffset("cpus", cpusINT);
-    // checkOffset("freeMemory", freeMemoryINT);
-    // checkOffset("pagesPagedIn", pagesPagedInINT);
-    // checkOffset("pagesPagedOut", pagesPagedOutINT);
-    // checkOffset("pagesSwappedIn", pagesSwappedInINT);
-    // checkOffset("pagesSwappedOut", pagesSwappedOutINT);
-    // checkOffset("physicalMemory", physicalMemoryINT);
-    // checkOffset("processCreates", processCreatesINT);
-    // checkOffset("processes", processesINT);
-    // checkOffset("sharedMemory", sharedMemoryINT);
-    // checkOffset("unallocatedSwap", unallocatedSwapINT);
-    //
-    // checkOffset("loopbackPackets", loopbackPacketsLONG);
-    // checkOffset("loopbackBytes", loopbackBytesLONG);
-    // checkOffset("recvPackets", recvPacketsLONG);
-    // checkOffset("recvBytes", recvBytesLONG);
-    // checkOffset("recvErrors", recvErrorsLONG);
-    // checkOffset("recvDrops", recvDropsLONG);
-    // checkOffset("xmitPackets", xmitPacketsLONG);
-    // checkOffset("xmitBytes", xmitBytesLONG);
-    // checkOffset("xmitErrors", xmitErrorsLONG);
-    // checkOffset("xmitDrops", xmitDropsLONG);
-    // checkOffset("xmitCollisions", xmitCollisionsLONG);
-    //
-    // checkOffset("loadAverage1", loadAverage1DOUBLE);
-    // checkOffset("loadAverage15", loadAverage15DOUBLE);
-    // checkOffset("loadAverage5", loadAverage5DOUBLE);
-  }
-
-  private OSXSystemStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java
deleted file mode 100644
index 024a67d..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisProcessStats.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.statistics.platform;
-
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
-import org.apache.geode.annotations.Immutable;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.HostStatHelper;
-import org.apache.geode.internal.statistics.LocalStatisticsImpl;
-import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
-
-/**
- * <P>
- * This class provides the interface for statistics about a Solaris operating system process that is
- * using a GemFire system.
- */
-public class SolarisProcessStats {
-  private static final int allOtherSleepTimeINT = 0;
-  private static final int characterIoINT = 1;
-  private static final int dataFaultSleepTimeINT = 2;
-  private static final int heapSizeINT = 3;
-  private static final int imageSizeINT = 4;
-  private static final int involContextSwitchesINT = 5;
-  private static final int kernelFaultSleepTimeINT = 6;
-  private static final int lockWaitSleepTimeINT = 7;
-  private static final int lwpCurCountINT = 8;
-  private static final int lwpTotalCountINT = 9;
-  private static final int majorFaultsINT = 10;
-  private static final int messagesRecvINT = 11;
-  private static final int messagesSentINT = 12;
-  private static final int minorFaultsINT = 13;
-  private static final int rssSizeINT = 14;
-  private static final int signalsReceivedINT = 15;
-  private static final int systemCallsINT = 16;
-  private static final int stackSizeINT = 17;
-  private static final int stoppedTimeINT = 18;
-  private static final int systemTimeINT = 19;
-  private static final int textFaultSleepTimeINT = 20;
-  private static final int trapTimeINT = 21;
-  private static final int userTimeINT = 22;
-  private static final int volContextSwitchesINT = 23;
-  private static final int waitCpuTimeINT = 24;
-
-  private static final int activeTimeLONG = 0;
-
-  private static final int cpuUsedDOUBLE = 0;
-  private static final int memoryUsedDOUBLE = 1;
-
-  @Immutable
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
-    int id = myType.nameToId(name);
-    Assert.assertTrue(offset == id,
-        "Expected the offset for " + name + " to be " + offset + " but it was " + id);
-  }
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("SolarisProcessStats", "Statistics on a Solaris process.",
-        new StatisticDescriptor[] {
-            f.createIntCounter("allOtherSleepTime",
-                "The number of milliseconds the process has been sleeping for some reason not tracked by any other stat. Note that all lwp's contribute to this stat's value so check lwpCurCount to understand large values.",
-                "milliseconds", false),
-            f.createIntCounter("characterIo", "The number of characters read and written.",
-                "bytes"),
-            f.createIntCounter("dataFaultSleepTime",
-                "The number of milliseconds the process has been faulting in data pages.",
-                "milliseconds", false),
-            f.createIntGauge("heapSize", "The size of the process's heap in megabytes.",
-                "megabytes"),
-            f.createIntGauge("imageSize", "The size of the process's image in megabytes.",
-                "megabytes"),
-            f.createIntCounter("involContextSwitches",
-                "The number of times the process was forced to do a context switch.", "operations",
-                false),
-            f.createIntCounter("kernelFaultSleepTime",
-                "The number of milliseconds the process has been faulting in kernel pages.",
-                "milliseconds", false),
-            f.createIntCounter("lockWaitSleepTime",
-                "The number of milliseconds the process has been waiting for a user lock. Note that all lwp's contribute to this stat's value so check lwpCurCount to understand large values.",
-                "milliseconds", false),
-            f.createIntGauge("lwpCurCount",
-                "The current number of light weight processes that exist in the process.",
-                "threads"),
-            f.createIntCounter("lwpTotalCount",
-                "The total number of light weight processes that have ever contributed to the process's statistics.",
-                "threads", false),
-            f.createIntCounter("majorFaults",
-                "The number of times the process has had a page fault that needed disk access.",
-                "operations", false),
-            f.createIntCounter("messagesRecv", "The number of messages received by the process.",
-                "messages"),
-            f.createIntCounter("messagesSent", "The number of messages sent by the process.",
-                "messages"),
-            f.createIntCounter("minorFaults",
-                "The number of times the process has had a page fault that did not need disk access.",
-                "operations", false),
-            f.createIntGauge("rssSize", "The size of the process's resident set size in megabytes.",
-                "megabytes"),
-            f.createIntCounter("signalsReceived",
-                "The total number of operating system signals this process has received.",
-                "signals", false),
-            f.createIntCounter("systemCalls", "The total number system calls done by this process.",
-                "operations"),
-            f.createIntGauge("stackSize", "The size of the process's stack in megabytes.",
-                "megabytes"),
-            f.createIntCounter("stoppedTime",
-                "The number of milliseconds the process has been stopped.", "milliseconds", false),
-            f.createIntCounter("systemTime",
-                "The number of milliseconds the process has been using the CPU to execute system calls.",
-                "milliseconds", false),
-            f.createIntCounter("textFaultSleepTime",
-                "The number of milliseconds the process has been faulting in text pages.",
-                "milliseconds", false),
-            f.createIntCounter("trapTime",
-                "The number of milliseconds the process has been in system traps.", "milliseconds",
-                false),
-            f.createIntCounter("userTime",
-                "The number of milliseconds the process has been using the CPU to execute user code.",
-                "milliseconds", false),
-            f.createIntCounter("volContextSwitches",
-                "The number of voluntary context switches done by the process.", "operations",
-                false),
-            f.createIntCounter("waitCpuTime",
-                "The number of milliseconds the process has been waiting for a CPU due to latency.",
-                "milliseconds", false),
-
-
-            f.createLongCounter("activeTime",
-                "The number of milliseconds the process has been using the CPU to execute user or system code.",
-                "milliseconds", false),
-
-
-            f.createDoubleGauge("cpuUsed", "The percentage of recent cpu time used by the process.",
-                "%"),
-            f.createDoubleGauge("memoryUsed", "The percentage of real memory used by the process.",
-                "%")});
-
-    checkOffset("allOtherSleepTime", allOtherSleepTimeINT);
-    checkOffset("characterIo", characterIoINT);
-    checkOffset("dataFaultSleepTime", dataFaultSleepTimeINT);
-    checkOffset("heapSize", heapSizeINT);
-    checkOffset("imageSize", imageSizeINT);
-    checkOffset("involContextSwitches", involContextSwitchesINT);
-    checkOffset("kernelFaultSleepTime", kernelFaultSleepTimeINT);
-    checkOffset("lockWaitSleepTime", lockWaitSleepTimeINT);
-    checkOffset("lwpCurCount", lwpCurCountINT);
-    checkOffset("lwpTotalCount", lwpTotalCountINT);
-    checkOffset("majorFaults", majorFaultsINT);
-    checkOffset("messagesRecv", messagesRecvINT);
-    checkOffset("messagesSent", messagesSentINT);
-    checkOffset("minorFaults", minorFaultsINT);
-    checkOffset("rssSize", rssSizeINT);
-    checkOffset("signalsReceived", signalsReceivedINT);
-    checkOffset("systemCalls", systemCallsINT);
-    checkOffset("stackSize", stackSizeINT);
-    checkOffset("stoppedTime", stoppedTimeINT);
-    checkOffset("systemTime", systemTimeINT);
-    checkOffset("textFaultSleepTime", textFaultSleepTimeINT);
-    checkOffset("trapTime", trapTimeINT);
-    checkOffset("userTime", userTimeINT);
-    checkOffset("volContextSwitches", volContextSwitchesINT);
-    checkOffset("waitCpuTime", waitCpuTimeINT);
-
-    checkOffset("activeTime", activeTimeLONG);
-
-    checkOffset("cpuUsed", cpuUsedDOUBLE);
-    checkOffset("memoryUsed", memoryUsedDOUBLE);
-  }
-
-  private SolarisProcessStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
-  }
-
-  /**
-   * Returns a <code>ProcessStats</code> that wraps Solaris process <code>Statistics</code>.
-   *
-   * @since GemFire 3.5
-   */
-  public static ProcessStats createProcessStats(final Statistics stats) { // TODO: was
-                                                                          // package-protected
-    if (stats instanceof LocalStatisticsImpl) {
-      HostStatHelper.refresh((LocalStatisticsImpl) stats);
-    } // otherwise its a Dummy implementation so do nothing
-    return new ProcessStats(stats) {
-      @Override
-      public long getProcessSize() {
-        return stats.getInt(rssSizeINT);
-      }
-    };
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java
deleted file mode 100644
index 5064482..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/SolarisSystemStats.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.statistics.platform;
-
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
-import org.apache.geode.annotations.Immutable;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
-
-/**
- * <P>
- * This class provides the interface for statistics about the Solaris machine a GemFire system is
- * running on.
- */
-public class SolarisSystemStats {
-  private static final int allocatedSwapINT = 0;
-  private static final int cpuActiveINT = 1;
-  private static final int cpuIdleINT = 2;
-  private static final int cpuIoWaitINT = 3;
-  private static final int cpuSwapWaitINT = 4;
-  private static final int cpuSystemINT = 5;
-  private static final int cpuUserINT = 6;
-  private static final int cpuWaitingINT = 7;
-  private static final int cpusINT = 8;
-  private static final int freeMemoryINT = 9;
-  private static final int physicalMemoryINT = 10;
-  private static final int processesINT = 11;
-  private static final int reservedSwapINT = 12;
-  private static final int schedulerRunCountINT = 13;
-  private static final int schedulerSwapCountINT = 14;
-  private static final int schedulerWaitCountINT = 15;
-  private static final int unreservedSwapINT = 16;
-  private static final int unallocatedSwapINT = 17;
-
-  private static final int anonymousPagesFreedLONG = 0;
-  private static final int anonymousPagesPagedInLONG = 1;
-  private static final int anonymousPagesPagedOutLONG = 2;
-  private static final int contextSwitchesLONG = 3;
-  private static final int execPagesFreedLONG = 4;
-  private static final int execPagesPagedInLONG = 5;
-  private static final int execPagesPagedOutLONG = 6;
-  private static final int failedMutexEntersLONG = 7;
-  private static final int failedReaderLocksLONG = 8;
-  private static final int failedWriterLocksLONG = 9;
-  private static final int fileSystemPagesFreedLONG = 10;
-  private static final int fileSystemPagesPagedInLONG = 11;
-  private static final int fileSystemPagesPagedOutLONG = 12;
-  private static final int hatMinorFaultsLONG = 13;
-  private static final int interruptsLONG = 14;
-  private static final int involContextSwitchesLONG = 15;
-  private static final int majorPageFaultsLONG = 16;
-  private static final int messageCountLONG = 17;
-  private static final int pageDaemonCyclesLONG = 18;
-  private static final int pageInsLONG = 19;
-  private static final int pageOutsLONG = 20;
-  private static final int pagerRunsLONG = 21;
-  private static final int pagesPagedInLONG = 22;
-  private static final int pagesPagedOutLONG = 23;
-  private static final int pagesScannedLONG = 24;
-  private static final int procsInIoWaitLONG = 25;
-  private static final int protectionFaultsLONG = 26;
-  private static final int semphoreOpsLONG = 27;
-  private static final int softwareLockFaultsLONG = 28;
-  private static final int systemCallsLONG = 29;
-  private static final int systemMinorFaultsLONG = 30;
-  private static final int threadCreatesLONG = 31;
-  private static final int trapsLONG = 32;
-  private static final int userMinorFaultsLONG = 33;
-  private static final int loopbackInputPacketsLONG = 34;
-  private static final int loopbackOutputPacketsLONG = 35;
-  private static final int inputPacketsLONG = 36;
-  private static final int inputErrorsLONG = 37;
-  private static final int outputPacketsLONG = 38;
-  private static final int outputErrorsLONG = 39;
-  private static final int collisionsLONG = 40;
-  private static final int inputBytesLONG = 41;
-  private static final int outputBytesLONG = 42;
-  private static final int multicastInputPacketsLONG = 43;
-  private static final int multicastOutputPacketsLONG = 44;
-  private static final int broadcastInputPacketsLONG = 45;
-  private static final int broadcastOutputPacketsLONG = 46;
-  private static final int inputPacketsDiscardedLONG = 47;
-  private static final int outputPacketsDiscardedLONG = 48;
-
-  private static final int loadAverage1DOUBLE = 0;
-  private static final int loadAverage15DOUBLE = 1;
-  private static final int loadAverage5DOUBLE = 2;
-
-  @Immutable
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
-    int id = myType.nameToId(name);
-    Assert.assertTrue(offset == id,
-        "Expected the offset for " + name + " to be " + offset + " but it was " + id);
-  }
-
-  /*
-   * "\n  Segments ConnectionsEstablished ConnectionsActive"
-   * "\n  ConnectionsPassive ConnectionFailures ConnectionsReset"
-   * "\n  SegmentsReceived SegmentsSent SegmentsRetransmitted"
-   * "\n  SentTcpBytes RetransmittedTcpBytes AcksSent DelayedAcksSent" "\n  ControlSegmentsSent"
-   * "\n  AcksReceived AckedBytes DuplicateAcks AcksForUnsentData "
-   * "\n  ReceivedInorderBytes ReceivedOutOfOrderBytes ReceivedDuplicateBytes ReceivedPartialDuplicateBytes "
-   * "\n  RetransmitTimeouts RetransmitTimeoutDrops"
-   * "\n  KeepAliveTimeouts KeepAliveProbes KeepAliveDrops"
-   * "\n  ListenQueueFull HalfOpenQueueFull HalfOpenDrops" "\n) "); sprintf(buff, "%d", typeCount);
-   * TcpTypeCount = typeCount; typeCount++; strcat(res, buff); }
-   *
-   */
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("SolarisSystemStats", "Statistics on a Solaris machine.",
-        new StatisticDescriptor[] {
-            f.createIntGauge("allocatedSwap",
-                "The number of megabytes of swap space have actually been written to. Swap space must be reserved before it can be allocated.",
-                "megabytes"),
-            f.createIntGauge("cpuActive",
-                "The percentage of the total available time that has been used to execute user or system code.",
-                "%"),
-            f.createIntGauge("cpuIdle",
-                "The percentage of the total available time that has been spent sleeping.", "%",
-                true),
-            f.createIntGauge("cpuIoWait",
-                "The percentage of the total available time that has been spent waiting for disk io to complete.",
-                "%"),
-            f.createIntGauge("cpuSwapWait",
-                "The percentage of the total available time that has been spent waiting for paging and swapping to complete.",
-                "%"),
-            f.createIntGauge("cpuSystem",
-                "The percentage of the total available time that has been used to execute system (i.e. kernel) code.",
-                "%"),
-            f.createIntGauge("cpuUser",
-                "The percentage of the total available time that has been used to execute user code.",
-                "%"),
-            f.createIntGauge("cpuWaiting",
-                "The percentage of the total available time that has been spent waiting for io, paging, or swapping.",
-                "%"),
-            f.createIntGauge("cpus", "The number of online cpus on the local machine.", "items"),
-            f.createIntGauge("freeMemory",
-                "The number of megabytes of unused memory on the machine.", "megabytes", true),
-            f.createIntGauge("physicalMemory",
-                "The actual amount of total physical memory on the machine.", "megabytes", true),
-            f.createIntGauge("processes",
-                "The number of processes in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval.  Each process represents the running of a program.",
-                "processes"),
-            f.createIntGauge("reservedSwap",
-                "The number of megabytes of swap space reserved for allocation by a particular process.",
-                "megabytes"),
-            f.createIntCounter("schedulerRunCount",
-                "The total number of times the system scheduler has put a thread in its run queue.",
-                "operations", false),
-            f.createIntCounter("schedulerSwapCount",
-                "The total number of times the system scheduler has swapped out an idle process.",
-                "operations", false),
-            f.createIntCounter("schedulerWaitCount",
-                "The total number of times the system scheduler has removed a thread from the run queue because it was waiting for a resource.",
-                "operations", false),
-            f.createIntGauge("unreservedSwap",
-                "The number of megabytes of swap space that are free. If this value goes to zero new processes can no longer be created.",
-                "megabytes", true),
-            f.createIntGauge("unallocatedSwap",
-                "The number of megabytes of swap space that have not been allocated.", "megabytes",
-                true),
-
-
-            f.createLongCounter("anonymousPagesFreed",
-                "The total number pages that contain heap, stack, or other changeable data that have been removed from memory and added to the free list.",
-                "pages"),
-            f.createLongCounter("anonymousPagesPagedIn",
-                "The total number pages that contain heap, stack, or other changeable data that have been allocated in memory and possibly copied from disk.",
-                "pages", false),
-            f.createLongCounter("anonymousPagesPagedOut",
-                "The total number pages that contain heap, stack, or other changeable data that have been removed from memory and copied to disk.",
-                "pages", false),
-            f.createLongCounter("contextSwitches",
-                "The total number of context switches from one thread to another on the computer.  Thread switches can occur either inside of a single process or across processes.  A thread switch may be caused either by one thread asking another for information, or by a thread being preempted by another, higher priority thread becoming ready to run.",
-                "operations", false),
-            f.createLongCounter("execPagesFreed",
-                "The total number readonly pages that contain code or data that have been removed from memory and returned to the free list.",
-                "pages"),
-            f.createLongCounter("execPagesPagedIn",
-                "The total number readonly pages that contain code or data that have been copied from disk to memory.",
-                "pages", false),
-            f.createLongCounter("execPagesPagedOut",
-                "The total number readonly pages that contain code or data that have been removed from memory and will need to be paged in when used again.",
-                "pages", false),
-            f.createLongCounter("failedMutexEnters",
-                "The total number of times a thread entering a mutex had to wait for the mutex to be unlocked.",
-                "operations", false),
-            f.createLongCounter("failedReaderLocks",
-                "The total number of times readers failed to obtain a readers/writer locks on their first try. When this happens the reader has to wait for the current writer to release the lock.",
-                "operations", false),
-            f.createLongCounter("failedWriterLocks",
-                "The total number of times writers failed to obtain a readers/writer locks on their first try. When this happens the writer has to wait for all the current readers or the single writer to release the lock.",
-                "operations", false),
-            f.createLongCounter("fileSystemPagesFreed",
-                "The total number of pages, that contained the contents of a file due to the file being read from a file system, that   have been removed from memory and put on the free list.",
-                "pages"),
-            f.createLongCounter("fileSystemPagesPagedIn",
-                "The total number of pages that contain the contents of a file due to the file being read from a file system.",
-                "pages", false),
-            f.createLongCounter("fileSystemPagesPagedOut",
-                "The total number of pages, that contained the contents of a file due to the file being read from a file system, that   have been removed from memory and copied to disk.",
-                "pages", false),
-            f.createLongCounter("hatMinorFaults",
-                "The total number of hat faults. You only get these on systems with software memory management units.",
-                "operations", false),
-            f.createLongCounter("interrupts",
-                "The total number of interrupts that have occurred on the computer.", "operations",
-                false),
-            f.createLongCounter("involContextSwitches",
-                "The total number of times a thread was forced to give up the cpu even though it was still ready to run.",
-                "operations", false),
-            f.createLongCounter("majorPageFaults",
-                "The total number of times a page fault required disk io to get the page",
-                "operations", false),
-            f.createLongCounter("messageCount",
-                "The total number of msgrcv() and msgsnd() system calls.", "messages"),
-            f.createLongCounter("pageDaemonCycles",
-                "The total number of revolutions of the page daemon's scan \"clock hand\".",
-                "operations", false),
-            f.createLongCounter("pageIns",
-                "The total number of times pages have been brought into memory from disk by the operating system's memory manager.",
-                "operations", false),
-            f.createLongCounter("pageOuts",
-                "The total number of times pages have been flushed from memory to disk by the operating system's memory manager.",
-                "operations", false),
-            f.createLongCounter("pagerRuns",
-                "The total number of times the pager daemon has been scheduled to run.",
-                "operations", false),
-            f.createLongCounter("pagesPagedIn",
-                "The total number of pages that have been brought into memory from disk by the operating system's memory manager.",
-                "pages", false),
-            f.createLongCounter("pagesPagedOut",
-                "The total number of pages that have been flushed from memory to disk by the operating system's memory manager.",
-                "pages", false),
-            f.createLongCounter("pagesScanned",
-                "The total number pages examined by the pageout daemon. When the amount of free memory gets below a certain size, the daemon start to look for inactive memory pages to steal from processes. So I high scan rate is a good indication of needing more memory.",
-                "pages", false),
-            f.createLongGauge("procsInIoWait",
-                "The number of processes waiting for block I/O at this instant in time.",
-                "processes"),
-            f.createLongCounter("protectionFaults",
-                "The total number of times memory has been accessed in a way that was not allowed. This results in a segementation violation and in most cases a core dump.",
-                "operations", false),
-            f.createLongCounter("semphoreOps", "The total number of semaphore operations.",
-                "operations"),
-            f.createLongCounter("softwareLockFaults",
-                "The total number of faults caused by software locks held on memory pages.",
-                "operations", false),
-            f.createLongCounter("systemCalls", "The total number system calls.", "operations"),
-            f.createLongCounter("systemMinorFaults",
-                "The total number of minor page faults in kernel code. Minor page faults do not require disk access.",
-                "operations", false),
-            f.createLongCounter("threadCreates",
-                "The total number of times a thread has been created.", "operations", false),
-            f.createLongCounter("traps",
-                "The total number of traps that have occurred on the computer.", "operations",
-                false),
-            f.createLongCounter("userMinorFaults",
-                "The total number of minor page faults in non-kernel code. Minor page faults do not require disk access.",
-                "operatations", false),
-            f.createLongCounter("loopbackInputPackets",
-                "The total number of input packets received over the loopback network adaptor.",
-                "packets"),
-            f.createLongCounter("loopbackOutputPackets",
-                "The total number of output packets sent over the loopback network adaptor.",
-                "packets"),
-            f.createLongCounter("inputPackets", "packets received (Solaris kstat 'ipackets')",
-                "packets"),
-            f.createLongCounter("inputErrors", "input errors (Solaris kstat 'ierrors')", "errors",
-                false),
-            f.createLongCounter("outputPackets", "Solaris kstat 'opackets'", "packets"),
-            f.createLongCounter("outputErrors", "output errors (Solaris kstat 'oerrors')", "errors",
-                false),
-            f.createLongCounter("collisions", "Solaris kstat 'collisions'", "collisions", false),
-            f.createLongCounter("inputBytes", "octets received (Solaris kstat 'rbytes')", "bytes"),
-            f.createLongCounter("outputBytes", "octats transmitted (Solaris kstat 'obytes')",
-                "bytes"),
-            f.createLongCounter("multicastInputPackets",
-                "multicast received (Solaris kstat 'multircv')", "packets"),
-            f.createLongCounter("multicastOutputPackets",
-                "multicast requested to be sent (Solaris kstat 'multixmt')", "packets"),
-            f.createLongCounter("broadcastInputPackets",
-                "broadcast received (Solaris kstat 'brdcstrcv')", "packets"),
-            f.createLongCounter("broadcastOutputPackets",
-                "broadcast requested to be sent (Solaris kstat 'brdcstxmt')", "packets"),
-            f.createLongCounter("inputPacketsDiscarded",
-                "number receive packets discarded (Solaris kstat 'norcvbuf')", "packets"),
-            f.createLongCounter("outputPacketsDiscarded",
-                "packets that could not be sent up because the queue was flow controlled (Solaris kstat 'noxmtbuf')",
-                "packets"),
-
-
-            f.createDoubleGauge("loadAverage1",
-                "The average number of threads ready to run over the last minute.", "threads"),
-            f.createDoubleGauge("loadAverage15",
-                "The average number of threads ready to run over the last fifteen minutes.",
-                "threads"),
-            f.createDoubleGauge("loadAverage5",
-                "The average number of threads ready to run over the last five minutes.",
-                "threads")});
-    checkOffset("allocatedSwap", allocatedSwapINT);
-    checkOffset("cpuActive", cpuActiveINT);
-    checkOffset("cpuIdle", cpuIdleINT);
-    checkOffset("cpuIoWait", cpuIoWaitINT);
-    checkOffset("cpuSwapWait", cpuSwapWaitINT);
-    checkOffset("cpuSystem", cpuSystemINT);
-    checkOffset("cpuUser", cpuUserINT);
-    checkOffset("cpuWaiting", cpuWaitingINT);
-    checkOffset("cpus", cpusINT);
-    checkOffset("freeMemory", freeMemoryINT);
-    checkOffset("physicalMemory", physicalMemoryINT);
-    checkOffset("processes", processesINT);
-    checkOffset("reservedSwap", reservedSwapINT);
-    checkOffset("schedulerRunCount", schedulerRunCountINT);
-    checkOffset("schedulerSwapCount", schedulerSwapCountINT);
-    checkOffset("schedulerWaitCount", schedulerWaitCountINT);
-    checkOffset("unreservedSwap", unreservedSwapINT);
-    checkOffset("unallocatedSwap", unallocatedSwapINT);
-
-    checkOffset("anonymousPagesFreed", anonymousPagesFreedLONG);
-    checkOffset("anonymousPagesPagedIn", anonymousPagesPagedInLONG);
-    checkOffset("anonymousPagesPagedOut", anonymousPagesPagedOutLONG);
-    checkOffset("contextSwitches", contextSwitchesLONG);
-    checkOffset("execPagesFreed", execPagesFreedLONG);
-    checkOffset("execPagesPagedIn", execPagesPagedInLONG);
-    checkOffset("execPagesPagedOut", execPagesPagedOutLONG);
-    checkOffset("failedMutexEnters", failedMutexEntersLONG);
-    checkOffset("failedReaderLocks", failedReaderLocksLONG);
-    checkOffset("failedWriterLocks", failedWriterLocksLONG);
-    checkOffset("fileSystemPagesFreed", fileSystemPagesFreedLONG);
-    checkOffset("fileSystemPagesPagedIn", fileSystemPagesPagedInLONG);
-    checkOffset("fileSystemPagesPagedOut", fileSystemPagesPagedOutLONG);
-    checkOffset("hatMinorFaults", hatMinorFaultsLONG);
-    checkOffset("interrupts", interruptsLONG);
-    checkOffset("involContextSwitches", involContextSwitchesLONG);
-    checkOffset("majorPageFaults", majorPageFaultsLONG);
-    checkOffset("messageCount", messageCountLONG);
-    checkOffset("pageDaemonCycles", pageDaemonCyclesLONG);
-    checkOffset("pageIns", pageInsLONG);
-    checkOffset("pageOuts", pageOutsLONG);
-    checkOffset("pagerRuns", pagerRunsLONG);
-    checkOffset("pagesPagedIn", pagesPagedInLONG);
-    checkOffset("pagesPagedOut", pagesPagedOutLONG);
-    checkOffset("pagesScanned", pagesScannedLONG);
-    checkOffset("procsInIoWait", procsInIoWaitLONG);
-    checkOffset("protectionFaults", protectionFaultsLONG);
-    checkOffset("semphoreOps", semphoreOpsLONG);
-    checkOffset("softwareLockFaults", softwareLockFaultsLONG);
-    checkOffset("systemCalls", systemCallsLONG);
-    checkOffset("systemMinorFaults", systemMinorFaultsLONG);
-    checkOffset("threadCreates", threadCreatesLONG);
-    checkOffset("traps", trapsLONG);
-    checkOffset("userMinorFaults", userMinorFaultsLONG);
-    checkOffset("loopbackInputPackets", loopbackInputPacketsLONG);
-    checkOffset("loopbackOutputPackets", loopbackOutputPacketsLONG);
-    checkOffset("inputPackets", inputPacketsLONG);
-    checkOffset("inputErrors", inputErrorsLONG);
-    checkOffset("outputPackets", outputPacketsLONG);
-    checkOffset("outputErrors", outputErrorsLONG);
-    checkOffset("collisions", collisionsLONG);
-    checkOffset("inputBytes", inputBytesLONG);
-    checkOffset("outputBytes", outputBytesLONG);
-    checkOffset("multicastInputPackets", multicastInputPacketsLONG);
-    checkOffset("multicastOutputPackets", multicastOutputPacketsLONG);
-    checkOffset("broadcastInputPackets", broadcastInputPacketsLONG);
-    checkOffset("broadcastOutputPackets", broadcastOutputPacketsLONG);
-    checkOffset("inputPacketsDiscarded", inputPacketsDiscardedLONG);
-    checkOffset("outputPacketsDiscarded", outputPacketsDiscardedLONG);
-
-    checkOffset("loadAverage1", loadAverage1DOUBLE);
-    checkOffset("loadAverage15", loadAverage15DOUBLE);
-    checkOffset("loadAverage5", loadAverage5DOUBLE);
-  }
-
-  private SolarisSystemStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java
deleted file mode 100644
index 3e5fb20..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsProcessStats.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.statistics.platform;
-
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.Statistics;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
-import org.apache.geode.annotations.Immutable;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.HostStatHelper;
-import org.apache.geode.internal.statistics.LocalStatisticsImpl;
-import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
-
-/**
- * <P>
- * This class provides the interface for statistics about a windows operating system process that is
- * using a GemFire system.
- */
-public class WindowsProcessStats {
-  private static final int handlesINT = 0;
-  private static final int priorityBaseINT = 1;
-  private static final int threadsINT = 2;
-
-  private static final int activeTimeLONG = 0;
-  private static final int pageFaultsLONG = 1;
-  private static final int pageFileSizeLONG = 2;
-  private static final int pageFileSizePeakLONG = 3;
-  private static final int privateSizeLONG = 4;
-  private static final int systemTimeLONG = 5;
-  private static final int userTimeLONG = 6;
-  private static final int virtualSizeLONG = 7;
-  private static final int virtualSizePeakLONG = 8;
-  private static final int workingSetSizeLONG = 9;
-  private static final int workingSetSizePeakLONG = 10;
-
-  @Immutable
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
-    int id = myType.nameToId(name);
-    Assert.assertTrue(offset == id,
-        "Expected the offset for " + name + " to be " + offset + " but it was " + id);
-  }
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("WindowsProcessStats", "Statistics on a Microsoft Window's process.",
-        new StatisticDescriptor[] {
-            f.createIntGauge("handles",
-                "The total number of handles currently open by this process. This number is the sum of the handles currently open by each thread in this process.",
-                "items"),
-            f.createIntGauge("priorityBase",
-                "The current base priority of the process. Threads within a process can raise and lower their own base priority relative to the process's base priority",
-                "priority"),
-            f.createIntGauge("threads",
-                "Number of threads currently active in this process. An instruction is the basic unit of execution in a processor, and a thread is the object that executes instructions. Every running process has at least one thread.",
-                "threads"),
-
-            f.createLongCounter("activeTime",
-                "The elapsed time in milliseconds that all of the threads of this process used the processor to execute instructions. An instruction is the basic unit of execution in a computer, a thread is the object that executes instructions, and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions are included in this count.",
-                "milliseconds", false),
-
-            f.createLongCounter("pageFaults",
-                "The total number of Page Faults by the threads executing in this process. A page fault occurs when a thread refers to a virtual memory page that is not in its working set in main memory. This will not cause the page to be fetched from disk if it is on the standby list and hence already in main memory, or if it is in use by another process with whom the page is shared.",
-                "operations", false),
-            f.createLongGauge("pageFileSize",
-                "The current number of bytes this process has used in the paging file(s). Paging files are used to store pages of memory used by the process that are not contained in other files. Paging files are shared by all processes, and lack of space in paging files can prevent other processes from allocating memory.",
-                "bytes"),
-            f.createLongGauge("pageFileSizePeak",
-                "The maximum number of bytes this process has used in the paging file(s). Paging files are used to store pages of memory used by the process that are not contained in other files. Paging files are shared by all processes, and lack of space in paging files can prevent other processes from allocating memory.",
-                "bytes"),
-            f.createLongGauge("privateSize",
-                "The current number of bytes this process has allocated that cannot be shared with other processes.",
-                "bytes"),
-            f.createLongCounter("systemTime",
-                "The elapsed time in milliseconds that the threads of the process have spent executing code in privileged mode. When a Windows system service is called, the service will often run in Privileged Mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts. Unlike some early operating systems, Windows uses process boundaries for subsystem p [...]
-                "milliseconds", false),
-            f.createLongCounter("userTime",
-                "The elapsed time in milliseconds that this process's threads have spent executing code in user mode. Applications, environment subsystems, and integral subsystems execute in user mode. Code executing in User Mode cannot damage the integrity of the Windows Executive, Kernel, and device drivers. Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsyste [...]
-                "milliseconds", false),
-            f.createLongGauge("virtualSize",
-                "Virtual Bytes is the current size in bytes of the virtual address space the process is using. Use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is finite, and by using too much, the process can limit its ability to load libraries.",
-                "bytes"),
-            f.createLongGauge("virtualSizePeak",
-                "The maximum number of bytes of virtual address space the process has used at any one time. Use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is however finite, and by using too much, the process might limit its ability to load libraries.",
-                "bytes"),
-            f.createLongGauge("workingSetSize",
-                "The current number of bytes in the Working Set of this process. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before they are paged out out to disk.",
-                "bytes"),
-            f.createLongGauge("workingSetSizePeak",
-                "The maximum number of bytes in the Working Set of this process at any point in time. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before they lea [...]
-                "bytes"),
-
-        });
-    checkOffset("handles", handlesINT);
-    checkOffset("priorityBase", priorityBaseINT);
-    checkOffset("threads", threadsINT);
-
-    checkOffset("activeTime", activeTimeLONG);
-    checkOffset("pageFaults", pageFaultsLONG);
-    checkOffset("pageFileSize", pageFileSizeLONG);
-    checkOffset("pageFileSizePeak", pageFileSizePeakLONG);
-    checkOffset("privateSize", privateSizeLONG);
-    checkOffset("systemTime", systemTimeLONG);
-    checkOffset("userTime", userTimeLONG);
-    checkOffset("virtualSize", virtualSizeLONG);
-    checkOffset("virtualSizePeak", virtualSizePeakLONG);
-    checkOffset("workingSetSize", workingSetSizeLONG);
-    checkOffset("workingSetSizePeak", workingSetSizePeakLONG);
-  }
-
-  private WindowsProcessStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
-  }
-
-  /**
-   * Returns a <code>ProcessStats</code> that wraps Windows process <code>Statistics</code>.
-   *
-   * @since GemFire 3.5
-   */
-  public static ProcessStats createProcessStats(final Statistics stats) { // TODO: was
-                                                                          // package-protected
-    if (stats instanceof LocalStatisticsImpl) {
-      HostStatHelper.refresh((LocalStatisticsImpl) stats);
-    } // otherwise its a Dummy implementation so do nothing
-    return new ProcessStats(stats) {
-      @Override
-      public long getProcessSize() {
-        return stats.getLong(workingSetSizeLONG) / (1024 * 1024);
-      }
-    };
-  }
-
-}
diff --git a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java b/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java
deleted file mode 100644
index 03fca59..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/statistics/platform/WindowsSystemStats.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.statistics.platform;
-
-import org.apache.geode.StatisticDescriptor;
-import org.apache.geode.StatisticsType;
-import org.apache.geode.StatisticsTypeFactory;
-import org.apache.geode.annotations.Immutable;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.statistics.StatisticsTypeFactoryImpl;
-
-/**
- * <P>
- * This class provides the interface for statistics about the Windows machine a GemFire system is
- * running on.
- */
-public class WindowsSystemStats {
-  private static final int committedMemoryInUseINT = 0;
-  private static final int eventsINT = 1;
-  private static final int interruptsINT = 2;
-  private static final int mutexesINT = 3;
-  private static final int processesINT = 4;
-  private static final int processorQueueLengthINT = 5;
-  private static final int registryQuotaInUseINT = 6;
-  private static final int sharedMemorySectionsINT = 7;
-  private static final int semaphoresINT = 8;
-  private static final int threadsINT = 9;
-  private static final int dgramsReceivedINT = 10;
-  private static final int dgramsNoPortINT = 11;
-  private static final int dgramsReceivedErrorsINT = 12;
-  private static final int dgramsSentINT = 13;
-  private static final int loopbackPacketsINT = 14;
-  private static final int loopbackBytesINT = 15;
-  private static final int netPacketsReceivedINT = 16;
-  private static final int netBytesReceivedINT = 17;
-  private static final int netPacketsSentINT = 18;
-  private static final int netBytesSentINT = 19;
-
-
-  private static final int availableMemoryLONG = 0;
-  private static final int cacheFaultsLONG = 1;
-  private static final int cacheSizeLONG = 2;
-  private static final int cacheSizePeakLONG = 3;
-  private static final int committedMemoryLONG = 4;
-  private static final int committedMemoryLimitLONG = 5;
-  private static final int contextSwitchesLONG = 6;
-  private static final int demandZeroFaultsLONG = 7;
-  private static final int pageFaultsLONG = 8;
-  private static final int pageReadsLONG = 9;
-  private static final int pagesLONG = 10;
-  private static final int pageWritesLONG = 11;
-  private static final int pagesInputLONG = 12;
-  private static final int pagesOutputLONG = 13;
-  private static final int systemCallsLONG = 14;
-
-  private static final int cpuActiveDOUBLE = 0;
-  private static final int cpuIdleDOUBLE = 1;
-  private static final int cpuInterruptDOUBLE = 2;
-  private static final int cpuSystemDOUBLE = 3;
-  private static final int cpuUserDOUBLE = 4;
-
-  @Immutable
-  private static final StatisticsType myType;
-
-  private static void checkOffset(String name, int offset) {
-    int id = myType.nameToId(name);
-    Assert.assertTrue(offset == id,
-        "Expected the offset for " + name + " to be " + offset + " but it was " + id);
-  }
-
-  static {
-    StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
-    myType = f.createType("WindowsSystemStats", "Statistics on a Microsoft Windows machine.",
-        new StatisticDescriptor[] {
-            f.createIntGauge("committedMemoryInUse",
-                "This represents the percentage of available virtual memory in use. This is an instantaneous value, not an average.",
-                "%"),
-            f.createIntGauge("events",
-                "The number of events in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval.  An event is used when two or more threads wish to synchronize execution.",
-                "items"),
-            f.createIntCounter("interrupts",
-                "The total number of harware interrupts on the computer. Some devices that may generate interrupts are the system timer, the mouse, data communication lines, network interface cards and other peripheral devices.  This counter provides an indication of how busy these devices are on a computer-wide basis.",
-                "operations", false),
-            f.createIntGauge("mutexes",
-                "The number of mutexes in the computer at the time of data collection.  This is an instantaneous count, not an average over the time interval.  Mutexes are used by threads to assure only one thread is executing some section of code.",
-                "items"),
-            f.createIntGauge("processes",
-                "The number of processes in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval.  Each process represents the running of a program.",
-                "processes"),
-            f.createIntGauge("processorQueueLength",
-                "The instantaneous length of the processor queue in units of threads. All processors use a single queue in which threads wait for processor cycles.  This length does not include the threads that are currently executing.  A sustained processor queue length greater than two generally indicates processor congestion.  This is an instantaneous count, not an average over the time interval",
-                "threads"),
-            f.createIntGauge("registryQuotaInUse",
-                "The percentage of the Total Registry Quota Allowed currently in use by the system.",
-                "%"),
-            f.createIntGauge("sharedMemorySections",
-                "The number of sections in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval. A section is a portion of virtual memory created by a process for storing data.  A process may share sections with other processes.",
-                "items"),
-            f.createIntGauge("semaphores",
-                "The number of semaphores in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval.  Threads use semaphores to obtain exclusive access to data structures that they share with other threads.",
-                "items"),
-            f.createIntGauge("threads",
-                "The number of threads in the computer at the time of data collection.  Notice that this is an instantaneous count, not an average over the time interval.  A thread is the basic executable entity that can execute instructions in a processor.",
-                "threads"),
-            f.createIntCounter("dgramsReceived",
-                "The number of datagrams received on the VM's machine.", "datagrams/sec"),
-            f.createIntCounter("dgramsNoPort",
-                "The number of incoming datagrams that were discarded due to invalid headers",
-                "datagrams/sec"),
-            f.createIntCounter("dgramsReceivedErrors",
-                "The number of received UDP datagrams that could not be delivered for reasons other than the lack of an application at the destination port",
-                "datagrams"),
-            f.createIntCounter("dgramsSent", "The number of datagrams sent on the VM's machine",
-                "datagrams/sec"),
-
-            f.createIntCounter("loopbackPackets",
-                "The number of packets sent/received on the loopback interface", "packets"),
-            f.createIntCounter("loopbackBytes",
-                "The number of bytes sent/received on the loopback interface", "bytes"),
-            f.createIntCounter("netPacketsReceived",
-                "The number of network packets received (total excluding loopback)", "packets"),
-            f.createIntCounter("netBytesReceived",
-                "The number of network bytes received (total excluding loopback)", "bytes"),
-            f.createIntCounter("netPacketsSent",
-                "The number of network packets sent (total excluding loopback)", "packets"),
-            f.createIntCounter("netBytesSent",
-                "The number of network bytes sent (total excluding loopback)", "bytes"),
-
-            f.createLongGauge("availableMemory",
-                "The size, in bytes, of the virtual memory currently on the Zeroed, Free, and Standby lists.  Zeroed and Free memory is ready for use, with Zeroed memory cleared to zeros.  Standby memory is memory removed from a process's Working Set but still available.  Notice that this is an instantaneous count, not an average over the time interval.",
-                "bytes", true),
-            f.createLongCounter("cacheFaults",
-                "Incremented whenever the Cache manager does not find a file's page in the immediate Cache and must ask the memory manager to locate the page elsewhere in memory or on the disk so that it can be loaded into the immediate Cache.",
-                "operations", false),
-            f.createLongGauge("cacheSize",
-                "Measures the number of bytes currently in use by the system Cache.  The system Cache is used to buffer data retrieved from disk or LAN.  The system Cache uses memory not in use by active processes in the computer.",
-                "bytes"),
-            f.createLongGauge("cacheSizePeak",
-                "Measures the maximum number of bytes used by the system Cache.  The system Cache is used to buffer data retrieved from disk or LAN.  The system Cache uses memory not in use by active processes in the computer.",
-                "bytes"),
-            f.createLongGauge("committedMemory",
-                "The size of virtual memory, in bytes, that has been Committed (as opposed to simply reserved).  Committed memory must have backing (i.e., disk) storage available, or must be assured never to need disk storage (because main memory is large enough to hold it.)  Notice that this is an instantaneous count, not an average over the time interval.",
-                "bytes"),
-            f.createLongGauge("committedMemoryLimit",
-                "The size, in bytes, of virtual memory that can be committed without having to extend the paging file(s).  If the paging file(s) can be extended, this is a soft limit. Note that this value will change if the paging file is extended.",
-                "bytes"),
-            f.createLongCounter("contextSwitches",
-                "The number of times this thread has lost the cpu to another thread.  Thread switches can occur either inside of a single process or across processes.  A thread switch may be caused either by one thread asking another for information, or by a thread being preempted by another, higher priority thread becoming ready to run.  Unlike some early operating systems, Windows uses process boundaries for subsystem protection in addition to the traditional protection of User and Pri [...]
-                "operations", false),
-            f.createLongCounter("demandZeroFaults",
-                "The total number of page faults for pages that must be filled with zeros before the fault is satisfied.  If the Zeroed list is not empty, the fault can be resolved by removing a page from the Zeroed list.",
-                "operations", false),
-            f.createLongCounter("pageFaults",
-                "The total number of Page Faults by the threads executing in this process. A page fault occurs when a thread refers to a virtual memory page that is not in its working set in main memory. This will not cause the page to be fetched from disk if it is on the standby list and hence already in main memory, or if it is in use by another process with whom the page is shared.",
-                "operations", false),
-            f.createLongCounter("pageReads",
-                "The number of page read operations done by the process since it was last started. These operations involve actual disk reads and not reads from the shared page cache",
-                "operations", false),
-            f.createLongCounter("pages",
-                "The total number of pages read from the disk or written to the disk to resolve memory references to pages that were not in memory at the time of the reference. This is the sum of pagesInput and the pagesOutput. This counter includes paging traffic on behalf of the system Cache to access file data for applications.  This value also includes the pages to/from non-cached mapped memory files.  This is the primary counter to observe if you are concerned about excessive memory [...]
-                "pages", false),
-            f.createLongCounter("pageWrites",
-                "The number of pages written by the process since it was last started. These page writes are actual disk writes and not just writes into the shared page cache. Unless a large data load is in process, the number should be low for all processes except the Stone's AIO page server process.",
-                "operations", false),
-            f.createLongCounter("pagesInput",
-                "The total number of pages read from the disk to resolve memory references to pages that were not in memory at the time of the reference.  This counter includes paging traffic on behalf of the system Cache to access file data for applications.  This is an important counter to observe if you are concerned about excessive memory pressure (that is, thrashing), and the excessive paging that may result",
-                "pages", false),
-            f.createLongCounter("pagesOutput",
-                "A count of the total number of pages that are written to disk because the pages have been modified in main memory",
-                "pages", false),
-            f.createLongCounter("systemCalls",
-                "The total number of calls to Windows system service routines on the computer.  These routines perform all of the basic scheduling and synchronization of activities on the computer, and provide access to non-graphical devices, memory management, and name space management.",
-                "operations"),
-
-
-
-            f.createDoubleGauge("cpuActive",
-                "The percentage of time spent doing useful work by all processors.  On a multi-processor system, if all processors are always busy this is 100%.",
-                "%"),
-            f.createDoubleGauge("cpuIdle",
-                "The percentage of time the machine's processors spent idle.", "%", true),
-            f.createDoubleGauge("cpuInterrupt",
-                "The percentage of time spent receiving and servicing interrupts on all the processors on the machine. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention.  Normal thread execution is suspended during interru [...]
-                "%"),
-            f.createDoubleGauge("cpuSystem",
-                "The percentage of time spent in privileged mode by all processors.  On a multi-processor system, if all processors are always in privileged mode this is 100%.  When a Windows system service is called, the service will often run in privileged mode in order to gain access to system-private data.  Such data is protected from access by threads executing in user mode.  Calls to the system may be explicit, or they may be implicit such as when a page fault or an interrupt occur [...]
-                "%"),
-            f.createDoubleGauge("cpuUser",
-                "The percentage of time spent executing code in user mode on all the processor's on the machine.",
-                "%")});
-    checkOffset("committedMemoryInUse", committedMemoryInUseINT);
-    checkOffset("events", eventsINT);
-    checkOffset("interrupts", interruptsINT);
-    checkOffset("mutexes", mutexesINT);
-    checkOffset("processes", processesINT);
-    checkOffset("processorQueueLength", processorQueueLengthINT);
-    checkOffset("registryQuotaInUse", registryQuotaInUseINT);
-    checkOffset("sharedMemorySections", sharedMemorySectionsINT);
-    checkOffset("semaphores", semaphoresINT);
-    checkOffset("threads", threadsINT);
-    checkOffset("dgramsReceived", dgramsReceivedINT);
-    checkOffset("dgramsNoPort", dgramsNoPortINT);
-    checkOffset("dgramsReceivedErrors", dgramsReceivedErrorsINT);
-    checkOffset("dgramsSent", dgramsSentINT);
-
-    checkOffset("loopbackPackets", loopbackPacketsINT);
-    checkOffset("loopbackBytes", loopbackBytesINT);
-    checkOffset("netPacketsReceived", netPacketsReceivedINT);
-    checkOffset("netBytesReceived", netBytesReceivedINT);
-    checkOffset("netPacketsSent", netPacketsSentINT);
-    checkOffset("netBytesSent", netBytesSentINT);
-
-    checkOffset("availableMemory", availableMemoryLONG);
-    checkOffset("cacheFaults", cacheFaultsLONG);
-    checkOffset("cacheSize", cacheSizeLONG);
-    checkOffset("cacheSizePeak", cacheSizePeakLONG);
-    checkOffset("committedMemory", committedMemoryLONG);
-    checkOffset("committedMemoryLimit", committedMemoryLimitLONG);
-    checkOffset("contextSwitches", contextSwitchesLONG);
-    checkOffset("demandZeroFaults", demandZeroFaultsLONG);
-    checkOffset("pageFaults", pageFaultsLONG);
-    checkOffset("pageReads", pageReadsLONG);
-    checkOffset("pages", pagesLONG);
-    checkOffset("pageWrites", pageWritesLONG);
-    checkOffset("pagesInput", pagesInputLONG);
-    checkOffset("pagesOutput", pagesOutputLONG);
-    checkOffset("systemCalls", systemCallsLONG);
-
-    checkOffset("cpuActive", cpuActiveDOUBLE);
-    checkOffset("cpuIdle", cpuIdleDOUBLE);
-    checkOffset("cpuInterrupt", cpuInterruptDOUBLE);
-    checkOffset("cpuSystem", cpuSystemDOUBLE);
-    checkOffset("cpuUser", cpuUserDOUBLE);
-  }
-
-  private WindowsSystemStats() {
-    // no instances allowed
-  }
-
-  public static StatisticsType getType() {
-    return myType;
-  }
-}
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
index 311611f..ca70604 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java
@@ -60,7 +60,6 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.locks.DLockService;
 import org.apache.geode.distributed.internal.locks.DLockStats;
 import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.PureJavaMode;
 import org.apache.geode.internal.cache.CachePerfStats;
 import org.apache.geode.internal.cache.DirectoryHolder;
 import org.apache.geode.internal.cache.DiskDirectoryStats;
@@ -84,13 +83,11 @@ import org.apache.geode.internal.offheap.OffHeapMemoryStats;
 import org.apache.geode.internal.process.PidUnavailableException;
 import org.apache.geode.internal.process.ProcessUtils;
 import org.apache.geode.internal.statistics.GemFireStatSampler;
-import org.apache.geode.internal.statistics.HostStatHelper;
+import org.apache.geode.internal.statistics.OsStatisticsProvider;
 import org.apache.geode.internal.statistics.StatSamplerStats;
 import org.apache.geode.internal.statistics.VMStatsContract;
 import org.apache.geode.internal.statistics.platform.LinuxSystemStats;
 import org.apache.geode.internal.statistics.platform.ProcessStats;
-import org.apache.geode.internal.statistics.platform.SolarisSystemStats;
-import org.apache.geode.internal.statistics.platform.WindowsSystemStats;
 import org.apache.geode.internal.stats50.VMStats50;
 import org.apache.geode.internal.tcp.ConnectionTable;
 import org.apache.geode.management.GemFireProperties;
@@ -312,6 +309,8 @@ public class MemberMBeanBridge {
 
   private ResourceManagerStats resourceManagerStats;
 
+  private final OsStatisticsProvider osStatisticsProvider = OsStatisticsProvider.build();
+
   public MemberMBeanBridge(InternalCache cache, SystemManagementService service) {
     this.cache = cache;
     this.service = service;
@@ -427,18 +426,9 @@ public class MemberMBeanBridge {
       addDistributionStats(distributionStats);
     }
 
-    if (PureJavaMode.osStatsAreAvailable()) {
+    if (osStatisticsProvider.osStatsSupported()) {
       Statistics[] systemStats = null;
-
-      if (HostStatHelper.isSolaris()) {
-        systemStats = system.findStatisticsByType(SolarisSystemStats.getType());
-      } else if (HostStatHelper.isLinux()) {
-        systemStats = system.findStatisticsByType(LinuxSystemStats.getType());
-      } else if (HostStatHelper.isOSX()) {
-        systemStats = null;// @TODO once OSX stats are implemented
-      } else if (HostStatHelper.isWindows()) {
-        systemStats = system.findStatisticsByType(WindowsSystemStats.getType());
-      }
+      systemStats = system.findStatisticsByType(LinuxSystemStats.getType());
 
       if (systemStats != null) {
         systemStat = systemStats[0];
@@ -783,7 +773,7 @@ public class MemberMBeanBridge {
       }
 
       // If Linux System type exists
-      if (PureJavaMode.osStatsAreAvailable() && HostStatHelper.isLinux() && systemStat != null) {
+      if (osStatisticsProvider.osStatsSupported() && systemStat != null) {
 
         try {
           totalPhysicalMemorySize =
diff --git a/geode-core/src/test/java/org/apache/geode/internal/statistics/OsStatisticsProviderTest.java b/geode-core/src/test/java/org/apache/geode/internal/statistics/OsStatisticsProviderTest.java
new file mode 100644
index 0000000..4ecea22
--- /dev/null
+++ b/geode-core/src/test/java/org/apache/geode/internal/statistics/OsStatisticsProviderTest.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.statistics;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.rules.ExpectedException;
+
+import org.apache.geode.InternalGemFireException;
+
+public class OsStatisticsProviderTest {
+
+  @Rule
+  public ExpectedException exceptionGrabber = ExpectedException.none();
+
+  @Rule
+  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+
+  @Test
+  public void givenLinuxOs_thenOsStatsAreSupported() {
+    System.setProperty("os.name", "Linux");
+    assertThat(OsStatisticsProvider.build().osStatsSupported()).isTrue();
+  }
+
+  @Test
+  public void givenWindowsOs_thenOsStatsAreNotSupported() {
+    System.setProperty("os.name", "Windows");
+    assertThat(OsStatisticsProvider.build().osStatsSupported()).isFalse();
+  }
+
+  @Test
+  public void givenMacOs_thenOsStatsAreNotSupported() {
+    System.setProperty("os.name", "Mac OS X");
+    assertThat(OsStatisticsProvider.build().osStatsSupported()).isFalse();
+  }
+
+  @Test
+  public void givenSolarisOs_thenOsStatsAreNotSupported() {
+    System.setProperty("os.name", "SunOS");
+    assertThat(OsStatisticsProvider.build().osStatsSupported()).isFalse();
+  }
+
+  @Test
+  public void givenUnknownOs_thenBuilderThrowsAnException() {
+    System.setProperty("os.name", "AnyOtherOS");
+    exceptionGrabber.expect(InternalGemFireException.class);
+    OsStatisticsProvider.build();
+  }
+
+}