Search in sources :

Example 1 with SigarLoadAverage

use of org.hyperic.sigar.jmx.SigarLoadAverage in project ats-framework by Axway.

the class SigarWrapper method refresh.

/**
     * called on each poll
     *
     * @throws SigarException
     * @throws MonitorConfigurationException
     */
void refresh() throws SigarException, MonitorConfigurationException {
    try {
        this.swap = this.sigar.getSwap();
        this.memory = this.sigar.getMem();
        this.cpu = this.sigar.getCpu();
        this.cpuPerc = this.sigar.getCpuPerc();
        if (!OperatingSystemType.getCurrentOsType().equals(OperatingSystemType.AIX)) {
            this.netstat = this.sigar.getNetStat();
            this.tcp = this.sigar.getTcp();
        }
        this.loadAvrg = new SigarLoadAverage(this.sigar);
    } catch (Exception e) {
        final String errorMsg = "Error retrieving data from the Sigar monitoring system";
        log.error(errorMsg, e);
        throw new MonitorConfigurationException(errorMsg, e);
    }
}
Also used : MonitorConfigurationException(com.axway.ats.agent.components.monitoring.model.exceptions.MonitorConfigurationException) SigarLoadAverage(org.hyperic.sigar.jmx.SigarLoadAverage) SigarException(org.hyperic.sigar.SigarException) MonitorConfigurationException(com.axway.ats.agent.components.monitoring.model.exceptions.MonitorConfigurationException)

Aggregations

MonitorConfigurationException (com.axway.ats.agent.components.monitoring.model.exceptions.MonitorConfigurationException)1 SigarException (org.hyperic.sigar.SigarException)1 SigarLoadAverage (org.hyperic.sigar.jmx.SigarLoadAverage)1