private static void saveManagerInfo(int pid, int status, File directory, int port,
      InetAddress bindAddress) {
    ManagerInfo info = new ManagerInfo(pid, status, port, bindAddress);
    File infoFile = getManagerInfoFile(directory, true);
    try {
      FileOutputStream ostream = new FileOutputStream(infoFile);
      DataOutputStream dos = new DataOutputStream(ostream);
      DataSerializer.writeObject(info, dos);
      ostream.close();
    } catch (IOException io) {
      throw new GemFireIOException(
          String.format("Could not write file %s.", infoFile), io);
    }
  }
Saves the manager information to the info file in the given <code>directory</code>.

@param pid the process id of the manager VM.
@param status the status of the manager
@param directory the manager's directory.
@param port the tcp/ip port for the locator
@param bindAddress the tcp/ip address for the locator
@throws GemFireIOException if the file could not be written.
geode-core/src/main/java/org/apache/geode/internal/ManagerInfo.java