public String locatorInfo(File directory) {
    int statusCode = ManagerInfo.getLocatorStatusCode(directory);
    String statusString = ManagerInfo.statusToString(statusCode);
    try {
      ManagerInfo mi = ManagerInfo.loadLocatorInfo(directory);
      if (statusCode == ManagerInfo.KILLED_STATUS_CODE) {
        return String.format("Locator in %s was killed while it was %s. Locator process id was %s.",
            directory, ManagerInfo.statusToString(mi.getManagerStatus()),
            mi.getManagerProcessId());
      } else {
        return String.format("Locator in %s is %s. Locator process id is %s.",
            directory, statusString, mi.getManagerProcessId());
      }
    } catch (UnstartedSystemException ex) {
      return String.format("Locator in %s is stopped.", directory);
    } catch (GemFireIOException ex) {
      return String.format("Locator in %s is starting.", directory);
    }
  }
Gets information on the locator.

@param directory the locator's directory
@return information string.
@throws UncreatedSystemException if the locator <code>directory</code> does not exist or is not
        a directory.
@throws GemFireIOException if the manager info exists but could not be read. This probably
        means that the info file is corrupt.
geode-core/src/main/java/org/apache/geode/internal/SystemAdmin.java