public class ProcfsBasedProcessTree extends ProcessTree
ProcessTree.Signal
限定符和类型 | 字段和说明 |
---|---|
static long |
JIFFY_LENGTH_IN_MILLIS |
static long |
PAGE_SIZE |
isSetsidAvailable
构造器和说明 |
---|
ProcfsBasedProcessTree(String pid) |
ProcfsBasedProcessTree(String pid,
boolean setsidUsed) |
ProcfsBasedProcessTree(String pid,
String procfsDir) |
限定符和类型 | 方法和说明 |
---|---|
long |
getCumulativeCpuTime()
Get the CPU time in millisecond used by all the processes in the
process-tree since the process-tree created
|
long |
getCumulativeRssmem()
Get the cumulative resident set size (rss) memory used by all the processes
in the process-tree.
|
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()
Get the cumulative virtual memory used by all the processes in the
process-tree.
|
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.
|
ProcfsBasedProcessTree |
getProcessTree()
Get the process-tree with latest state.
|
String |
getProcessTreeDump()
Get a dump of the process-tree.
|
boolean |
isAlive()
Is the root-process alive?
|
boolean |
isAnyProcessInTreeAlive()
Is any of the subprocesses in the process-tree alive?
|
static boolean |
isAvailable()
Checks if the ProcfsBasedProcessTree is available on this system.
|
String |
toString()
Returns a string printing PIDs of process present in the
ProcfsBasedProcessTree.
|
isAlive, isProcessGroupAlive, killProcess, killProcessGroup
public static final long PAGE_SIZE
public static final long JIFFY_LENGTH_IN_MILLIS
public ProcfsBasedProcessTree(String pid)
public ProcfsBasedProcessTree(String pid, boolean setsidUsed)
public static boolean isAvailable()
public ProcfsBasedProcessTree getProcessTree()
public boolean isAlive()
public boolean isAnyProcessInTreeAlive()
public String getProcessTreeDump()
public long getCumulativeVmem()
public long getCumulativeRssmem()
public long getCumulativeVmem(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionpublic long getCumulativeRssmem(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionpublic long getCumulativeCpuTime()
Copyright © 2009 The Apache Software Foundation