private static void consoleMonitor(ConnectionRegistry registry)
    {
        // Set up console reading
        String line;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

        System.out.println("Hit <return> to retrieve the system state.\n");

        // Wait for user input
        while (true) {
            try {
                line = in.readLine();
                if (line == null || line.equals("q"))
                    break; // Quit

                printStats(registry);
            } catch (IOException e) {
                System.err.println("Server exception: " + e.toString());
                e.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
                System.out.println("Continuing");
            }
        }

        System.exit(0);
    }