@Override
    public void run() {
        SessionManager manager = SessionManager.getInstance();
        values = new HashMap<>();
        values.put(NODE, CacheFactory.getClusterMemberID());
        // Collect number of authenticated users
        values.put(CLIENT, manager.getUserSessionsCount(true));
        // Collect number of incoming server connections
        values.put(INCOMING, manager.getIncomingServerSessionsCount(true));
        // Collect number of outgoing server connections
        values.put(OUTGOING, XMPPServer.getInstance().getRoutingTable().getServerSessionsCount());
        // Calculate free and used memory
        Runtime runtime = Runtime.getRuntime();
        double freeMemory = (double) runtime.freeMemory() / (1024 * 1024);
        double maxMemory = (double) runtime.maxMemory() / (1024 * 1024);
        double totalMemory = (double) runtime.totalMemory() / (1024 * 1024);
        double usedMemory = totalMemory - freeMemory;
        values.put(MEMORY_CURRENT, usedMemory);
        values.put(MEMORY_MAX, maxMemory);
    }
Command that returns basic information about this JVM like number of client sessions,
server sessions and amount of free and used memory.

@author Gaston Dombiak
xmppserver/src/main/java/org/jivesoftware/openfire/cluster/GetBasicStatistics.java