public void start() {
    synchronized (HostStatSampler.class) {
      if (statThread != null) {
        try {
          int msToWait = getSampleRate() + 100;
          statThread.join(msToWait);
        } catch (InterruptedException ex) {
          Thread.currentThread().interrupt();
        }
        if (statThread.isAlive()) {
          throw new IllegalStateException(
              "Statistics sampling thread is already running, indicating an incomplete shutdown of a previous cache.");
        }
      }
      callbackSampler.start(getStatisticsManager(), getSampleRate(), TimeUnit.MILLISECONDS);
      statThread = new LoggingThread("StatSampler", this);
      statThread.setPriority(Thread.MAX_PRIORITY);
      statThread.start();
      // fix #46310 (race between management and sampler init) by waiting for init here
      try {
        waitForInitialization(INITIALIZATION_TIMEOUT_MILLIS);
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      }
    }
  }
Starts the main thread for this service.

@throws IllegalStateException if an instance of the {@link #statThread} is still running from a
        previous DistributedSystem.
geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java