Package org.rioproject.impl.system.measurable.cpu

Examples of org.rioproject.impl.system.measurable.cpu.ProcessCPUHandler


            }

            memory.start();

            cpu = new CPU(config, SystemWatchID.PROC_CPU, true);
            ProcessCPUHandler cpuMonitor = (ProcessCPUHandler)cpu.getMeasurableMonitor();
            cpuMonitor.setPID(pidToUse);
            OperatingSystemMXBean opSys =
                getPlatformMXBeanProxy(mbsc,
                                       ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME,
                                       OperatingSystemMXBean.class);
            cpuMonitor.setMXBean(opSys);
            RuntimeMXBean runtime =
                getPlatformMXBeanProxy(mbsc,
                                       ManagementFactory.RUNTIME_MXBEAN_NAME,
                                       RuntimeMXBean.class);
            cpuMonitor.setStartTime(runtime.getStartTime());
            cpu.start();

            context.getWatchRegistry().register(memory, cpu);
        }
    }
View Full Code Here

TOP

Related Classes of org.rioproject.impl.system.measurable.cpu.ProcessCPUHandler

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.