Package org.rioproject.impl.system.measurable.memory

Examples of org.rioproject.impl.system.measurable.memory.MemInfoMonitor


* @author Dennis Reedy
*/
public class MemInfoMonitorTest {
    @Test
    public void testParsing() {
        MemInfoMonitor memInfoMonitor = new MemInfoMonitor();
        memInfoMonitor.setID("System Memory");
        memInfoMonitor.setThresholdValues(new ThresholdValues(0, 1.0));
        memInfoMonitor.setMemInfoFile("src/test/resources/meminfo");
        SystemMemoryUtilization memoryUtilization = memInfoMonitor.getMeasuredResource();
        Assert.assertNotNull(memoryUtilization);
        System.out.println("Free:   "+memoryUtilization.getFree()+" MB");
        System.out.println("Active: "+memoryUtilization.getUsed()+" MB");
        System.out.println("Total:  "+memoryUtilization.getTotal()+" MB");
        System.out.println("Used %: "+memoryUtilization.getUsedPercentage());
View Full Code Here

TOP

Related Classes of org.rioproject.impl.system.measurable.memory.MemInfoMonitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.