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