private static void printStats(ConnectionRegistry registry)
    {
        Map<String, List<Integer>> nodeStates = retrieveStats(registry);
        System.out.println("Found " + nodeStates.size() + " nodes");

        System.out.println("GSNode\t\t  t\t MsgQ\t JobQ\t# RMs\t CPU%\t JVM%");
        for(String nodeName : nodeStates.keySet()) {
            if(nodeName.substring(0,2).equals("GS")) {
                printState(nodeName, nodeStates.get(nodeName));
            }
        }
        System.out.println();

        System.out.println("RMNode\t\t MsgQ\t JobQ\t maxQ\t#freeN\tnodes\t CPU%\t JVM%");
        for(String nodeName : nodeStates.keySet()) {
            if(nodeName.substring(0,2).equals("RM")) {
                printState(nodeName, nodeStates.get(nodeName));
            }
        }

        System.out.println("********************************************************");
    }