System.out.println(sigar.getSwap());
public Swap getSwapInfo() { try { // Removed this check since http://jira.hyperic.com/browse/SIGAR-112 is fixed. /* int enabledCpuCount = sigar.getCpuPercList().length; int totalCpuCount = sigar.getCpuInfoList().length; if (enabledCpuCount < totalCpuCount) { log.info("Aborting swap info collection because one or more CPUs is disabled - " + enabledCpuCount + " out of " + totalCpuCount + " CPUs are enabled."); return null; } */ return sigar.getSwap(); } catch (Exception e) { throw new UnsupportedOperationException("Cannot get swap info from native layer", e); } }
public Swap getSwapInfo() { try { // Removed this check since http://jira.hyperic.com/browse/SIGAR-112 is fixed. /* int enabledCpuCount = sigar.getCpuPercList().length; int totalCpuCount = sigar.getCpuInfoList().length; if (enabledCpuCount < totalCpuCount) { log.info("Aborting swap info collection because one or more CPUs is disabled - " + enabledCpuCount + " out of " + totalCpuCount + " CPUs are enabled."); return null; } */ return sigar.getSwap(); } catch (Exception e) { throw new UnsupportedOperationException("Cannot get swap info from native layer", e); } }
float memrate = (float) m.getUsedPercent(); Swap sw = sigar.getSwap(); long pagein = sw.getPageIn(); long pageout = sw.getPageOut();
public void populate(SigarProxy sigar, String filter) throws SigarException { _uptime = UptimeData.gather(sigar); _procStat = sigar.getProcStat(); _cpu = sigar.getCpuPerc(); _mem = sigar.getMem(); _swap = sigar.getSwap(); ps(sigar, filter); }
public void getValue(StringBuffer res) throws SigarException { Swap mem = sigarProxy.getSwap(); double val; double cur;
public void getValue(StringBuffer res) throws SigarException { Swap mem = sigarProxy.getSwap(); double val; double cur;
/** * {@inheritDoc} */ @Override public void sample(final IMonitoringController monitoringCtr) throws SigarException { if (!monitoringCtr.isMonitoringEnabled()) { return; } if (!monitoringCtr.isProbeActivated(SignatureFactory.createMemSwapSignature())) { return; } final Mem mem = this.sigar.getMem(); final Swap swap = this.sigar.getSwap(); final MemSwapUsageRecord r = new MemSwapUsageRecord( monitoringCtr.getTimeSource().getTime(), monitoringCtr.getHostname(), mem.getTotal(), mem.getActualUsed(), mem.getActualFree(), swap.getTotal(), swap.getUsed(), swap.getFree()); monitoringCtr.newMonitoringRecord(r); } }
/** * {@inheritDoc} */ @Override public void sample(final IMonitoringController monitoringCtr) throws SigarException { if (!monitoringCtr.isMonitoringEnabled()) { return; } if (!monitoringCtr.isProbeActivated(SignatureFactory.createMemSwapSignature())) { return; } final Mem mem = this.sigar.getMem(); final Swap swap = this.sigar.getSwap(); final MemSwapUsageRecord r = new MemSwapUsageRecord( monitoringCtr.getTimeSource().getTime(), monitoringCtr.getHostname(), mem.getTotal(), mem.getActualUsed(), mem.getActualFree(), swap.getTotal(), swap.getUsed(), swap.getFree()); monitoringCtr.newMonitoringRecord(r); } }
final Swap swap = instance.getSwap();