static void Main(string[] args) { var runtimeInfo = PlatformServices.Default.Application.RuntimeFramework; Console.WriteLine("Platform full name is {0}", runtimeInfo.FullName); Console.WriteLine("Identifier is {0}", runtimeInfo.Identifier); Console.WriteLine("Profile is {0}", runtimeInfo.Profile); Console.WriteLine("Version is {0}", runtimeInfo.Version); Console.WriteLine("GPU temp is " + MetricsHelper.GpuTemp()); Console.WriteLine("CPU temp is " + MetricsHelper.CpuTemp()); Console.WriteLine("Memory CPU/GPU is " + MetricsHelper.DedicatedMemoryCpu() + "/" + MetricsHelper.DedicatedMemoryGpu()); }
private void Callback(object state) { ClockedData data = new ClockedData(); try { data.CpuTemp = MetricsHelper.CpuTemp(); data.GpuTemp = MetricsHelper.GpuTemp(); } catch (Exception ex) { this.m_logger.LogError(ex, "Error creating clocked metrics"); } data.Date = DateTime.Now; this.m_hub.Clients.All.InvokeAsync("data", data); }
private void SetModelData(HomeIndexModel model) { model.CpuTemp = MetricsHelper.CpuTemp(); model.GpuTemp = MetricsHelper.GpuTemp(); }