private static ProcessUtilsProvider initializeInternalProcessUtils() {
    // 1) prefer Attach because it filters out non-JVM processes
    try {
      Class.forName("com.sun.tools.attach.VirtualMachine");
      Class.forName("com.sun.tools.attach.VirtualMachineDescriptor");
      return new AttachProcessUtils();
    } catch (ClassNotFoundException | LinkageError ignored) {
      // fall through
    }

    // 2) try NativeCalls but make sure it doesn't throw UnsupportedOperationException
    try {
      // consider getting rid of Class.forName usage if NativeCalls always safely loads
      Class.forName("org.apache.geode.internal.shared.NativeCalls");
      NativeProcessUtils nativeProcessUtils = new NativeProcessUtils();
      boolean result = nativeProcessUtils.isProcessAlive(identifyPid());
      if (result) {
        return nativeProcessUtils;
      }
    } catch (ClassNotFoundException | LinkageError | PidUnavailableException
        | UnsupportedOperationException ignored) {
      // fall through
    }

    // 3) consider logging warning and then proceed with no-op
    return new ProcessUtilsProvider() {
      @Override
      public boolean isProcessAlive(final int pid) {
        return false;
      }

      @Override
      public boolean killProcess(final int pid) {
        return false;
      }

      @Override
      public boolean isAvailable() {
        return false;
      }

      @Override
      public boolean isAttachApiAvailable() {
        return false;
      }
    };
  }
Returns true if Attach API is available for checking status.
geode-core/src/main/java/org/apache/geode/internal/process/ProcessUtils.java