예제 #1
0
 public static string DisplaySnapshotAsText()
 {
     try
     {
         var snapshot = Counters.MakeSnapshot(counters: null);
         return(FormatSnapshotAsText(snapshot));
     }
     catch (Exception e)
     {
         GenUtils.PriorityLogMsg("exception", "Counters.DisplaySnapshotAsText", e.Message + e.StackTrace);
         return(e.Message + e.StackTrace);
     }
 }
예제 #2
0
 public void ProcessMonitorThreadMethod()
 {
     while (true)
     {
         try
         {
             GenUtils.LogMsg("status", "ProcessMonitorThreadMethod", "snapshot");
             this.ReloadCounters();
             var snapshot = Counters.MakeSnapshot(counters);
             this.StoreSnapshot(snapshot);
             this.MaybeWritePriorityLog(snapshot);
             Thread.Sleep(TimeSpan.FromMinutes(this.interval_minutes));
         }
         catch (Exception e)
         {
             GenUtils.PriorityLogMsg("exception", "ProcessMonitorThreadMethod: snapshot", e.Message + e.StackTrace);
         }
     }
 }