public double getPercentUsed() {
            final double percentUsed = (usedMemory / maximumMemory) * 100.0;
            return Math.max(Math.min(percentUsed, 100.0), 0.0);
        }
Returns the percentage of the maximum memory that is currently being used by Openfire.

@return a percentage (between 0.0 and 100.0).
xmppserver/src/main/java/org/jivesoftware/util/MemoryUsageMonitor.java