feat: surface GPU memory in host state (#1235)

- Add State_GPU message to the proto with utilization and memory fields
- Add HostState.GPUs with conversion in both PB() and PB2State()
- Keep the existing gpu field populated so older agents keep working

Regenerated with protoc-gen-go v1.34.2 / protoc v5.29.3 to match the
existing files; nezha_grpc.pb.go is untouched since the service is
unchanged.

Closes #1217
This commit is contained in:
Ryrenz authored and GitHub committed 2026-09-12 18:56:35 +08:00
1 parent eb48a178f8
commit f366677744
3 files changed
+256 -119

No files matched your search

+10
View File
@@ -44,6 +44,16 @@ message State {
uint64 process_count = 15;
repeated State_SensorTemperature temperatures = 16;
repeated double gpu = 17;
repeated State_GPU gpus = 18;
}
// State_GPU carries per-card figures. Index-aligned with Host.gpu, matching
// the existing `gpu` field it supersedes; that field stays populated so older
// dashboards keep working.
message State_GPU {
double utilization = 1;
uint64 memory_used = 2;
uint64 memory_total = 3;
}
message State_SensorTemperature {