protected Status spinReadStatus() {
    Status status = null;

    final long endTime = (System.currentTimeMillis() + 20000);
    long clock = 0;

    while (status == null && clock < endTime) {
      try {
        status = readStatus();
      } catch (Exception ignore) {
        // see bug 31575
        // see bug 36998
        // try again after a short delay... the status file might have been read prematurely before
        // it existed
        // or while the server was trying to write to it resulting in a possible EOFException, or
        // other IOException.
        pause(500);
      } finally {
        clock = System.currentTimeMillis();
      }
    }

    return status;
  }
Reads the JMX Agent's status from the .agent.ser status file. If the status file cannot be read
due to I/O problems, the method will keep attempting to read the file for up to 20 seconds.
<p>

@return the Status of the GemFire JMX Agent as determined by the .agent.ser status file, or
        natively based on the presence/absence of the Agent process.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java