processMajorFaultUsage = pool
.submit(processMajorFaultUsageCollector);
totalFaults += processMajorFaultUsage.get().getMajorFaults();
ProcessCpuUsageCollector processCpuUsageCollector = new ProcessCpuUsageCollector(logger,
pid, processStatFile, 42, 0);
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;