Example #1
0
 /// <summary>
 /// Gets the statistics of the machine, including CPU% and RAM
 /// </summary>
 public static Dictionary <string, string> GetServerStatistics()
 {
     return(new Dictionary <string, string>
     {
         { "CPU Usage", CpuUsage.NextValue().ToString("0.0") + "%" },
         { "Used RAM (MB)", TotalPhysicalMemoryUsed.ToString() },
         { "Total RAM (MB)", TotalPhysicalMemory.ToString() },
         { "Used Disk Space (MB)", DriveSpaceUsed.ToString() },
         { "Total Disk Space (MB)", DriveTotalSpace.ToString() }
     });
 }
Example #2
0
 /// <summary>
 /// Gets the statistics of the machine, including CPU% and RAM
 /// </summary>
 public static Dictionary <string, string> GetServerStatistics()
 {
     return(new Dictionary <string, string>
     {
         { "CPU Usage", Invariant($"{CpuUsage:0.0}%") },
         { "Used RAM (MB)", TotalPhysicalMemoryUsed.ToStringInvariant() },
         { "Total RAM (MB)", "" },
         { "Hostname", Environment.MachineName },
         { "LEAN Version", $"v{Globals.Version}" }
     });
 }
Example #3
0
 /// <summary>
 /// Gets the statistics of the machine, including CPU% and RAM
 /// </summary>
 public static Dictionary <string, string> GetServerStatistics()
 {
     return(new Dictionary <string, string>
     {
         { "CPU Usage", CpuUsage.ToString("0.0") + "%" },
         { "Used RAM (MB)", TotalPhysicalMemoryUsed.ToString() },
         { "Total RAM (MB)", "" },
         { "Used Disk Space (MB)", DriveSpaceUsed.ToString() },
         { "Total Disk Space (MB)", DriveTotalSpace.ToString() },
         { "Hostname", Environment.MachineName },
         { "LEAN Version", "v" + Globals.Version }
     });
 }