|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.conf.Configured org.apache.hadoop.util.ResourceCalculatorPlugin org.apache.hadoop.util.LinuxResourceCalculatorPlugin
public class LinuxResourceCalculatorPlugin
Plugin to calculate resource information on Linux systems.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.util.ResourceCalculatorPlugin |
---|
ResourceCalculatorPlugin.ProcResourceValues |
Constructor Summary | |
---|---|
LinuxResourceCalculatorPlugin()
|
|
LinuxResourceCalculatorPlugin(String procfsMemFile,
String procfsCpuFile,
String procfsStatFile,
long jiffyLengthInMillis)
Constructor which allows assigning the /proc/ directories. |
Method Summary | |
---|---|
long |
getAvailablePhysicalMemorySize()
Obtain the total size of the available physical memory present in the system. |
long |
getAvailableVirtualMemorySize()
Obtain the total size of the available virtual memory present in the system. |
long |
getCpuFrequency()
Obtain the CPU frequency of on the system. |
float |
getCpuUsage()
Obtain the CPU usage % of the machine. |
long |
getCumulativeCpuTime()
Obtain the cumulative CPU time since the system is on. |
int |
getNumProcessors()
Obtain the total number of processors present on the system. |
long |
getPhysicalMemorySize()
Obtain the total size of the physical memory present in the system. |
ResourceCalculatorPlugin.ProcResourceValues |
getProcResourceValues()
Obtain resource status used by current process tree. |
long |
getVirtualMemorySize()
Obtain the total size of the virtual memory present in the system. |
static void |
main(String[] args)
Test the LinuxResourceCalculatorPlugin |
Methods inherited from class org.apache.hadoop.util.ResourceCalculatorPlugin |
---|
getResourceCalculatorPlugin |
Methods inherited from class org.apache.hadoop.conf.Configured |
---|
getConf, setConf |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinuxResourceCalculatorPlugin()
public LinuxResourceCalculatorPlugin(String procfsMemFile, String procfsCpuFile, String procfsStatFile, long jiffyLengthInMillis)
procfsMemFile
- fake file for /proc/meminfoprocfsCpuFile
- fake file for /proc/cpuinfoprocfsStatFile
- fake file for /proc/statjiffyLengthInMillis
- fake jiffy length valueMethod Detail |
---|
public long getPhysicalMemorySize()
getPhysicalMemorySize
in class ResourceCalculatorPlugin
public long getVirtualMemorySize()
getVirtualMemorySize
in class ResourceCalculatorPlugin
public long getAvailablePhysicalMemorySize()
getAvailablePhysicalMemorySize
in class ResourceCalculatorPlugin
public long getAvailableVirtualMemorySize()
getAvailableVirtualMemorySize
in class ResourceCalculatorPlugin
public int getNumProcessors()
getNumProcessors
in class ResourceCalculatorPlugin
public long getCpuFrequency()
getCpuFrequency
in class ResourceCalculatorPlugin
public long getCumulativeCpuTime()
getCumulativeCpuTime
in class ResourceCalculatorPlugin
public float getCpuUsage()
getCpuUsage
in class ResourceCalculatorPlugin
public static void main(String[] args)
LinuxResourceCalculatorPlugin
args
- public ResourceCalculatorPlugin.ProcResourceValues getProcResourceValues()
ResourceCalculatorPlugin
getProcResourceValues
in class ResourceCalculatorPlugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |