public String getHealthMemory() {
        StringBuilder sb = new StringBuilder();
        sb.append("Logging JVM Stats\n");
        MonitorProvider mp = MonitorProvider.getInstance();
        PerformUsage perf = mp.getJVMMemoryUsage();
        sb.append(perf.toString());

        if (perf.memoryUsagePercent >= THRESHOLD_PERCENT) {
            sb.append("========= WARNING: MEM USAGE > " + THRESHOLD_PERCENT
                    + "!!");
            sb.append(" !! Live Threads List=============\n");
            sb.append(mp.getThreadUsage().toString());
            sb.append("========================================\n");
            sb.append("========================JVM Thread Dump====================\n");
            ThreadInfo[] threadDump = mp.getThreadDump();
            for (ThreadInfo threadInfo : threadDump) {
                sb.append(threadInfo.toString() + "\n");
            }
            sb.append("===========================================================\n");
        }
        sb.append("Logged JVM Stats\n");

        return sb.toString();
    }
public String getHealthMemory ( ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Logging JVM Stats\n" ) ; MonitorProvider mp = MonitorProvider . getInstance ( ) ; PerformUsage perf = mp . getJVMMemoryUsage ( ) ; sb . append ( perf . toString ( ) ) ; if ( perf . memoryUsagePercent >= THRESHOLD_PERCENT ) { sb . append ( "========= WARNING: MEM USAGE > " + THRESHOLD_PERCENT + "!!" ) ; sb . append ( " !! Live Threads List=============\n" ) ; sb . append ( mp . getThreadUsage ( ) . toString ( ) ) ; sb . append ( "========================================\n" ) ; sb . append ( "========================JVM Thread Dump====================\n" ) ; ThreadInfo [ ] threadDump = mp . getThreadDump ( ) ; for ( ThreadInfo threadInfo : threadDump ) { sb . append ( threadInfo . toString ( ) + "\n" ) ; } sb . append ( "===========================================================\n" ) ; } sb . append ( "Logged JVM Stats\n" ) ; return sb . toString ( ) ; }
Gets the health memory.

@return the health memory