feat: enrich chassis info with DMI data, thermal zones, and GPU power#148
Merged
Conversation
- Read DMI fields (product name, vendor, board, version, BIOS) from /sys/class/dmi/id/ on Linux (no sudo required) - Read ACPI thermal zones for inlet/outlet board temperatures - Wire up chassis reader in API server data collection loop - Aggregate GPU power into chassis total_power_watts - Add all_smi_chassis_info Prometheus metric with DMI labels - Add inject_gpu_power helper for both TUI and API paths Closes #147
Member
Author
Implementation Review SummaryIntent
Findings AddressedNo findings requiring code changes were identified. The implementation is clean, correct, and well-integrated. Remaining ItemsNone. Verification
Notes
|
- Escape backslash and newline in Prometheus label values per spec (previously only double-quote was escaped) - Cache static DMI fields at GenericChassisReader construction time instead of re-reading /sys/class/dmi/id/ on every collection cycle
Add unit tests for MetricBuilder label escaping (backslash, double-quote, newline) and ChassisMetricExporter covering the all_smi_chassis_info DMI labels metric, inlet/outlet temperature, no-DMI guard, and MetricPresenceFlags::all_present.
Member
Author
PR Finalization CompleteSummary
New tests added
All checks passing. Ready for merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/sys/class/dmi/id/on Linux (no sudo required)/sys/class/thermal/total_power_wattsfor both TUI and API pathsall_smi_chassis_infoPrometheus metric exposing DMI details as labelsVerified on DGX Spark (GB10)
Before:
Pwr: N/A(no other chassis data)After:
Closes #147
Test plan