mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-08-19 01:14:43 -05:00
feat: add readings for extra power sensors (#833)
* feat: add readings for extra power sensors * chore: add strix point snapshot * chore: drop buggy socket power measurement
This commit is contained in:
@@ -69,6 +69,10 @@ pub async fn stats(ctx: CliContext<'_>) -> Result<()> {
|
||||
println!("Power Usage: {power_usage:.1}/{power_cap} W");
|
||||
}
|
||||
|
||||
for (label, value) in &stats.power.sensors {
|
||||
println!("Power Sensor {label}: {value:.1} W");
|
||||
}
|
||||
|
||||
if !stats.temps.is_empty() {
|
||||
print!("Temperatures: ");
|
||||
for (i, (name, value)) in stats.temps.iter().enumerate() {
|
||||
|
||||
@@ -829,8 +829,10 @@ impl GpuController for AmdGpuController {
|
||||
.collect();
|
||||
}
|
||||
|
||||
let mut power_sensors = HashMap::new();
|
||||
|
||||
if let Some(metrics) = metrics {
|
||||
let extra_sensors = [
|
||||
let extra_temp_sensors = [
|
||||
("soc", metrics.get_temperature_soc().map(|temp| temp / 100)),
|
||||
("vrgfx", metrics.get_temperature_vrgfx()),
|
||||
("vrmem", metrics.get_temperature_vrmem()),
|
||||
@@ -841,7 +843,7 @@ impl GpuController for AmdGpuController {
|
||||
),
|
||||
];
|
||||
|
||||
for (label, value) in extra_sensors {
|
||||
for (label, value) in extra_temp_sensors {
|
||||
if let Some(value) = value {
|
||||
if value != 0 {
|
||||
temps.insert(
|
||||
@@ -858,6 +860,29 @@ impl GpuController for AmdGpuController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let extra_power_sensors = [
|
||||
("apu", metrics.get_average_apu_power()),
|
||||
("core", metrics.get_average_all_core_power()),
|
||||
("gfx", metrics.get_average_gfx_power_u32()),
|
||||
]
|
||||
.into_iter()
|
||||
.filter(|(_, value)| value.is_some_and(|value| value != 0 && value != u32::MAX))
|
||||
.chain(
|
||||
[
|
||||
("soc", metrics.get_average_soc_power()),
|
||||
("cpu", metrics.get_average_cpu_power()),
|
||||
]
|
||||
.into_iter()
|
||||
.filter(|(_, value)| value.is_some_and(|value| value != 0 && value != u16::MAX))
|
||||
.map(|(label, value)| (label, value.map(u32::from))),
|
||||
);
|
||||
|
||||
for (label, value) in extra_power_sensors {
|
||||
if let Some(value) = value {
|
||||
power_sensors.insert(label.to_owned(), f64::from(value) / 1000.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mut voltages = HashMap::new();
|
||||
@@ -944,6 +969,7 @@ impl GpuController for AmdGpuController {
|
||||
cap_max: self.hw_mon_and_then(HwMon::get_power_cap_max),
|
||||
cap_min: self.hw_mon_and_then(HwMon::get_power_cap_min),
|
||||
cap_default: self.hw_mon_and_then(HwMon::get_power_cap_default),
|
||||
sensors: power_sensors,
|
||||
},
|
||||
temps,
|
||||
busy_percent: self.handle.get_busy_percent().ok(),
|
||||
|
||||
@@ -693,6 +693,7 @@ impl GpuController for IntelGpuController {
|
||||
cap_min: Some(0.0),
|
||||
cap_max: self.get_power_cap_max(),
|
||||
cap_default: self.initial_power_cap,
|
||||
sensors: HashMap::new(),
|
||||
};
|
||||
|
||||
let voltage = VoltageStats {
|
||||
|
||||
@@ -619,6 +619,7 @@ impl GpuController for NvidiaGpuController {
|
||||
.power_management_limit_default()
|
||||
.map(|mw| f64::from(mw) / 1000.0)
|
||||
.ok(),
|
||||
sensors: HashMap::new(),
|
||||
},
|
||||
busy_percent: device
|
||||
.utilization_rates()
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
226:1
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0x038000
|
||||
@@ -0,0 +1 @@
|
||||
queue full
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
44
|
||||
@@ -0,0 +1 @@
|
||||
16.0 GT/s PCIe
|
||||
@@ -0,0 +1 @@
|
||||
16
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
0x150e
|
||||
@@ -0,0 +1 @@
|
||||
44
|
||||
@@ -0,0 +1 @@
|
||||
(null)
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0x21000104
|
||||
@@ -0,0 +1 @@
|
||||
0x09003500
|
||||
@@ -0,0 +1 @@
|
||||
0x0b332000
|
||||
@@ -0,0 +1 @@
|
||||
0x00000020
|
||||
@@ -0,0 +1 @@
|
||||
0x00000020
|
||||
@@ -0,0 +1 @@
|
||||
0x00000083
|
||||
@@ -0,0 +1 @@
|
||||
0x0000006f
|
||||
@@ -0,0 +1 @@
|
||||
0x0000002e
|
||||
@@ -0,0 +1 @@
|
||||
0x11510546
|
||||
@@ -0,0 +1 @@
|
||||
0x0000000e
|
||||
@@ -0,0 +1 @@
|
||||
0x0b5d0400
|
||||
@@ -0,0 +1 @@
|
||||
0x0911801b
|
||||
@@ -0,0 +1 @@
|
||||
queue full
|
||||
@@ -0,0 +1 @@
|
||||
3
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
848000000
|
||||
@@ -0,0 +1 @@
|
||||
sclk
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
vddgfx
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
vddnb
|
||||
@@ -0,0 +1 @@
|
||||
amdgpu
|
||||
@@ -0,0 +1 @@
|
||||
auto
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
unsupported
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
9087000
|
||||
@@ -0,0 +1 @@
|
||||
9087000
|
||||
@@ -0,0 +1 @@
|
||||
PPT
|
||||
@@ -0,0 +1 @@
|
||||
38000
|
||||
@@ -0,0 +1 @@
|
||||
edge
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
0x00016000
|
||||
0x00DC0000
|
||||
0x00E00000
|
||||
0x00E40000
|
||||
0x0243FC00
|
||||
0x3C3FC000
|
||||
@@ -0,0 +1 @@
|
||||
0x0
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1 @@
|
||||
14
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
6
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
0x00000000
|
||||
0x00000014
|
||||
0x00000D20
|
||||
0x00010400
|
||||
0x0241B000
|
||||
0x04040000
|
||||
0x3C1B0000
|
||||
+1
@@ -0,0 +1 @@
|
||||
0x0
|
||||
@@ -0,0 +1 @@
|
||||
108
|
||||
@@ -0,0 +1 @@
|
||||
7
|
||||
@@ -0,0 +1 @@
|
||||
11
|
||||
+1
@@ -0,0 +1 @@
|
||||
7
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
0x00001260
|
||||
0x0000A000
|
||||
0x02402C00
|
||||
0x3C02C000
|
||||
@@ -0,0 +1 @@
|
||||
0x0
|
||||
@@ -0,0 +1 @@
|
||||
11
|
||||
@@ -0,0 +1 @@
|
||||
11
|
||||
@@ -0,0 +1 @@
|
||||
5
|
||||
+1
@@ -0,0 +1 @@
|
||||
4
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
0x00007800
|
||||
0x00007E00
|
||||
0x3C030000
|
||||
@@ -0,0 +1 @@
|
||||
0x0
|
||||
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1 @@
|
||||
4
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
3
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
5
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
0x00480000
|
||||
0x02403800
|
||||
0x3C038000
|
||||
@@ -0,0 +1 @@
|
||||
0x0
|
||||
@@ -0,0 +1 @@
|
||||
14
|
||||
@@ -0,0 +1 @@
|
||||
7
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
3
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
0x00014000
|
||||
0x00054000
|
||||
0x02425800
|
||||
0x02425C00
|
||||
0x3C258000
|
||||
0x3C25C000
|
||||
+1
@@ -0,0 +1 @@
|
||||
0x0
|
||||
@@ -0,0 +1 @@
|
||||
150
|
||||
@@ -0,0 +1 @@
|
||||
11
|
||||
@@ -0,0 +1 @@
|
||||
6
|
||||
+1
@@ -0,0 +1 @@
|
||||
6
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
+1
@@ -0,0 +1 @@
|
||||
0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user