Replace CPU frequency with C-state monitoring
All checks were successful
Build and Release / build-and-release (push) Successful in 1m20s

- Changed CpuData.frequency_mhz to CpuData.cstate (String)
- Implemented collect_cstate() to read CPU idle depth from sysfs
- Finds deepest C-state with most accumulated time (C0-C10)
- Updated dashboard to display C-state instead of frequency
- More accurate indicator of CPU activity vs power management

Bump version to v0.1.208

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-28 23:30:14 +01:00
parent 2189d34b16
commit c6817537a8
7 changed files with 46 additions and 42 deletions

View File

@@ -46,7 +46,7 @@ pub struct CpuData {
pub load_1min: f32,
pub load_5min: f32,
pub load_15min: f32,
pub frequency_mhz: f32,
pub cstate: String, // Deepest C-state in use (C1, C6, C10, etc.) - indicates CPU idle depth
pub temperature_celsius: Option<f32>,
pub load_status: Status,
pub temperature_status: Status,
@@ -204,7 +204,7 @@ impl AgentData {
load_1min: 0.0,
load_5min: 0.0,
load_15min: 0.0,
frequency_mhz: 0.0,
cstate: String::from("C0"),
temperature_celsius: None,
load_status: Status::Unknown,
temperature_status: Status::Unknown,