int fail = 0, success = 0, max = 500;
String testMax = System.getProperty("sigar.testeventlog.max");
if (testMax != null) {
max = Integer.parseInt(testMax);
}
EventLogRecord record;
EventLog log = new EventLog();
log.open(logname);
int oldestRecord = log.getOldestRecord();
int numRecords = log.getNumberOfRecords();