Package org.apache.uima.ducc.agent.metrics.collectors

Examples of org.apache.uima.ducc.agent.metrics.collectors.ProcessResidentMemoryCollector


                processCpuUsage = pool.submit(processCpuUsageCollector);
                totalCpuUsage += (processCpuUsage.get().getTotalJiffies()/ agent.cpuClockRate);
               
                RandomAccessFile rStatmFile =
                        new RandomAccessFile("/proc/" + pid + "/statm", "r");
                ProcessResidentMemoryCollector collector = new ProcessResidentMemoryCollector(rStatmFile, 2,
                        0);
                Future<ProcessResidentMemory> prm = pool.submit(collector);
              
                totalRss += prm.get().get();
               
                rStatmFile.close();
            }
          } else {
             DuccProcessSwapSpaceUsage processSwapSpaceUsage = new DuccProcessSwapSpaceUsage(
             process.getPID(), managedProcess.getOwner(), DUCC_HOME
                   + "/admin/ducc_get_process_swap_usage.sh", logger);
             totalSwapUsage = processSwapSpaceUsage.getSwapUsage();

             ProcessMajorFaultCollector processMajorFaultUsageCollector =
                 new ProcessMajorFaultCollector(logger, process.getPID());

             processMajorFaultUsage = pool
                     .submit(processMajorFaultUsageCollector);
             totalFaults = processMajorFaultUsage.get().getMajorFaults();
            
             ProcessCpuUsageCollector processCpuUsageCollector = new ProcessCpuUsageCollector(logger,
                     process.getPID(), processStatFile, 42, 0);

             processCpuUsage = pool.submit(processCpuUsageCollector);
             totalCpuUsage = processCpuUsage.get().getTotalJiffies()/ agent.cpuClockRate;
            
             ProcessResidentMemoryCollector collector = new ProcessResidentMemoryCollector(statmFile, 2,
                     0);
             Future<ProcessResidentMemory> prm = pool.submit(collector);
            
             totalRss = prm.get().get();
          }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.agent.metrics.collectors.ProcessResidentMemoryCollector

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.