add ResourceLimit getters
This commit is contained in:
parent
043e1c143f
commit
5b68d679a7
|
@ -247,6 +247,14 @@ public class Sigar implements SigarProxy {
|
||||||
return perc;
|
return perc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get system resource limits.
|
||||||
|
* @exception SigarException on failure.
|
||||||
|
*/
|
||||||
|
public ResourceLimit getResourceLimit() throws SigarException {
|
||||||
|
return ResourceLimit.fetch(this);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get system uptime info.
|
* Get system uptime info.
|
||||||
* @exception SigarException on failure.
|
* @exception SigarException on failure.
|
||||||
|
|
|
@ -25,6 +25,8 @@ public interface SigarProxy {
|
||||||
|
|
||||||
public Uptime getUptime() throws SigarException;
|
public Uptime getUptime() throws SigarException;
|
||||||
|
|
||||||
|
public ResourceLimit getResourceLimit() throws SigarException;
|
||||||
|
|
||||||
public double[] getLoadAverage() throws SigarException;
|
public double[] getLoadAverage() throws SigarException;
|
||||||
|
|
||||||
public long[] getProcList() throws SigarException;
|
public long[] getProcList() throws SigarException;
|
||||||
|
|
|
@ -59,6 +59,12 @@ public class SynchronizedSigar implements SigarProxy {
|
||||||
return this.sigar.getUptime();
|
return this.sigar.getUptime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized ResourceLimit getResourceLimit()
|
||||||
|
throws SigarException
|
||||||
|
{
|
||||||
|
return this.sigar.getResourceLimit();
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized double[] getLoadAverage()
|
public synchronized double[] getLoadAverage()
|
||||||
throws SigarException
|
throws SigarException
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue