public static int identifyPid(final String name) throws PidUnavailableException {
    notEmpty(name, "Invalid name '" + name + "' specified");

    try {
      final int index = name.indexOf('@');
      if (index < 0) {
        throw new PidUnavailableException("Unable to parse pid from " + name);
      }
      return Integer.parseInt(name.substring(0, index));
    } catch (NumberFormatException e) {
      throw new PidUnavailableException("Unable to parse pid from " + name, e);
    }
  }
Returns the pid for this process using the specified name from RuntimeMXBean.

@throws PidUnavailableException if parsing the pid from the RuntimeMXBean name fails
geode-core/src/main/java/org/apache/geode/internal/process/ProcessUtils.java