ProcfsBasedProcessTree extends ResourceCalculatorProcessTree { @Override public boolean checkPidPgrpidForMatch() { return checkPidPgrpidForMatch(pid, PROCFS); } ProcfsBasedProcessTree(String pid);  ProcfsBasedProcessTree(String pid, String procfsDir);  ProcfsBasedProcessTree(String pid, String procfsDir, Clock clock); @Override void setConf(Configuration conf); static boolean isAvailable(); @Override void updateProcessTree(); @Override boolean checkPidPgrpidForMatch(); static boolean checkPidPgrpidForMatch(String _pid, String procfs); List<String> getCurrentProcessIDs(); @Override String getProcessTreeDump(); @Override long getVirtualMemorySize(int olderThanAge); @Override @SuppressWarnings("deprecation") long getCumulativeVmem(int olderThanAge); @Override long getRssMemorySize(int olderThanAge); @Override @SuppressWarnings("deprecation") long getCumulativeRssmem(int olderThanAge); @Override long getCumulativeCpuTime(); @Override float getCpuUsagePercent(); @Override String toString(); static void main(String[] args); static final String PROCFS_STAT_FILE; static final String PROCFS_CMDLINE_FILE; static final long PAGE_SIZE; static final long JIFFY_LENGTH_IN_MILLIS; static final String SMAPS; static final int KB_TO_BYTES; }
@Test(timeout = 30000) public void testDestroyProcessTree() throws IOException { String pid = "100"; File procfsRootDir = new File(TEST_ROOT_DIR, "proc"); try { setupProcfsRootDir(procfsRootDir); createProcessTree(pid, procfsRootDir.getAbsolutePath(), new SystemClock()); Assert.assertTrue(ProcfsBasedProcessTree.checkPidPgrpidForMatch(pid, procfsRootDir.getAbsolutePath())); } finally { FileUtil.fullyDelete(procfsRootDir); } }