Exemplo n.º 1
0
        public void LoadStats()
        {
            _uptimeCounter.NextValue();

            Logger.Instance.eventLog.WriteEntry("Loading CPU", EventLogEntryType.Information);
            CPU = new StatCPU();
            Logger.Instance.eventLog.WriteEntry("Loading Memory", EventLogEntryType.Information);
            MEMORY = new StatMemory();
            Logger.Instance.eventLog.WriteEntry("Loading Sensors", EventLogEntryType.Information);
            SENSORS = new StatSensors();
            Logger.Instance.eventLog.WriteEntry("Loading Network", EventLogEntryType.Information);
            NET = new StatNetwork();
            Logger.Instance.eventLog.WriteEntry("Loading Disks", EventLogEntryType.Information);
            DISKS = new StatDisks();
            Logger.Instance.eventLog.WriteEntry("Loading Activity", EventLogEntryType.Information);
            ACTIVTY = new StatDiskActivity();

            PopulateUptime();
            FirstUptime = CurrentUptime;

            _statUpdateTimer = new Timer(TimerTick, null, 0, 1000);
            Logger.Instance.eventLog.WriteEntry("Finished Loading Stat Collectors", EventLogEntryType.Information);
        }
Exemplo n.º 2
0
        public void LoadStats()
        {
            _uptimeCounter.NextValue();

            Logger.Instance.eventLog.WriteEntry("Loading CPU", EventLogEntryType.Information);
            CPU = new StatCPU();
            Logger.Instance.eventLog.WriteEntry("Loading Memory", EventLogEntryType.Information);
            MEMORY = new StatMemory();
            Logger.Instance.eventLog.WriteEntry("Loading Sensors", EventLogEntryType.Information);
            SENSORS = new StatSensors();
            Logger.Instance.eventLog.WriteEntry("Loading Network", EventLogEntryType.Information);
            NET = new StatNetwork();
            Logger.Instance.eventLog.WriteEntry("Loading Disks", EventLogEntryType.Information);
            DISKS = new StatDisks();
            Logger.Instance.eventLog.WriteEntry("Loading Activity", EventLogEntryType.Information);
            ACTIVTY = new StatDiskActivity();

            PopulateUptime();
            FirstUptime = CurrentUptime;

            _statUpdateTimer = new Timer(TimerTick, null, 0, 1000);
            Logger.Instance.eventLog.WriteEntry("Finished Loading Stat Collectors", EventLogEntryType.Information);
        }