|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.system.measurable.SigarHelper
public class SigarHelper
This class is used to help in loading and using Hyperic SIGAR.
Note:Hyperic SIGAR is licensed under the GPL with a FLOSS license exception, allowing it to be included with the Rio Apache License v2 distribution. If for some reason the GPL cannot be used with your distribution of Rio, remove the RIO_HOME/lib/hyperic directory.
This class does not explicitly include and Hyperic SIGAR classes, it uses reflection to access and use SIGAR. In this way if there is an issue including SIGAR, the distribution has no hard-coded dependencies for the technology.
| Field Summary | |
|---|---|
static String |
COMPONENT
|
| Method Summary | |
|---|---|
long |
getFileSystemFree(String fileSystem)
Get the amount of available K-bytes for the file system |
long |
getFileSystemTotal(String fileSystem)
Get the number of total K-bytes for the file system |
long |
getFileSystemUsed(String fileSystem)
Get the amount of used K-bytes for the file system |
double |
getFileSystemUsedPercent(String fileSystem)
Get the percentage of disk used |
long |
getFreeSystemMemory()
Get the amount of free system memory |
double |
getFreeSystemMemoryPercent()
Get the percent of free system memory |
static SigarHelper |
getInstance()
Get an instance of the SigarHelper. |
double[] |
getLoadAverage()
Get the load average for the machine |
long |
getPid()
Get the pid for the current process |
double |
getProcessCpuPercentage(long pid)
Get the CPU utilization (percentage) for a process |
long |
getProcessCpuSys(long pid)
Get the CPU system (kernel) usage for a process |
long |
getProcessCpuUser(long pid)
Get the CPU user usage for a process |
long |
getProcessResidentMemory(long pid)
Get the amount of real memory the process has available to it |
long |
getProcessSharedMemory(long pid)
Get the amount of shared memory the process has available to it |
long |
getProcessVirtualMemorySize(long pid)
Get the amount of virtual memory the process has available to it |
long |
getRam()
Get the amount of system RAM. |
double |
getSystemCpuPercentage()
Get the cpu kernel usage |
long |
getTotalSystemMemory()
Get the amount of system memory |
long |
getUsedSystemMemory()
Get the amount of used system memory |
double |
getUsedSystemMemoryPercent()
Get the percent of used system memory |
double |
getUserCpuPercentage()
Get the cpu user usage |
long |
matchChild(int ppid,
String[] sPids)
Using the process identifier (pid) of a parent, find the matching child process using a bottom up approach |
static boolean |
sigarAvailable()
Check if SIGAR is available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String COMPONENT
| Method Detail |
|---|
public static SigarHelper getInstance()
public static boolean sigarAvailable()
public long getPid()
public long matchChild(int ppid,
String[] sPids)
ppid - The parent pidsPids - Array of child pids
public double getSystemCpuPercentage()
public double getUserCpuPercentage()
public double[] getLoadAverage()
public double getProcessCpuPercentage(long pid)
pid - The process id (pid) to obtain the CPU utilization
(percentage) for
public long getProcessCpuUser(long pid)
pid - The process id (pid) to obtain the CPU user usage
public long getProcessCpuSys(long pid)
pid - The process id (pid) to obtain the CPU system (kernel) usage
public long getProcessVirtualMemorySize(long pid)
pid - The process id (pid)
public long getProcessResidentMemory(long pid)
pid - The process id (pid)
public long getProcessSharedMemory(long pid)
pid - The process id (pid)
public long getFileSystemFree(String fileSystem)
fileSystem - The fileSystem name
public long getFileSystemUsed(String fileSystem)
fileSystem - The fileSystem name
public long getFileSystemTotal(String fileSystem)
fileSystem - The fileSystem name
public double getFileSystemUsedPercent(String fileSystem)
fileSystem - The fileSystem name
public long getRam()
public long getTotalSystemMemory()
public double getFreeSystemMemoryPercent()
public long getFreeSystemMemory()
public double getUsedSystemMemoryPercent()
public long getUsedSystemMemory()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||