Examples of EventLogRecord


Examples of com.sun.jna.platform.win32.WinNT.EVENTLOGRECORD

        int dwRead = pnBytesRead.getValue();
        Pointer pevlr = buffer;
        int maxRecords = 3;
        while (dwRead > 0 && maxRecords-- > 0)
            {
          EVENTLOGRECORD record = new EVENTLOGRECORD(pevlr);
          /*
          System.out.println(record.RecordNumber.intValue()
              + " Event ID: " + record.EventID.intValue()
              + " Event Type: " + record.EventType.intValue()
              + " Event Source: " + pevlr.getString(record.size(), true));
View Full Code Here

Examples of org.hyperic.sigar.win32.EventLogRecord

                    int newest = eventLogs[i].getNewestRecord();
                    if (newest > lastCollectedEventId[i]) {
                        for (int eventId = lastCollectedEventId[i] + 1; eventId <= newest; eventId++) {
                            eventsChecked++;

                            EventLogRecord event = eventLogs[i].read(eventId);
                            Event convertedEvent = handleEvent(event);

                            if (null != convertedEvent) {
                                if (null == convertedEvents) {
                                    convertedEvents = new HashSet<Event>();
View Full Code Here

Examples of org.hyperic.sigar.win32.EventLogRecord

        }
        int last = log.getNewestRecord()+1;
        int first = last - max;

        for (int i=first; i<last; i++) {
            EventLogRecord record = log.read(i);
            System.out.println(record);
        }
        log.close();
    }
View Full Code Here

Examples of org.hyperic.sigar.win32.EventLogRecord

        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);
        if (log.getNumberOfRecords() == 0) {
            log.close();
View Full Code Here

Examples of org.hyperic.sigar.win32.EventLogRecord

        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);
        if (log.getNumberOfRecords() == 0) {
            log.close();
View Full Code Here

Examples of org.hyperic.sigar.win32.EventLogRecord

        }
        int last = log.getNewestRecord()+1;
        int first = last - max;

        for (int i=first; i<last; i++) {
            EventLogRecord record = log.read(i);
            System.out.println(record);
        }
        log.close();
    }
View Full Code Here

Examples of org.hyperic.sigar.win32.EventLogRecord

        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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.