@Override
public void init(Services services) throws ServiceException {
final Instrumentation instr = new Instrumentation();
int interval = ConfigurationService.getInt(services.getConf(), CONF_LOGGING_INTERVAL);
initLogging(services, instr, interval);
instr.addVariable(JVM_INSTRUMENTATION_GROUP, "free.memory", new Instrumentation.Variable<Long>() {
@Override
public Long getValue() {
return Runtime.getRuntime().freeMemory();
}
});