public class ProcfsBasedProcessTree extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_SLEEPTIME_BEFORE_SIGKILL |
Constructor and Description |
---|
ProcfsBasedProcessTree(String pid) |
ProcfsBasedProcessTree(String pid,
String procfsDir) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the process-tree.
|
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.
|
static String |
getPidFromPidFile(String pidFileName)
Get PID from a pid-file.
|
ProcfsBasedProcessTree |
getProcessTree()
Get the process-tree with latest state.
|
boolean |
isAlive()
Is the process-tree alive? Currently we care only about the status of the
root-process.
|
static boolean |
isAvailable()
Checks if the ProcfsBasedProcessTree is available on this system.
|
void |
setSigKillInterval(long interval) |
String |
toString()
Returns a string printing PIDs of process present in the
ProcfsBasedProcessTree.
|
public static final long DEFAULT_SLEEPTIME_BEFORE_SIGKILL
public ProcfsBasedProcessTree(String pid)
public void setSigKillInterval(long interval)
public static boolean isAvailable()
public ProcfsBasedProcessTree getProcessTree()
public boolean isAlive()
public void destroy()
public long getCumulativeVmem()
public long getCumulativeVmem(int olderThanAge)
olderThanAge
- processes above this age are included in the
memory additionpublic static String getPidFromPidFile(String pidFileName)
pidFileName
- Name of the pid-file.Copyright © 2010 The Apache Software Foundation