Ejemplo n.º 1
0
        void tmrZifli_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            Logger.WriteEvent("Tick", ZifliService._INFO);

            DateTime dt        = DateTime.Now;
            Misc     dtConvert = new Misc();

            this.lUnixTS = dtConvert.getUnixTimeStamp(dt);
            dt           = dt.AddSeconds(intPollInterval);
            Poller oPoller = new Poller();
            Result aResult = oPoller.queryProviderByName("Win32_PerfFormattedData_PerfOS_Processor",
                                                         "_Total", "PercentProcessorTime");
            Misc oUploader = new Misc();

            try
            {
                oUploader.uploadResults(this.strMACAddress,
                                        this.strDSName, aResult, this.strMachineName, this.lUnixTS,
                                        this.strEmailAddress, this.strPassword);
                Logger.WriteEvent("Uploaded results successfully.",
                                  ZifliService._DEBUG);
            }
            catch
            {
                Logger.WriteEvent("Failed to upload results.", ZifliService._WARN);
            }
        }
Ejemplo n.º 2
0
 public void initiatePoll()
 {
     Poller aPoller = new Poller();
     Result aResult = aPoller.queryProviderByName("Win32_PerfFormattedData_PerfOS_Processor",
                                                  "_Total", "PercentProcessorTime");
 }
Ejemplo n.º 3
0
 public void initiatePoll()
 {
     Poller aPoller = new Poller();
     Result aResult = aPoller.queryProviderByName("Win32_PerfFormattedData_PerfOS_Processor",
         "_Total", "PercentProcessorTime");
 }
Ejemplo n.º 4
0
        void tmrZifli_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            Logger.WriteEvent("Tick", ZifliService._INFO);

            DateTime dt = DateTime.Now;
            Misc dtConvert = new Misc();
            this.lUnixTS = dtConvert.getUnixTimeStamp(dt);
            dt = dt.AddSeconds(intPollInterval);
            Poller oPoller = new Poller();
            Result aResult = oPoller.queryProviderByName("Win32_PerfFormattedData_PerfOS_Processor",
                "_Total", "PercentProcessorTime");
            Misc oUploader = new Misc();
            try
            {
                oUploader.uploadResults(this.strMACAddress,
                    this.strDSName, aResult, this.strMachineName, this.lUnixTS,
                    this.strEmailAddress, this.strPassword);
                Logger.WriteEvent("Uploaded results successfully.",
                    ZifliService._DEBUG);
            }
            catch
            {
                Logger.WriteEvent("Failed to upload results.", ZifliService._WARN);
            }
        }