@InterfaceAudience.Private public class WindowsBasedProcessTree extends ResourceCalculatorProcessTree
UNAVAILABLE
Constructor and Description |
---|
WindowsBasedProcessTree(String pid)
Create a monitor for a Windows process tree.
|
WindowsBasedProcessTree(String pid,
Clock pClock)
Create a monitor for a Windows process tree.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkPidPgrpidForMatch()
Verify that the tree process id is same as its process group id.
|
float |
getCpuUsagePercent()
Get the CPU usage by all the processes in the process-tree in Windows.
|
long |
getCumulativeCpuTime()
Get the CPU time in millisecond used by all the processes in the
process-tree since the process-tree was created
|
String |
getProcessTreeDump()
Get a dump of the process-tree.
|
long |
getRssMemorySize(int olderThanAge)
Get the resident set size (rss) memory used by all the processes
in the process-tree that are older than the passed in age.
|
long |
getVirtualMemorySize(int olderThanAge)
Get the virtual memory used by all the processes in the
process-tree that are older than the passed in age.
|
static boolean |
isAvailable() |
void |
updateProcessTree()
Update the process-tree with latest state.
|
getResourceCalculatorProcessTree, getRssMemorySize, getVirtualMemorySize
public WindowsBasedProcessTree(String pid)
pid
- Identifier of the job object.public static boolean isAvailable()
public void updateProcessTree()
ResourceCalculatorProcessTree
updateProcessTree
in class ResourceCalculatorProcessTree
public boolean checkPidPgrpidForMatch()
ResourceCalculatorProcessTree
checkPidPgrpidForMatch
in class ResourceCalculatorProcessTree
public String getProcessTreeDump()
ResourceCalculatorProcessTree
getProcessTreeDump
in class ResourceCalculatorProcessTree
public long getVirtualMemorySize(int olderThanAge)
ResourceCalculatorProcessTree
getVirtualMemorySize
in class ResourceCalculatorProcessTree
olderThanAge
- processes above this age are included in the
memory additionResourceCalculatorProcessTree.UNAVAILABLE
if it
cannot be calculated.public long getRssMemorySize(int olderThanAge)
ResourceCalculatorProcessTree
getRssMemorySize
in class ResourceCalculatorProcessTree
olderThanAge
- processes above this age are included in the
memory additionResourceCalculatorProcessTree.UNAVAILABLE
if it cannot be
calculated.public long getCumulativeCpuTime()
ResourceCalculatorProcessTree
getCumulativeCpuTime
in class ResourceCalculatorProcessTree
ResourceCalculatorProcessTree.UNAVAILABLE
if it cannot be calculated.public float getCpuUsagePercent()
getCpuUsagePercent
in class ResourceCalculatorProcessTree
ResourceCalculatorProcessTree.UNAVAILABLE
if CPU usage cannot be calculated or not available.Copyright © 2008–2018 Apache Software Foundation. All rights reserved.