private static String executeCommand(final String lineSeparator, final boolean withlsof) {
    StringBuilder netstatInfo = new StringBuilder();

    executeNetstat(netstatInfo, lineSeparator);

    if (withlsof) {
      executeLsof(netstatInfo, lineSeparator);
    }

    return netstatInfo.toString();
  }
Executes 'netstat' OS command & returns the result as compressed bytes.

@since GemFire 7.0
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/functions/NetstatFunction.java