From fef705577c4c2fe231d4491788a393ca90f41487 Mon Sep 17 00:00:00 2001 From: donpat1to Date: Sat, 2 Aug 2025 01:03:36 +0200 Subject: [PATCH] adding funny stuff --- WatcherAgent/src/main.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/WatcherAgent/src/main.rs b/WatcherAgent/src/main.rs index cb98d6d..ceaec77 100644 --- a/WatcherAgent/src/main.rs +++ b/WatcherAgent/src/main.rs @@ -6,7 +6,7 @@ use nvml_wrapper::Nvml; use reqwest::{Client, StatusCode}; use serde::{Deserialize, Serialize}; use std::{error::Error, fs, process::Command, time::Duration}; -use sysinfo::{Disks, System}; +use sysinfo::{Components, Disks, System}; use tokio::time::{interval, sleep, Instant}; // Windows specific imports @@ -590,6 +590,16 @@ fn get_disk_info() -> (f64, f64, f64) { count += 1; } } + let components = Components::new_with_refreshed_list(); + for component in &components { + if let Some(temperature) = component.temperature() { + println!( + "Component: {}, Temperature: {}°C", + component.label(), + temperature + ); + } + } // Berechnungen let size_b = if count > 0 {