add ResourceLimit getters

This commit is contained in:
Doug MacEachern 2005-07-08 01:16:46 +00:00
parent 043e1c143f
commit 5b68d679a7
3 changed files with 16 additions and 0 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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
{