|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.conf.Configured
org.apache.hadoop.yarn.util.ResourceCalculatorProcessTree
org.apache.hadoop.yarn.util.ProcfsBasedProcessTree
@InterfaceAudience.Private @InterfaceStability.Unstable public class ProcfsBasedProcessTree
A Proc file-system based ProcessTree. Works only on Linux.
| Field Summary | |
|---|---|
static long |
JIFFY_LENGTH_IN_MILLIS
|
static int |
KB_TO_BYTES
|
static long |
PAGE_SIZE
|
protected Map<String,org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessTreeSmapMemInfo> |
processSMAPTree
|
protected Map<String,org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessInfo> |
processTree
|
static String |
PROCFS_CMDLINE_FILE
|
static String |
PROCFS_STAT_FILE
|
static String |
SMAPS
|
| Constructor Summary | |
|---|---|
ProcfsBasedProcessTree(String pid)
|
|
ProcfsBasedProcessTree(String pid,
String procfsDir)
Build a new process tree rooted at the pid. |
|
| Method Summary | |
|---|---|
boolean |
checkPidPgrpidForMatch()
Verify that the given process id is same as its process group id. |
static boolean |
checkPidPgrpidForMatch(String _pid,
String procfs)
|
long |
getCumulativeCpuTime()
Get the CPU time in millisecond used by all the processes in the process-tree since the process-tree created |
long |
getCumulativeRssmem(int olderThanAge)
Get the cumulative resident set size (rss) memory used by all the processes in the process-tree that are older than the passed in age. |
long |
getCumulativeVmem(int olderThanAge)
Get the cumulative virtual memory used by all the processes in the process-tree that are older than the passed in age. |
List<String> |
getCurrentProcessIDs()
|
String |
getProcessTreeDump()
Get a dump of the process-tree. |
static boolean |
isAvailable()
Checks if the ProcfsBasedProcessTree is available on this system. |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
String |
toString()
Returns a string printing PIDs of process present in the ProcfsBasedProcessTree. |
void |
updateProcessTree()
Update process-tree with latest state. |
| Methods inherited from class org.apache.hadoop.yarn.util.ResourceCalculatorProcessTree |
|---|
getCumulativeRssmem, getCumulativeVmem, getResourceCalculatorProcessTree |
| Methods inherited from class org.apache.hadoop.conf.Configured |
|---|
getConf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROCFS_STAT_FILE
public static final String PROCFS_CMDLINE_FILE
public static final long PAGE_SIZE
public static final long JIFFY_LENGTH_IN_MILLIS
public static final String SMAPS
public static final int KB_TO_BYTES
protected Map<String,org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessTreeSmapMemInfo> processSMAPTree
protected Map<String,org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.ProcessInfo> processTree
| Constructor Detail |
|---|
public ProcfsBasedProcessTree(String pid)
public ProcfsBasedProcessTree(String pid,
String procfsDir)
pid - root of the process treeprocfsDir - the root of a proc file system - only used for testing.| Method Detail |
|---|
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.ConfigurablesetConf in class org.apache.hadoop.conf.Configuredpublic static boolean isAvailable()
public void updateProcessTree()
updateProcessTree in class ResourceCalculatorProcessTreepublic boolean checkPidPgrpidForMatch()
checkPidPgrpidForMatch in class ResourceCalculatorProcessTree
public static boolean checkPidPgrpidForMatch(String _pid,
String procfs)
public List<String> getCurrentProcessIDs()
public String getProcessTreeDump()
getProcessTreeDump in class ResourceCalculatorProcessTreepublic long getCumulativeVmem(int olderThanAge)
getCumulativeVmem in class ResourceCalculatorProcessTreeolderThanAge - processes above this age are included in the
memory addition
public long getCumulativeRssmem(int olderThanAge)
getCumulativeRssmem in class ResourceCalculatorProcessTreeolderThanAge - processes above this age are included in the
memory addition
public long getCumulativeCpuTime()
getCumulativeCpuTime in class ResourceCalculatorProcessTreepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||