public class LinuxResourceCalculatorPlugin extends ResourceCalculatorPlugin
ResourceCalculatorPlugin.ProcResourceValues| 构造器和说明 |
|---|
LinuxResourceCalculatorPlugin() |
LinuxResourceCalculatorPlugin(String procfsMemFile,
String procfsCpuFile,
String procfsStatFile,
long jiffyLengthInMillis)
Constructor which allows assigning the /proc/ directories.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
getResourceCalculatorPlugingetConf, setConfpublic 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 valuepublic long getPhysicalMemorySize()
getPhysicalMemorySize 在类中 ResourceCalculatorPluginpublic long getVirtualMemorySize()
getVirtualMemorySize 在类中 ResourceCalculatorPluginpublic long getAvailablePhysicalMemorySize()
getAvailablePhysicalMemorySize 在类中 ResourceCalculatorPluginpublic long getAvailableVirtualMemorySize()
getAvailableVirtualMemorySize 在类中 ResourceCalculatorPluginpublic int getNumProcessors()
getNumProcessors 在类中 ResourceCalculatorPluginpublic long getCpuFrequency()
getCpuFrequency 在类中 ResourceCalculatorPluginpublic long getCumulativeCpuTime()
getCumulativeCpuTime 在类中 ResourceCalculatorPluginpublic float getCpuUsage()
getCpuUsage 在类中 ResourceCalculatorPluginpublic static void main(String[] args)
LinuxResourceCalculatorPluginargs - public ResourceCalculatorPlugin.ProcResourceValues getProcResourceValues()
ResourceCalculatorPluginCopyright © 2009 The Apache Software Foundation